/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package stockInformation; import java.io.Serializable; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.IdClass; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; /** * * @author eve */ @IdClass(stockInformation.OrdlinementKey.class) @Entity @Table(name="ORDERLINE") public class Ordlineent implements Serializable { private static final long serialVersionUID = 1L; @Id @ManyToOne(cascade = {CascadeType.ALL}) @JoinColumn(name="ORDID") private Orderent orderent; @ManyToOne(cascade = {CascadeType.ALL}) @JoinColumn(name="ITMID") private Iteamdetailsent iteamdetailsent; @ManyToOne(cascade = {CascadeType.ALL}) @JoinColumn(name="CUSID") private Customerent customerent; @Column(name="QUANTITY", nullable=true) private int quanity; public Orderent getOrderent() { return orderent; } public void setOrderent(Orderent orderent) { this.orderent = orderent; } public Iteamdetailsent getIteamdetailsent() { return iteamdetailsent; } public void setIteamdetailsent(Iteamdetailsent iteamdetailsent) { this.iteamdetailsent = iteamdetailsent; } public Customerent getCustomerent() { return customerent; } public void setCustomerent(Customerent customerent) { this.customerent = customerent; } public int getQuanity() { return quanity; } public void setQuanity(int quanity) { this.quanity = quanity; } @Override public String toString() { return "stockInformation.Ordlineent[id=" + orderent + "]"; } }