Package org.internna.ossmoney.model

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


    investment.persist();
    InvestmentPrice price = new InvestmentPrice();
    price.setPrice(1D);
    price.setInvestment(investment);
    price.setUpdateTime(DateUtils.getMidnight(new Date()));
    price.persist();
    InvestmentTransaction investmentTransaction = new InvestmentTransaction();
    investmentTransaction.setId(14L);
    investmentTransaction.setPrice(price);
    investmentTransaction.setQuantity(10D);
    investmentTransaction.setInvestment(investment);
View Full Code Here

    sellTransaction.setAmount(new BigDecimal(1.5));
    InvestmentPrice updatedPrice = new InvestmentPrice();
    updatedPrice.setPrice(1.5D);
    updatedPrice.setUpdateTime(DateUtils.nextDate(DateUtils.getMidnight(new Date())));
    updatedPrice.setInvestment(investment);
    updatedPrice.persist();
    InvestmentTransaction investmentSellTransaction = new InvestmentTransaction();
    investmentSellTransaction.setId(15L);
    investmentSellTransaction.setQuantity(1D);
    investmentSellTransaction.setPrice(updatedPrice);
    investmentSellTransaction.setInvestment(investment);
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.