@Test public void testGetAllByCurrencyWithWallet() throws Exception { }
public List<Identity> getAllByCurrencyWithWallet(Currency currency) { List<Identity> identities = new ArrayList<>(); Cursor cursor = query(IdentityTable.CURRENCY_ID+"=?",new String[]{String.valueOf(currency.getId())}); if (cursor.moveToFirst()){ do { Identity identity = fromCursor(cursor); identity.setCurrency(currency); identity.setWallet(SqlService.getWalletSql(context).getById(identity.getWalletId())); identities.add(identity); }while (cursor.moveToNext()); } return identities; }
IdentitySql extends AbstractSql<Identity> { public List<Identity> getAllByCurrencyWithWallet(Currency currency) { List<Identity> identities = new ArrayList<>(); Cursor cursor = query(IdentityTable.CURRENCY_ID+"=?",new String[]{String.valueOf(currency.getId())}); if (cursor.moveToFirst()){ do { Identity identity = fromCursor(cursor); identity.setCurrency(currency); identity.setWallet(SqlService.getWalletSql(context).getById(identity.getWalletId())); identities.add(identity); }while (cursor.moveToNext()); } return identities; } }
IdentitySql extends AbstractSql<Identity> { public List<Identity> getAllByCurrencyWithWallet(Currency currency) { List<Identity> identities = new ArrayList<>(); Cursor cursor = query(IdentityTable.CURRENCY_ID+"=?",new String[]{String.valueOf(currency.getId())}); if (cursor.moveToFirst()){ do { Identity identity = fromCursor(cursor); identity.setCurrency(currency); identity.setWallet(SqlService.getWalletSql(context).getById(identity.getWalletId())); identities.add(identity); }while (cursor.moveToNext()); } return identities; } IdentitySql(Context context); }
IdentitySql extends AbstractSql<Identity> { public List<Identity> getAllByCurrencyWithWallet(Currency currency) { List<Identity> identities = new ArrayList<>(); Cursor cursor = query(IdentityTable.CURRENCY_ID+"=?",new String[]{String.valueOf(currency.getId())}); if (cursor.moveToFirst()){ do { Identity identity = fromCursor(cursor); identity.setCurrency(currency); identity.setWallet(SqlService.getWalletSql(context).getById(identity.getWalletId())); identities.add(identity); }while (cursor.moveToNext()); } 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 List<Identity> getAllByCurrencyWithWallet(Currency currency) { List<Identity> identities = new ArrayList<>(); Cursor cursor = query(IdentityTable.CURRENCY_ID+"=?",new String[]{String.valueOf(currency.getId())}); if (cursor.moveToFirst()){ do { Identity identity = fromCursor(cursor); identity.setCurrency(currency); identity.setWallet(SqlService.getWalletSql(context).getById(identity.getWalletId())); identities.add(identity); }while (cursor.moveToNext()); } 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; }