@Test public void testGetMapByNumber() throws Exception { }
public Map<Long, BlockUd> getMapByNumber(Long currencyId) { Map<Long,BlockUd> result = new HashMap<>(); Cursor cursor = query(BlockTable.CURRENCY_ID+"=?",new String[]{String.valueOf(currencyId)}); if (cursor.moveToFirst()){ do { BlockUd block = fromCursor(cursor); result.put(block.getNumber(),block); }while (cursor.moveToNext()); cursor.close(); } return result; }
BlockUdSql extends AbstractSql<BlockUd> { public Map<Long, BlockUd> getMapByNumber(Long currencyId) { Map<Long,BlockUd> result = new HashMap<>(); Cursor cursor = query(BlockTable.CURRENCY_ID+"=?",new String[]{String.valueOf(currencyId)}); if (cursor.moveToFirst()){ do { BlockUd block = fromCursor(cursor); result.put(block.getNumber(),block); }while (cursor.moveToNext()); cursor.close(); } return result; } }
BlockUdSql extends AbstractSql<BlockUd> { public Map<Long, BlockUd> getMapByNumber(Long currencyId) { Map<Long,BlockUd> result = new HashMap<>(); Cursor cursor = query(BlockTable.CURRENCY_ID+"=?",new String[]{String.valueOf(currencyId)}); if (cursor.moveToFirst()){ do { BlockUd block = fromCursor(cursor); result.put(block.getNumber(),block); }while (cursor.moveToNext()); cursor.close(); } return result; } BlockUdSql(Context context); }
BlockUdSql extends AbstractSql<BlockUd> { public Map<Long, BlockUd> getMapByNumber(Long currencyId) { Map<Long,BlockUd> result = new HashMap<>(); Cursor cursor = query(BlockTable.CURRENCY_ID+"=?",new String[]{String.valueOf(currencyId)}); if (cursor.moveToFirst()){ do { BlockUd block = fromCursor(cursor); result.put(block.getNumber(),block); }while (cursor.moveToNext()); cursor.close(); } return result; } BlockUdSql(Context context); List<Integer> getListNumber(long currencyId); Map<Long, BlockUd> getMapByNumber(Long currencyId); BlockUd last(Long currencyId); @Override String getCreation(); @Override BlockUd fromCursor(Cursor cursor); @Override ContentValues toContentValues(BlockUd entity); }
BlockUdSql extends AbstractSql<BlockUd> { public Map<Long, BlockUd> getMapByNumber(Long currencyId) { Map<Long,BlockUd> result = new HashMap<>(); Cursor cursor = query(BlockTable.CURRENCY_ID+"=?",new String[]{String.valueOf(currencyId)}); if (cursor.moveToFirst()){ do { BlockUd block = fromCursor(cursor); result.put(block.getNumber(),block); }while (cursor.moveToNext()); cursor.close(); } return result; } BlockUdSql(Context context); List<Integer> getListNumber(long currencyId); Map<Long, BlockUd> getMapByNumber(Long currencyId); BlockUd last(Long currencyId); @Override String getCreation(); @Override BlockUd fromCursor(Cursor cursor); @Override ContentValues toContentValues(BlockUd entity); static final Uri URI; static final int CODE; }