| 109 | } |
| 110 | |
| 111 | public static TreeMap<String,Object> getRow(TransactionContext tcx, |
| 112 | final String row){ |
| 113 | return tcx.run(new Function<Transaction,TreeMap<String,Object> >() { |
| 114 | public TreeMap<String,Object> apply(Transaction tr){ |
| 115 | TreeMap<String,Object> cols = new TreeMap<String,Object>(); |
| 116 | |
| 117 | for(KeyValue kv : tr.getRange( |
| 118 | rowIndex.subspace(Tuple.from(row)).range())){ |
| 119 | cols.put(rowIndex.unpack(kv.getKey()).getString(1), |
| 120 | unpack(kv.getValue())); |
| 121 | } |
| 122 | |
| 123 | return cols; |
| 124 | } |
| 125 | }); |
| 126 | } |
| 127 | |
| 128 | |
| 129 | public static TreeMap<String,Object> getColumn(TransactionContext tcx, |