@Test public void testGetByWallet() throws Exception { }
public List<Source> getByWallet(long id) { List<Source> sources = new ArrayList<>(); Cursor cursor = query(SourceTable.WALLET_ID+"=?",new String[]{String.valueOf(id)},SourceTable.BASE+" ASC"); if (cursor.moveToFirst()){ do { sources.add(fromCursor(cursor)); }while (cursor.moveToNext()); } cursor.close(); return sources; }
SourceSql extends AbstractSql<Source> { public List<Source> getByWallet(long id) { List<Source> sources = new ArrayList<>(); Cursor cursor = query(SourceTable.WALLET_ID+"=?",new String[]{String.valueOf(id)},SourceTable.BASE+" ASC"); if (cursor.moveToFirst()){ do { sources.add(fromCursor(cursor)); }while (cursor.moveToNext()); } cursor.close(); return sources; } }
SourceSql extends AbstractSql<Source> { public List<Source> getByWallet(long id) { List<Source> sources = new ArrayList<>(); Cursor cursor = query(SourceTable.WALLET_ID+"=?",new String[]{String.valueOf(id)},SourceTable.BASE+" ASC"); if (cursor.moveToFirst()){ do { sources.add(fromCursor(cursor)); }while (cursor.moveToNext()); } cursor.close(); return sources; } SourceSql(Context context); }
SourceSql extends AbstractSql<Source> { public List<Source> getByWallet(long id) { List<Source> sources = new ArrayList<>(); Cursor cursor = query(SourceTable.WALLET_ID+"=?",new String[]{String.valueOf(id)},SourceTable.BASE+" ASC"); if (cursor.moveToFirst()){ do { sources.add(fromCursor(cursor)); }while (cursor.moveToNext()); } cursor.close(); return sources; } SourceSql(Context context); List<Source> getMinBaseSourceByWallet(Wallet wallet); GPSources getByWalletAndBase(Wallet wallet, int base); List<Source> getByWallet(long id); @Override String getCreation(); @Override Source fromCursor(Cursor cursor); @Override ContentValues toContentValues(Source entity); }
SourceSql extends AbstractSql<Source> { public List<Source> getByWallet(long id) { List<Source> sources = new ArrayList<>(); Cursor cursor = query(SourceTable.WALLET_ID+"=?",new String[]{String.valueOf(id)},SourceTable.BASE+" ASC"); if (cursor.moveToFirst()){ do { sources.add(fromCursor(cursor)); }while (cursor.moveToNext()); } cursor.close(); return sources; } SourceSql(Context context); List<Source> getMinBaseSourceByWallet(Wallet wallet); GPSources getByWalletAndBase(Wallet wallet, int base); List<Source> getByWallet(long id); @Override String getCreation(); @Override Source fromCursor(Cursor cursor); @Override ContentValues toContentValues(Source entity); static final Uri URI; static final int CODE; }