@Test public void testGetByName() throws Exception { }
public Currency getByName(String name) { Currency currency = null; Cursor cursor = query(CurrencyTable.NAME+"=?", new String[]{name}); if (cursor.moveToFirst()){ currency = fromCursor(cursor); } cursor.close(); return currency; }
CurrencySql extends AbstractSql<Currency> { public Currency getByName(String name) { Currency currency = null; Cursor cursor = query(CurrencyTable.NAME+"=?", new String[]{name}); if (cursor.moveToFirst()){ currency = fromCursor(cursor); } cursor.close(); return currency; } }
CurrencySql extends AbstractSql<Currency> { public Currency getByName(String name) { Currency currency = null; Cursor cursor = query(CurrencyTable.NAME+"=?", new String[]{name}); if (cursor.moveToFirst()){ currency = fromCursor(cursor); } cursor.close(); return currency; } CurrencySql(Context context); }
CurrencySql extends AbstractSql<Currency> { public Currency getByName(String name) { Currency currency = null; Cursor cursor = query(CurrencyTable.NAME+"=?", new String[]{name}); if (cursor.moveToFirst()){ currency = fromCursor(cursor); } cursor.close(); return currency; } CurrencySql(Context context); List<Currency> getAllCurrency(); Currency getByName(String name); @Override String getCreation(); @Override Currency fromCursor(Cursor cursor); @Override ContentValues toContentValues(Currency entity); }
CurrencySql extends AbstractSql<Currency> { public Currency getByName(String name) { Currency currency = null; Cursor cursor = query(CurrencyTable.NAME+"=?", new String[]{name}); if (cursor.moveToFirst()){ currency = fromCursor(cursor); } cursor.close(); return currency; } CurrencySql(Context context); List<Currency> getAllCurrency(); Currency getByName(String name); @Override String getCreation(); @Override Currency fromCursor(Cursor cursor); @Override ContentValues toContentValues(Currency entity); static final Uri URI; static final int CODE; }