|
Hibernate example source code file (FixedLeg.java)
The Hibernate FixedLeg.java source codepackage org.hibernate.test.annotations.embedded; import java.text.NumberFormat; import javax.persistence.Embeddable; /** * Represents fixed part of Interest Rate Swap cash flows. */ @Embeddable public class FixedLeg extends Leg { /** * Fixed rate. */ private double rate; public double getRate() { return rate; } public void setRate(double rate) { this.rate = rate; } public String toString() { NumberFormat format = NumberFormat.getNumberInstance(); format.setMinimumFractionDigits( 4 ); format.setMaximumFractionDigits( 4 ); return format.format( getRate() ) + "%"; } } Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate FixedLeg.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.