int accountId = reader.readInt("accountId");
long date = reader.readLong("date");
double amount = reader.readDouble("amount");
boolean isDebit = reader.readBoolean("debit");
Transaction transaction = new Transaction();
transaction.setId(id);
transaction.setDescription(description);
transaction.setAccountId(accountId);
transaction.setDate(new Date(date));
transaction.setAmount(amount);
transaction.setDebit(isDebit);
return transaction;
}