package org.gmod.schema.mapped; // Generated Aug 31, 2006 4:02:18 PM by Hibernate Tools 3.2.0.beta7 import static javax.persistence.GenerationType.SEQUENCE; //Added explicit sequence generation behaviour 2.12.2015 import java.util.Collection; import java.util.Collections; import java.util.HashSet; import javax.persistence.CascadeType; 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.OneToMany; import javax.persistence.Table; import javax.persistence.UniqueConstraint; import javax.persistence.SequenceGenerator; import javax.persistence.GeneratedValue; /** * Phylonode generated by hbm2java */ @Entity @Table(name = "phylonode", uniqueConstraints = { @UniqueConstraint(columnNames = { "phylotree_id", "left_idx" }), @UniqueConstraint(columnNames = { "phylotree_id", "right_idx" }) }) public class Phylonode implements java.io.Serializable { // Fields @SequenceGenerator(name = "generator", sequenceName = "phylonode_phylonode_id_seq", allocationSize=1) @Id @GeneratedValue(strategy = SEQUENCE, generator = "generator") @Column(name = "phylonode_id", unique = true, nullable = false, insertable = true, updatable = true) private int phylonodeId; @ManyToOne(cascade = {}, fetch = FetchType.LAZY) @JoinColumn(name = "phylotree_id", unique = false, nullable = false, insertable = true, updatable = true) private Phylotree phylotree; @ManyToOne(cascade = {}, fetch = FetchType.LAZY) @JoinColumn(name = "parent_phylonode_id", unique = false, nullable = true, insertable = true, updatable = true) private Phylonode parent; @ManyToOne(cascade = {}, fetch = FetchType.LAZY) @JoinColumn(name = "type_id", unique = false, nullable = true, insertable = true, updatable = true) private CvTerm cvTerm; @ManyToOne(cascade = {}, fetch = FetchType.LAZY) @JoinColumn(name = "feature_id", unique = false, nullable = true, insertable = true, updatable = true) private Feature feature; @Column(name = "left_idx", unique = false, nullable = false, insertable = true, updatable = true) private int leftIdx; @Column(name = "right_idx", unique = false, nullable = false, insertable = true, updatable = true) private int rightIdx; @Column(name = "label", unique = false, nullable = true, insertable = true, updatable = true) private String label; @Column(name = "distance", unique = false, nullable = true, insertable = true, updatable = true, precision = 17, scale = 17) private Double distance; @OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "phylonodeByObjectId") private Collection<PhylonodeRelationship> phylonodeRelationshipsForObjectId; @OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "phylonode") private Collection<PhylonodeOrganism> phylonodeOrganisms; @OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "phylonode") private Collection<PhylonodePub> phylonodePubs; @OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "phylonodeBySubjectId") private Collection<PhylonodeRelationship> phylonodeRelationshipsForSubjectId; @OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "phylonode") private Collection<PhylonodeDbXRef> phylonodeDbXRefs; @OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "phylonode") private Collection<PhylonodeProp> phylonodeProps; @OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "parent") private Collection<Phylonode> children; // Constructors Phylonode() { // Deliberately empty default constructor } /** minimal constructor */ public Phylonode(Phylotree phylotree, int leftIdx, int rightIdx) { this.phylotree = phylotree; this.leftIdx = leftIdx; this.rightIdx = rightIdx; } /** full constructor */ public Phylonode(Phylotree phylotree, Phylonode parent, CvTerm cvTerm, Feature feature, int leftIdx, int rightIdx, String label, Double distance, Collection<PhylonodeRelationship> phylonodeRelationshipsForObjectId, Collection<PhylonodeOrganism> phylonodeOrganisms, Collection<PhylonodePub> phylonodePubs, Collection<PhylonodeRelationship> phylonodeRelationshipsForSubjectId) { this(phylotree, leftIdx, rightIdx); this.parent = parent; this.cvTerm = cvTerm; this.feature = feature; this.label = label; this.distance = distance; this.phylonodeRelationshipsForObjectId = phylonodeRelationshipsForObjectId; this.phylonodeOrganisms = phylonodeOrganisms; this.phylonodePubs = phylonodePubs; this.phylonodeRelationshipsForSubjectId = phylonodeRelationshipsForSubjectId; } // Property accessors public int getPhylonodeId() { return this.phylonodeId; } public Phylotree getPhylotree() { return this.phylotree; } void setPhylotree(Phylotree phylotree) { this.phylotree = phylotree; } public Phylonode getParent() { return this.parent; } void setParent(Phylonode parent) { this.parent = parent; } public CvTerm getCvTerm() { return this.cvTerm; } void setCvTerm(CvTerm cvTerm) { this.cvTerm = cvTerm; } public Feature getFeature() { return this.feature; } void setFeature(Feature feature) { this.feature = feature; } public int getLeftIdx() { return this.leftIdx; } void setLeftIdx(int leftIdx) { this.leftIdx = leftIdx; } public int getRightIdx() { return this.rightIdx; } void setRightIdx(int rightIdx) { this.rightIdx = rightIdx; } public String getLabel() { return this.label; } void setLabel(String label) { this.label = label; } public Double getDistance() { return this.distance; } void setDistance(Double distance) { this.distance = distance; } public Collection<PhylonodeRelationship> getPhylonodeRelationshipsForObjectId() { return Collections.unmodifiableCollection(this.phylonodeRelationshipsForObjectId); } public Collection<PhylonodeOrganism> getPhylonodeOrganisms() { return this.phylonodeOrganisms; } public Collection<Pub> getPubs() { Collection<Pub> pubs = new HashSet<Pub>(); for (PhylonodePub phylonodePub: this.phylonodePubs) { pubs.add(phylonodePub.getPub()); } return Collections.unmodifiableCollection(pubs); } public Collection<PhylonodeRelationship> getPhylonodeRelationshipsForSubjectId() { return Collections.unmodifiableCollection(this.phylonodeRelationshipsForSubjectId); } public Collection<DbXRef> getDbXRefs() { Collection<DbXRef> dbXRefs = new HashSet<DbXRef>(); for (PhylonodeDbXRef phylonodeDbXRef: this.phylonodeDbXRefs) { dbXRefs.add(phylonodeDbXRef.getDbXRef()); } return Collections.unmodifiableCollection(dbXRefs); } public Collection<PhylonodeProp> getPhylonodeProps() { return Collections.unmodifiableCollection(this.phylonodeProps); } public Collection<Phylonode> getPhylonodes() { return Collections.unmodifiableCollection(children); } }