|
Hibernate example source code file (LineItem.java)
The Hibernate LineItem.java source codepackage org.hibernate.test.idprops; /** * {@inheritDoc} * * @author Steve Ebersole */ public class LineItem { private LineItemPK pk; private int quantity; private String id; public LineItem() { } public LineItem(LineItemPK pk, int quantity) { this.pk = pk; this.quantity = quantity; this.pk.getOrder().getLineItems().add( this ); } public LineItem(Order order, String productCode, int quantity) { this( new LineItemPK( order, productCode ), quantity ); } public LineItemPK getPk() { return pk; } public void setPk(LineItemPK pk) { this.pk = pk; } public int getQuantity() { return quantity; } public void setQuantity(int quantity) { this.quantity = quantity; } public String getId() { return id; } public void setId(String id) { this.id = id; } } Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate LineItem.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.