+ public void propagateAmountsTo(LedgerAccount acc) {
+ for (LedgerAmount a : amounts)
+ a.propagateToAccount(acc);
+ }
+ public List<LedgerAmount> getAmounts() {
+ return amounts;
+ }
+ @NonNull
+ public Account toDBO() {
+ Account dbo = new Account();
+ dbo.setName(name);
+ dbo.setNameUpper(name.toUpperCase());
+ dbo.setParentName(extractParentName(name));
+ dbo.setLevel(level);
+ dbo.setId(dbId);
+ dbo.setProfileId(profileId);
+ dbo.setExpanded(expanded);
+ dbo.setAmountsExpanded(amountsExpanded);
+
+ return dbo;
+ }
+ @NonNull
+ public AccountWithAmounts toDBOWithAmounts() {
+ AccountWithAmounts dbo = new AccountWithAmounts();
+ dbo.account = toDBO();