@Test public void testGetMapByCurrency() throws Exception { }
public Map<String,Identity> getMapByCurrency(long currencyId) { Map<String,Identity> identities = new HashMap<>(); Cursor cursor = query(IdentityTable.CURRENCY_ID+"=?",new String[]{String.valueOf(currencyId)}); if (cursor.moveToFirst()){ do { Identity i = fromCursor(cursor); identities.put(i.getPublicKey(),i); }while (cursor.moveToNext()); } cursor.close(); return identities; }
IdentitySql extends AbstractSql<Identity> { public Map<String,Identity> getMapByCurrency(long currencyId) { Map<String,Identity> identities = new HashMap<>(); Cursor cursor = query(IdentityTable.CURRENCY_ID+"=?",new String[]{String.valueOf(currencyId)}); if (cursor.moveToFirst()){ do { Identity i = fromCursor(cursor); identities.put(i.getPublicKey(),i); }while (cursor.moveToNext()); } cursor.close(); return identities; } }
IdentitySql extends AbstractSql<Identity> { public Map<String,Identity> getMapByCurrency(long currencyId) { Map<String,Identity> identities = new HashMap<>(); Cursor cursor = query(IdentityTable.CURRENCY_ID+"=?",new String[]{String.valueOf(currencyId)}); if (cursor.moveToFirst()){ do { Identity i = fromCursor(cursor); identities.put(i.getPublicKey(),i); }while (cursor.moveToNext()); } cursor.close(); return identities; } IdentitySql(Context context); }
IdentitySql extends AbstractSql<Identity> { public Map<String,Identity> getMapByCurrency(long currencyId) { Map<String,Identity> identities = new HashMap<>(); Cursor cursor = query(IdentityTable.CURRENCY_ID+"=?",new String[]{String.valueOf(currencyId)}); if (cursor.moveToFirst()){ do { Identity i = fromCursor(cursor); identities.put(i.getPublicKey(),i); }while (cursor.moveToNext()); } cursor.close(); return identities; } IdentitySql(Context context); Identity getByWalletId(long id); Map<String,Identity> getMapByCurrency(long currencyId); Map<String,Identity> getMapByCurrencyWithoutId(long currencyId,long walletId); List<Identity> getAllIdentity(); List<Identity> getAllByCurrencyWithWallet(Currency currency); @Override String getCreation(); @Override Identity fromCursor(Cursor cursor); @Override ContentValues toContentValues(Identity entity); }
IdentitySql extends AbstractSql<Identity> { public Map<String,Identity> getMapByCurrency(long currencyId) { Map<String,Identity> identities = new HashMap<>(); Cursor cursor = query(IdentityTable.CURRENCY_ID+"=?",new String[]{String.valueOf(currencyId)}); if (cursor.moveToFirst()){ do { Identity i = fromCursor(cursor); identities.put(i.getPublicKey(),i); }while (cursor.moveToNext()); } cursor.close(); return identities; } IdentitySql(Context context); Identity getByWalletId(long id); Map<String,Identity> getMapByCurrency(long currencyId); Map<String,Identity> getMapByCurrencyWithoutId(long currencyId,long walletId); List<Identity> getAllIdentity(); List<Identity> getAllByCurrencyWithWallet(Currency currency); @Override String getCreation(); @Override Identity fromCursor(Cursor cursor); @Override ContentValues toContentValues(Identity entity); static final Uri URI; static final int CODE; }