public Map<String, Object> toMapData(final CurrencyData currencyData) { final Map<String, Object> thisTransactionData = new LinkedHashMap<String, Object>(); final SavingsAccountTransactionEnumData transactionType = SavingsEnumerations.transactionType(this.typeOf); thisTransactionData.put("id", this.getId()); thisTransactionData.put("type", transactionType); thisTransactionData.put("reversed", Boolean.valueOf(this.isReversed())); thisTransactionData.put("date", this.getTransactionLocalDate()); thisTransactionData.put("currency", currencyData); thisTransactionData.put("amount", this.amount); if (this.paymentDetail != null) { thisTransactionData.put("paymentTypeId", this.paymentDetail.getPaymentType().getId()); } return thisTransactionData; }