Package org.springframework.integration.samples.loanbroker.loanshark.domain

Examples of org.springframework.integration.samples.loanbroker.loanshark.domain.LoanShark.persist()


    if (shark == null) {
      shark = new LoanShark();
      shark.setName(quote.getSharkName());
      shark.setCounter(new Long(0));
      shark.setAverageRate(0.0d);
      shark.persist();
    }
    Double current = shark.getCounter() * shark.getAverageRate();
    shark.setCounter(shark.getCounter().longValue() + 1);
    shark.setAverageRate((current + quote.getSharkRate()) / shark.getCounter());
  }
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.