@Test public void testGetUdMap() throws Exception { }
public Map<Long,Tx> getUdMap(long id) { Map<Long,Tx> result = new HashMap<>(); Cursor cursor = query(TxTable.WALLET_ID+"=? AND "+TxTable.IS_UD+"=?",new String[]{String.valueOf(id),String.valueOf(true)}); if (cursor.moveToFirst()){ do { Tx tx = fromCursor(cursor); result.put(tx.getBlockNumber(),tx); }while (cursor.moveToNext()); } cursor.close(); return result; }
TxSql extends AbstractSql<Tx> { public Map<Long,Tx> getUdMap(long id) { Map<Long,Tx> result = new HashMap<>(); Cursor cursor = query(TxTable.WALLET_ID+"=? AND "+TxTable.IS_UD+"=?",new String[]{String.valueOf(id),String.valueOf(true)}); if (cursor.moveToFirst()){ do { Tx tx = fromCursor(cursor); result.put(tx.getBlockNumber(),tx); }while (cursor.moveToNext()); } cursor.close(); return result; } }
TxSql extends AbstractSql<Tx> { public Map<Long,Tx> getUdMap(long id) { Map<Long,Tx> result = new HashMap<>(); Cursor cursor = query(TxTable.WALLET_ID+"=? AND "+TxTable.IS_UD+"=?",new String[]{String.valueOf(id),String.valueOf(true)}); if (cursor.moveToFirst()){ do { Tx tx = fromCursor(cursor); result.put(tx.getBlockNumber(),tx); }while (cursor.moveToNext()); } cursor.close(); return result; } TxSql(Context context); }
TxSql extends AbstractSql<Tx> { public Map<Long,Tx> getUdMap(long id) { Map<Long,Tx> result = new HashMap<>(); Cursor cursor = query(TxTable.WALLET_ID+"=? AND "+TxTable.IS_UD+"=?",new String[]{String.valueOf(id),String.valueOf(true)}); if (cursor.moveToFirst()){ do { Tx tx = fromCursor(cursor); result.put(tx.getBlockNumber(),tx); }while (cursor.moveToNext()); } cursor.close(); return result; } TxSql(Context context); void insertList(List<Tx> list); long getWalletTime(long walletId); Map<String,Tx> getTxMap(long id); Map<Long,Tx> getUdMap(long id); long getPendingAmount(long id); List<Tx> getPendingTx(long id); @Override String getCreation(); @Override Tx fromCursor(Cursor cursor); @Override ContentValues toContentValues(Tx entity); }
TxSql extends AbstractSql<Tx> { public Map<Long,Tx> getUdMap(long id) { Map<Long,Tx> result = new HashMap<>(); Cursor cursor = query(TxTable.WALLET_ID+"=? AND "+TxTable.IS_UD+"=?",new String[]{String.valueOf(id),String.valueOf(true)}); if (cursor.moveToFirst()){ do { Tx tx = fromCursor(cursor); result.put(tx.getBlockNumber(),tx); }while (cursor.moveToNext()); } cursor.close(); return result; } TxSql(Context context); void insertList(List<Tx> list); long getWalletTime(long walletId); Map<String,Tx> getTxMap(long id); Map<Long,Tx> getUdMap(long id); long getPendingAmount(long id); List<Tx> getPendingTx(long id); @Override String getCreation(); @Override Tx fromCursor(Cursor cursor); @Override ContentValues toContentValues(Tx entity); static final Uri URI; static final int CODE; }