/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.zap.containerBeans; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; import javax.persistence.Basic; import javax.persistence.Column; import javax.persistence.EmbeddedId; import javax.persistence.Entity; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; /** * * @author Adrian */ @Entity @Table(name = "prime") @NamedQueries({@NamedQuery(name = "PrimeBean.findAll", query = "SELECT p FROM PrimeBean p"), @NamedQuery(name = "PrimeBean.findByPrimayKey1", query = "SELECT p FROM PrimeBean p WHERE p.primeBeanPK.primayKey1 = :primayKey1"), @NamedQuery(name = "PrimeBean.findByPrimaryKey2", query = "SELECT p FROM PrimeBean p WHERE p.primeBeanPK.primaryKey2 = :primaryKey2"), @NamedQuery(name = "PrimeBean.findByCol1", query = "SELECT p FROM PrimeBean p WHERE p.col1 = :col1"), @NamedQuery(name = "PrimeBean.findByCol2", query = "SELECT p FROM PrimeBean p WHERE p.col2 = :col2"), @NamedQuery(name = "PrimeBean.findByCol5", query = "SELECT p FROM PrimeBean p WHERE p.col5 = :col5"), @NamedQuery(name = "PrimeBean.findByCol7", query = "SELECT p FROM PrimeBean p WHERE p.col7 = :col7"), @NamedQuery(name = "PrimeBean.findByCol8", query = "SELECT p FROM PrimeBean p WHERE p.col8 = :col8"), @NamedQuery(name = "PrimeBean.findByCol10", query = "SELECT p FROM PrimeBean p WHERE p.col10 = :col10"), @NamedQuery(name = "PrimeBean.findByCol11", query = "SELECT p FROM PrimeBean p WHERE p.col11 = :col11"), @NamedQuery(name = "PrimeBean.findByCol12", query = "SELECT p FROM PrimeBean p WHERE p.col12 = :col12"), @NamedQuery(name = "PrimeBean.findByCol13", query = "SELECT p FROM PrimeBean p WHERE p.col13 = :col13"), @NamedQuery(name = "PrimeBean.findByCol14", query = "SELECT p FROM PrimeBean p WHERE p.col14 = :col14"), @NamedQuery(name = "PrimeBean.findByCol15", query = "SELECT p FROM PrimeBean p WHERE p.col15 = :col15"), @NamedQuery(name = "PrimeBean.findByCol17", query = "SELECT p FROM PrimeBean p WHERE p.col17 = :col17"), @NamedQuery(name = "PrimeBean.findByCol18", query = "SELECT p FROM PrimeBean p WHERE p.col18 = :col18"), @NamedQuery(name = "PrimeBean.findByCol19", query = "SELECT p FROM PrimeBean p WHERE p.col19 = :col19"), @NamedQuery(name = "PrimeBean.findByCol20", query = "SELECT p FROM PrimeBean p WHERE p.col20 = :col20")}) public class PrimeBean implements Serializable { private static final long serialVersionUID = 1L; @EmbeddedId protected PrimeBeanPK primeBeanPK; @Column(name = "col1") @Temporal(TemporalType.DATE) private Date col1; @Column(name = "col2") private Character col2; @Column(name = "col5") private String col5; @Column(name = "col7") private Integer col7; @Column(name = "col8") private BigDecimal col8; @Column(name = "col10") private Integer col10; @Column(name = "col11") private String col11; @Column(name = "col12") private String col12; @Basic(optional = false) @Column(name = "col13") private boolean col13; @Column(name = "col14") private Character col14; @Column(name = "col15") private BigDecimal col15; @Column(name = "col17") private Integer col17; @Column(name = "col18") private String col18; @Column(name = "col19") private Integer col19; @Basic(optional = false) @Column(name = "col20") @Temporal(TemporalType.DATE) private Date col20; public PrimeBean() { } public PrimeBean(PrimeBeanPK primeBeanPK) { this.primeBeanPK = primeBeanPK; } public PrimeBean(PrimeBeanPK primeBeanPK, boolean col13, Date col20) { this.primeBeanPK = primeBeanPK; this.col13 = col13; this.col20 = col20; } public PrimeBean(int primayKey1, int primaryKey2) { this.primeBeanPK = new PrimeBeanPK(primayKey1, primaryKey2); } public PrimeBeanPK getPrimeBeanPK() { return primeBeanPK; } public void setPrimeBeanPK(PrimeBeanPK primeBeanPK) { this.primeBeanPK = primeBeanPK; } public Date getCol1() { return col1; } public void setCol1(Date col1) { this.col1 = col1; } public Character getCol2() { return col2; } public void setCol2(Character col2) { this.col2 = col2; } public String getCol5() { return col5; } public void setCol5(String col5) { this.col5 = col5; } public Integer getCol7() { return col7; } public void setCol7(Integer col7) { this.col7 = col7; } public BigDecimal getCol8() { return col8; } public void setCol8(BigDecimal col8) { this.col8 = col8; } public Integer getCol10() { return col10; } public void setCol10(Integer col10) { this.col10 = col10; } public String getCol11() { return col11; } public void setCol11(String col11) { this.col11 = col11; } public String getCol12() { return col12; } public void setCol12(String col12) { this.col12 = col12; } public boolean getCol13() { return col13; } public void setCol13(boolean col13) { this.col13 = col13; } public Character getCol14() { return col14; } public void setCol14(Character col14) { this.col14 = col14; } public BigDecimal getCol15() { return col15; } public void setCol15(BigDecimal col15) { this.col15 = col15; } public Integer getCol17() { return col17; } public void setCol17(Integer col17) { this.col17 = col17; } public String getCol18() { return col18; } public void setCol18(String col18) { this.col18 = col18; } public Integer getCol19() { return col19; } public void setCol19(Integer col19) { this.col19 = col19; } public Date getCol20() { return col20; } public void setCol20(Date col20) { this.col20 = col20; } @Override public int hashCode() { int hash = 0; hash += (primeBeanPK != null ? primeBeanPK.hashCode() : 0); return hash; } @Override public boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set if (!(object instanceof PrimeBean)) { return false; } PrimeBean other = (PrimeBean) object; if ((this.primeBeanPK == null && other.primeBeanPK != null) || (this.primeBeanPK != null && !this.primeBeanPK.equals(other.primeBeanPK))) { return false; } return true; } @Override public String toString() { return "com.zap.containerBeans.PrimeBean[primeBeanPK=" + primeBeanPK + "]"; } }