package ch.ffhs.webE.domain; // Generated 19.12.2010 14:46:08 by Hibernate Tools 3.4.0.Beta1 import java.util.HashSet; import java.util.Set; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.Id; import javax.persistence.OneToMany; import javax.persistence.Table; import javax.persistence.UniqueConstraint; /** * ObjectType generated by hbm2java */ @Entity @Table(name = "object_type", catalog = "webengineering", uniqueConstraints = @UniqueConstraint(columnNames = "name")) public class ObjectType implements java.io.Serializable { /** * Version ID for serialization */ private static final long serialVersionUID = 1L; /** * ObjectEntity type ID for a term */ public static final int TERM = 1; /** * ObjectEntity type ID for a relationship */ public static final int RELATIONSHIP = 2; private int id; private String name; private Set objects = new HashSet(0); public ObjectType() { } public ObjectType(int id) { this.id = id; } public ObjectType(int id, String name, Set objects) { this.id = id; this.name = name; this.objects = objects; } @Id @Column(name = "id", unique = true, nullable = false) public int getId() { return this.id; } public void setId(int objectTypeId) { this.id = objectTypeId; } @Column(name = "name", unique = true, length = 45) public String getName() { return this.name; } public void setName(String name) { this.name = name; } @OneToMany(fetch = FetchType.LAZY, mappedBy = "objectType") public Set getObjects() { return this.objects; } public void setObjects(Set objects) { this.objects = objects; } }