package demo; // Generated 09.02.2008 15:23:31 by Hibernate Tools 3.2.0.CR1 import java.util.HashSet; import java.util.Set; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.OneToMany; import javax.persistence.Table; import org.hibernate.annotations.Cascade; import org.hibernate.annotations.CascadeType; import org.hibernate.annotations.Columns; /** * GelAnalysis generated by hbm2java */ @Entity @Table(name="gelanalysis" ) public class GelAnalysis implements java.io.Serializable { private long id; private String gelAnalysisCode; private MTPlate mtplate; private Set img2Gel = new HashSet(0); public GelAnalysis() { } public GelAnalysis(String gelAnalysisCode, MTPlate mtplate, Set img2Gel) { this.gelAnalysisCode = gelAnalysisCode; this.mtplate = mtplate; this.img2Gel = img2Gel; } @Id @GeneratedValue @Column(name="GELANALYSISID", nullable=false) public long getId() { return this.id; } public void setId(long id) { this.id = id; } @Column(name="gelanalysiscode") public String getGelAnalysisCode() { return this.gelAnalysisCode; } public void setGelAnalysisCode(String gelAnalysisCode) { this.gelAnalysisCode = gelAnalysisCode; } @Columns( } ) public MTPlate getMtplate() { return this.mtplate; } public void setMtplate(MTPlate mtplate) { this.mtplate = mtplate; } @OneToMany(fetch=FetchType.EAGER) @JoinColumn(name="GELANALYSISID", updatable=false) @Cascade( {CascadeType.SAVE_UPDATE} ) public Set getImg2Gel() { return this.img2Gel; } public void setImg2Gel(Set img2Gel) { this.img2Gel = img2Gel; } }