Subversion Repositories WebE

Rev

Rev 33 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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