package org.gmod.schema.mapped; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; import javax.persistence.UniqueConstraint; import javax.persistence.SequenceGenerator; import javax.persistence.GeneratedValue; import static javax.persistence.GenerationType.SEQUENCE; //Added explicit sequence generation behavious 2.12.2015 /** * PhylonodePub generated by hbm2java */ @Entity @Table(name = "phylonode_pub", uniqueConstraints = { @UniqueConstraint(columnNames = { "phylonode_id", "pub_id" }) }) public class PhylonodePub implements java.io.Serializable { // Fields @SequenceGenerator(name = "generator", sequenceName = "phylonode_pub_phylonode_pub_id_seq", allocationSize=1) @Id @GeneratedValue(strategy = SEQUENCE, generator = "generator") @Column(name = "phylonode_pub_id", unique = true, nullable = false, insertable = true, updatable = true) private int phylonodePubId; @ManyToOne(cascade = {}, fetch = FetchType.LAZY) @JoinColumn(name = "pub_id", unique = false, nullable = false, insertable = true, updatable = true) private Pub pub; @ManyToOne(cascade = {}, fetch = FetchType.LAZY) @JoinColumn(name = "phylonode_id", unique = false, nullable = false, insertable = true, updatable = true) private Phylonode phylonode; // Constructors PhylonodePub() { // Deliberately empty default constructor } /** full constructor */ public PhylonodePub(Pub pub, Phylonode phylonode) { this.pub = pub; this.phylonode = phylonode; } // Property accessors public int getPhylonodePubId() { return this.phylonodePubId; } public Pub getPub() { return this.pub; } void setPub(Pub pub) { this.pub = pub; } public Phylonode getPhylonode() { return this.phylonode; } void setPhylonode(Phylonode phylonode) { this.phylonode = phylonode; } }