@Test public void testGetWalletTime() throws Exception { }
public long getWalletTime(long walletId) { long timeAmount = 0; String requete = "SELECT sum("+TxTable.AMOUNT_TIME_ORIGIN+") FROM "+TxTable.TABLE_NAME+" WHERE "+TxTable.WALLET_ID + "="+walletId+" AND "+TxTable.IS_UD+"=\"false\""; Cursor cursor = query(requete); if (cursor.moveToFirst()){ timeAmount = cursor.getLong(0); } cursor.close(); return timeAmount; }
TxSql extends AbstractSql<Tx> { public long getWalletTime(long walletId) { long timeAmount = 0; String requete = "SELECT sum("+TxTable.AMOUNT_TIME_ORIGIN+") FROM "+TxTable.TABLE_NAME+" WHERE "+TxTable.WALLET_ID + "="+walletId+" AND "+TxTable.IS_UD+"=\"false\""; Cursor cursor = query(requete); if (cursor.moveToFirst()){ timeAmount = cursor.getLong(0); } cursor.close(); return timeAmount; } }
TxSql extends AbstractSql<Tx> { public long getWalletTime(long walletId) { long timeAmount = 0; String requete = "SELECT sum("+TxTable.AMOUNT_TIME_ORIGIN+") FROM "+TxTable.TABLE_NAME+" WHERE "+TxTable.WALLET_ID + "="+walletId+" AND "+TxTable.IS_UD+"=\"false\""; Cursor cursor = query(requete); if (cursor.moveToFirst()){ timeAmount = cursor.getLong(0); } cursor.close(); return timeAmount; } TxSql(Context context); }
TxSql extends AbstractSql<Tx> { public long getWalletTime(long walletId) { long timeAmount = 0; String requete = "SELECT sum("+TxTable.AMOUNT_TIME_ORIGIN+") FROM "+TxTable.TABLE_NAME+" WHERE "+TxTable.WALLET_ID + "="+walletId+" AND "+TxTable.IS_UD+"=\"false\""; Cursor cursor = query(requete); if (cursor.moveToFirst()){ timeAmount = cursor.getLong(0); } cursor.close(); return timeAmount; } TxSql(Context context); void insertList(List<Tx> list); long getWalletTime(long walletId); Map<String,Tx> getTxMap(long id); Map<Long,Tx> getUdMap(long id); long getPendingAmount(long id); List<Tx> getPendingTx(long id); @Override String getCreation(); @Override Tx fromCursor(Cursor cursor); @Override ContentValues toContentValues(Tx entity); }
TxSql extends AbstractSql<Tx> { public long getWalletTime(long walletId) { long timeAmount = 0; String requete = "SELECT sum("+TxTable.AMOUNT_TIME_ORIGIN+") FROM "+TxTable.TABLE_NAME+" WHERE "+TxTable.WALLET_ID + "="+walletId+" AND "+TxTable.IS_UD+"=\"false\""; Cursor cursor = query(requete); if (cursor.moveToFirst()){ timeAmount = cursor.getLong(0); } cursor.close(); return timeAmount; } TxSql(Context context); void insertList(List<Tx> list); long getWalletTime(long walletId); Map<String,Tx> getTxMap(long id); Map<Long,Tx> getUdMap(long id); long getPendingAmount(long id); List<Tx> getPendingTx(long id); @Override String getCreation(); @Override Tx fromCursor(Cursor cursor); @Override ContentValues toContentValues(Tx entity); static final Uri URI; static final int CODE; }