package ch.ffhs.webE.domain; // Generated 19.12.2010 14:46:08 by Hibernate Tools 3.4.0.Beta1 import java.util.Date; 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 static javax.persistence.GenerationType.IDENTITY; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.OneToMany; import javax.persistence.OneToOne; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; /** * Object generated by hbm2java */ @Entity @Table(name = "object", catalog = "webengineering") public class Object implements java.io.Serializable { private Integer id; private User userByEditorId; private ObjectType objectType; private User userByOwnerId; private Date locked; private Date modified; private Boolean deleted; private Term term; private Set histories = new HashSet(0); private Relationship relationship; public Object() { } public Object(User userByEditorId, ObjectType objectType, User userByOwnerId) { this.userByEditorId = userByEditorId; this.objectType = objectType; this.userByOwnerId = userByOwnerId; } public Object(User userByEditorId, ObjectType objectType, User userByOwnerId, Date locked, Date modified, Boolean deleted, Term term, Set histories, Relationship relationship) { this.userByEditorId = userByEditorId; this.objectType = objectType; this.userByOwnerId = userByOwnerId; this.locked = locked; this.modified = modified; this.deleted = deleted; this.term = term; this.histories = histories; this.relationship = relationship; } @Id @GeneratedValue(strategy = IDENTITY) @Column(name = "id", unique = true, nullable = false) public Integer getId() { return this.id; } public void setId(Integer id) { this.id = id; } @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "editor_id", nullable = false) public User getUserByEditorId() { return this.userByEditorId; } public void setUserByEditorId(User userByEditorId) { this.userByEditorId = userByEditorId; } @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "object_type_id", nullable = false) public ObjectType getObjectType() { return this.objectType; } public void setObjectType(ObjectType objectType) { this.objectType = objectType; } @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "owner_id", nullable = false) public User getUserByOwnerId() { return this.userByOwnerId; } public void setUserByOwnerId(User userByOwnerId) { this.userByOwnerId = userByOwnerId; } @Temporal(TemporalType.TIMESTAMP) @Column(name = "locked", length = 19) public Date getLocked() { return this.locked; } public void setLocked(Date locked) { this.locked = locked; } @Temporal(TemporalType.TIMESTAMP) @Column(name = "modified", length = 19) public Date getModified() { return this.modified; } public void setModified(Date modified) { this.modified = modified; } @Column(name = "deleted") public Boolean getDeleted() { return this.deleted; } public void setDeleted(Boolean deleted) { this.deleted = deleted; } @OneToOne(fetch = FetchType.LAZY, mappedBy = "object") public Term getTerm() { return this.term; } public void setTerm(Term term) { this.term = term; } @OneToMany(fetch = FetchType.LAZY, mappedBy = "object") public Set getHistories() { return this.histories; } public void setHistories(Set histories) { this.histories = histories; } @OneToOne(fetch = FetchType.LAZY, mappedBy = "object") public Relationship getRelationship() { return this.relationship; } public void setRelationship(Relationship relationship) { this.relationship = relationship; } }