use of name.abuchen.portfolio.model.InvestmentPlan in project portfolio by buchen.
the class InvestmentPlanModel method applyChanges.
@Override
public void applyChanges() {
if (security == null)
throw new UnsupportedOperationException(Messages.MsgMissingSecurity);
if (portfolio == null)
throw new UnsupportedOperationException(Messages.MsgMissingPortfolio);
if (account == null)
throw new UnsupportedOperationException(Messages.MsgMissingAccount);
InvestmentPlan plan = source;
if (plan == null) {
plan = new InvestmentPlan();
this.client.addPlan(plan);
}
plan.setName(name);
plan.setSecurity(security);
plan.setPortfolio(portfolio);
plan.setAccount(account.equals(DELIVERY) ? null : account);
plan.setAutoGenerate(autoGenerate);
plan.setStart(start);
plan.setInterval(interval);
plan.setAmount(amount);
plan.setFees(fees);
}
Aggregations