Subversion Repositories WebE

Rev

Rev 21 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
21 moos 1
package ch.ffhs.webE.domain;
2
 
3
// Generated 19.12.2010 14:46:08 by Hibernate Tools 3.4.0.Beta1
4
 
5
import java.util.HashSet;
6
import java.util.Set;
33 PointedEar 7
 
21 moos 8
import javax.persistence.Column;
9
import javax.persistence.Entity;
10
import javax.persistence.FetchType;
11
import javax.persistence.Id;
12
import javax.persistence.OneToMany;
13
import javax.persistence.Table;
14
import javax.persistence.UniqueConstraint;
15
 
16
/**
17
 * ObjectType generated by hbm2java
18
 */
19
@Entity
20
@Table(name = "object_type", catalog = "webengineering", uniqueConstraints = @UniqueConstraint(columnNames = "name"))
33 PointedEar 21
public class ObjectType implements java.io.Serializable
22
{
23
  /**
24
   * ObjectEntity type ID for a term
25
   */
26
  public static final int TERM = 1;
21 moos 27
 
33 PointedEar 28
  private int objectTypeId;
29
  private String name;
30
  private Set<ObjectEntity> objects = new HashSet<ObjectEntity>(0);
21 moos 31
 
33 PointedEar 32
  public ObjectType()
33
  {
34
  }
21 moos 35
 
33 PointedEar 36
  public ObjectType(int objectTypeId)
37
  {
38
    this.objectTypeId = objectTypeId;
39
  }
21 moos 40
 
33 PointedEar 41
  public ObjectType(int objectTypeId, String name, Set<ObjectEntity> objects)
42
  {
43
    this.objectTypeId = objectTypeId;
44
    this.name = name;
45
    this.objects = objects;
46
  }
21 moos 47
 
33 PointedEar 48
  @Id
49
  @Column(name = "object_type_id", unique = true, nullable = false)
50
  public int getObjectTypeId()
51
  {
52
    return this.objectTypeId;
53
  }
21 moos 54
 
33 PointedEar 55
  public void setObjectTypeId(int objectTypeId)
56
  {
57
    this.objectTypeId = objectTypeId;
58
  }
21 moos 59
 
33 PointedEar 60
  @Column(name = "name", unique = true, length = 45)
61
  public String getName()
62
  {
63
    return this.name;
64
  }
21 moos 65
 
33 PointedEar 66
  public void setName(String name)
67
  {
68
    this.name = name;
69
  }
21 moos 70
 
33 PointedEar 71
  @OneToMany(fetch = FetchType.LAZY, mappedBy = "objectType")
72
  public Set<ObjectEntity> getObjects()
73
  {
74
    return this.objects;
75
  }
21 moos 76
 
33 PointedEar 77
  public void setObjects(Set<ObjectEntity> objects)
78
  {
79
    this.objects = objects;
80
  }
21 moos 81
 
82
}