Examples of persist()


Examples of org.internna.ossmoney.model.Dashboard.persist()

  }

  protected Dashboard createDashBoDashboard() {
    Dashboard dashboard = new Dashboard();
    dashboard.setColumns(3);
    dashboard.persist();
    Widget widget = Widget.createInstance("accounts.favorites.title", 1, 1, "/financial/accounts/favorites", null);
    dashboard.addWidget(widget);
    widget.persist();
    widget = Widget.createInstance("widgets.remainder.title", 1, 2, "/financial/widgets/remainder/", "30");
    dashboard.addWidget(widget);
View Full Code Here

Examples of org.internna.ossmoney.model.FinancialInstitution.persist()

      FinancialInstitution institution = new FinancialInstitution();
      institution.setWeb(web);
      institution.setIcon(icon);
      institution.setName(name);
      institution.setOwner(owner);
      institution.persist();
      owner.getInstitutions().add(institution);
      owner.merge();
      createPayee(owner, name);
    }
  }
View Full Code Here

Examples of org.internna.ossmoney.model.Investment.persist()

        investment.setName(name);
        investment.setSymbol(symbol);
        investment.setProductType(type);
        investment.setOwner(UserDetails.findCurrentUser());
        investment.setLocale(new Locale(parts[0], parts[1], ""));
        investment.persist();
        return "redirect:/financial/accounts";
    }

    @RequestMapping("/add")
    public String add(ModelMap modelMap) {
View Full Code Here

Examples of org.internna.ossmoney.model.InvestmentPrice.persist()

        price.setPrice(amount);
        price.setUpdateTime(operationDate);
        if (price.getId() != null) {
          price.merge();
        } else {
          price.persist();
        }
      }
      return getPrices(investmentId, modelMap);
    }
View Full Code Here

Examples of org.internna.ossmoney.model.Payee.persist()

    Payee payee = Payee.findByName(register.getPayee());
    if (payee == null) {
      payee = new Payee();
      payee.setName(register.getPayee());
      payee.setOwner(account.getOwner());
      payee.persist();
      payee.flush();
    }
    return payee;
  }
View Full Code Here

Examples of org.internna.ossmoney.model.Subcategory.persist()

      }
      subcategory = new Subcategory();
      subcategory.setOwner(user);
      subcategory.setParentCategory(category);
      subcategory.setCategory(register.getSubcategory());
      subcategory.persist();
    }
    return subcategory;
  }

}
View Full Code Here

Examples of org.internna.ossmoney.model.Widget.persist()

    Dashboard dashboard = new Dashboard();
    dashboard.setColumns(3);
    dashboard.persist();
    Widget widget = Widget.createInstance("accounts.favorites.title", 1, 1, "/financial/accounts/favorites", null);
    dashboard.addWidget(widget);
    widget.persist();
    widget = Widget.createInstance("widgets.remainder.title", 1, 2, "/financial/widgets/remainder/", "30");
    dashboard.addWidget(widget);
    widget.persist();
    widget = Widget.createInstance("widgets.networth.title", 1, 3, "/financial/widgets/networth/", "5");
    dashboard.addWidget(widget);
View Full Code Here

Examples of org.internna.ossmoney.model.budget.Budget.persist()

  }

  protected Budget createBudget(UserDetails user) {
    Budget budget = new Budget();
    budget.setOwner(user);
    budget.persist();
    for (int i = 0; i < 12; i++) {
      MonthlyBudget monthlyBudget = new MonthlyBudget();
      monthlyBudget.setBudget(budget);
      monthlyBudget.setBudgetedMonth(i);
      monthlyBudget.persist();
View Full Code Here

Examples of org.internna.ossmoney.model.budget.CategoryBudget.persist()

      String[] locales = locale.split("_");
      categoryBudget.setLocale(new Locale(locales[0], locales[1], ""));
      categoryBudget.setExpectedAmount(new BigDecimal(amount));
      MonthlyBudget monthlyBudget = obtainMonthlyBudget(user, month);
      categoryBudget.setMonthlyBudget(monthlyBudget);
      categoryBudget.persist();
      monthlyBudget.getBudgets().add(categoryBudget);
      monthlyBudget.merge();
    }

    protected MonthlyBudget obtainMonthlyBudget(UserDetails user, int month) {
View Full Code Here

Examples of org.internna.ossmoney.model.budget.MonthlyBudget.persist()

    budget.persist();
    for (int i = 0; i < 12; i++) {
      MonthlyBudget monthlyBudget = new MonthlyBudget();
      monthlyBudget.setBudget(budget);
      monthlyBudget.setBudgetedMonth(i);
      monthlyBudget.persist();
      budget.getMonthlyBudgets().add(monthlyBudget);
    }
    budget.merge();
    return budget;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.