@Override
 public void onLoadFinished(Loader<Cursor> loader, Cursor data) {
   mCurrencyAdapter.swapCursor(data);
   if (mPosition != ListView.INVALID_POSITION) {
     // If we don't need to restart the loader, and there's a desired position to restore
     // to, do so now.
     mListView.smoothScrollToPosition(mPosition);
   }
 }
  public Transaction toTransaction(TransactionDBTO transactionDBTO) {
    Transaction transaction = new Transaction();
    BeanUtils.copyProperties(transactionDBTO, transaction, "user", "date", "currency", "category");

    UserDBTO userDBTO = transactionDBTO.getUser();
    User user = userAdapter.toUser(userDBTO);
    transaction.setUser(user);

    DateDBTO dateDBTO = transactionDBTO.getDate();
    it.ow.stage.persistence.model.Date date = dateAdapter.toDate(dateDBTO);
    transaction.setDate(date);

    CategoryDBTO categoryDBTO = transactionDBTO.getCategory();
    Category category = categoryAdapter.toCategory(categoryDBTO);
    transaction.setCategory(category);

    CurrencyDBTO currencyDBTO = transactionDBTO.getCurrency();
    Currency currency = currencyAdapter.toCurrency(currencyDBTO);
    transaction.setCurrency(currency);

    return transaction;
  }
 @Override
 public void onLoaderReset(Loader<Cursor> loader) {
   mCurrencyAdapter.swapCursor(null);
 }