Package org.internna.ossmoney.model

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


    Account account = Account.findAccount(1L);
    investment.setSymbol("INV");
    investment.setName("investment");
    investment.setProductType("type");
    investment.setOwner(account.getOwner());
    investment.persist();
    InvestmentTransaction transaction = new InvestmentTransaction();
    transaction.setQuantity(5D);
    transaction.setInvestment(new Investment());
    transaction.getInvestment().setId(investment.getId());
    transaction.setPrice(new InvestmentPrice());
View Full Code Here

    if (investment == null) {
      investment = new Investment();
      investment.setOwner(account.getOwner());
      investment.setName(register.getInvestment());
      investment.setProductType("investment.unknown");
      investment.persist();
      investment.flush();
    }
    return investment;
  }
View Full Code Here

    transaction.setOperationDate(new Date(100, 10, 20));
    Investment investment = new Investment();
    investment.setName("Investment");
    investment.setProductType("stocks");
    investment.setOwner(account.getOwner());
    investment.persist();
    InvestmentPrice price = new InvestmentPrice();
    price.setPrice(1D);
    price.setInvestment(investment);
    price.setUpdateTime(DateUtils.getMidnight(new Date()));
    price.persist();
View Full Code Here

    assertEquals("JSON (buy & sell)", "{operationDate:'', id: 5, label: 'Investment', buy: '10,00 €', sell: '1,50 €', interest: '', gainLoss: '5,00 €', pctg: '50%', quantity: '9', price: '1,50 €', operations: [{id: 999914, label: '', buy: '10,00 €', sell: '', interest: '', quantity: '10', price: '1,00 €', gainLoss: '', pctg: '', quant: 10.0, operationDate: '2000-11-20'},{id: 999915, label: '', buy: '', sell: '1,50 €', interest: '', quantity: '1', price: '1,50 €', gainLoss: '', pctg: '', quant: 1.0, operationDate: '2000-11-21'}], quant: 9.0}", investmentStatus.getAsJSONString());
    Investment amountedInvestment = new Investment();
    amountedInvestment.setName("Investment (amount)");
    amountedInvestment.setOwner(account.getOwner());
    amountedInvestment.setProductType("deposit");
    amountedInvestment.persist();
    InvestmentStatus amountedInvestmentStatus = new InvestmentStatus(account, amountedInvestment);
    InvestmentTransaction amountedInvestmentTransaction = new InvestmentTransaction();
    amountedInvestmentTransaction.setId(26L);
    amountedInvestmentTransaction.setQuantity(0D);
    amountedInvestmentTransaction.setInvestment(amountedInvestment);
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.