+ public LedgerTransactionAccount(String accountName, String currency) {
+ this.accountName = accountName;
+ this.currency = Misc.emptyIsNull(currency);
+ }
+ public LedgerTransactionAccount(LedgerTransactionAccount origin) {
+ // copy constructor
+ setAccountName(origin.getAccountName());
+ setComment(origin.getComment());
+ if (origin.isAmountSet())
+ setAmount(origin.getAmount());
+ amountValid = origin.amountValid;
+ currency = origin.getCurrency();
+ }
+ public LedgerTransactionAccount(TransactionAccount dbo) {
+ this(dbo.getAccountName(), dbo.getAmount(), Misc.emptyIsNull(dbo.getCurrency()),
+ Misc.emptyIsNull(dbo.getComment()));
+ amountSet = true;
+ amountValid = true;
+ dbId = dbo.getId();
+ }
+ public String getComment() {
+ return comment;
+ }
+ public void setComment(String comment) {
+ this.comment = comment;
+ }