Subversion Repositories WebE

Rev

Rev 21 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 21 Rev 34
Line 1... Line 1...
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 static javax.persistence.GenerationType.IDENTITY;
-
 
6
5
import java.util.HashSet;
7
import java.util.HashSet;
6
import java.util.Set;
8
import java.util.Set;
-
 
9
7
import javax.persistence.Column;
10
import javax.persistence.Column;
8
import javax.persistence.Entity;
11
import javax.persistence.Entity;
9
import javax.persistence.FetchType;
12
import javax.persistence.FetchType;
10
import javax.persistence.GeneratedValue;
13
import javax.persistence.GeneratedValue;
11
import static javax.persistence.GenerationType.IDENTITY;
-
 
12
import javax.persistence.Id;
14
import javax.persistence.Id;
13
import javax.persistence.OneToMany;
15
import javax.persistence.OneToMany;
14
import javax.persistence.Table;
16
import javax.persistence.Table;
15
import javax.persistence.UniqueConstraint;
17
import javax.persistence.UniqueConstraint;
16
18
17
/**
19
/**
18
 * RelationshipType generated by hbm2java
20
 * RelationshipType generated by hbm2java
19
 */
21
 */
20
@Entity
22
@Entity
21
@Table(name = "relationship_type", catalog = "webengineering", uniqueConstraints = @UniqueConstraint(columnNames = "name_from"))
23
@Table(name = "relationship_type", catalog = "webengineering", uniqueConstraints = @UniqueConstraint(columnNames = "name_from"))
22
public class RelationshipType implements java.io.Serializable {
24
public class RelationshipType implements java.io.Serializable
-
 
25
{
23
26
24
        private Integer relationshipId;
27
  private Integer id;
25
        private String nameFrom;
28
  private String nameFrom;
26
        private String nameTo;
29
  private String nameTo;
27
        private Set<Relationship> relationships = new HashSet<Relationship>(0);
30
  private Set<Relationship> relationships = new HashSet<Relationship>(0);
28
31
29
        public RelationshipType() {
32
  public RelationshipType()
-
 
33
  {
30
        }
34
  }
31
35
32
        public RelationshipType(String nameFrom, String nameTo) {
36
  public RelationshipType(String nameFrom, String nameTo)
-
 
37
  {
33
                this.nameFrom = nameFrom;
38
    this.nameFrom = nameFrom;
34
                this.nameTo = nameTo;
39
    this.nameTo = nameTo;
35
        }
40
  }
36
41
37
        public RelationshipType(String nameFrom, String nameTo,
42
  public RelationshipType(String nameFrom, String nameTo,
38
                        Set<Relationship> relationships) {
43
      Set<Relationship> relationships)
-
 
44
  {
39
                this.nameFrom = nameFrom;
45
    this.nameFrom = nameFrom;
40
                this.nameTo = nameTo;
46
    this.nameTo = nameTo;
41
                this.relationships = relationships;
47
    this.relationships = relationships;
42
        }
48
  }
43
49
44
        @Id
50
  @Id
45
        @GeneratedValue(strategy = IDENTITY)
51
  @GeneratedValue(strategy = IDENTITY)
46
        @Column(name = "relationship_id", unique = true, nullable = false)
52
  @Column(name = "id", unique = true, nullable = false)
47
        public Integer getRelationshipId() {
53
  public Integer getId()
-
 
54
  {
48
                return this.relationshipId;
55
    return this.id;
49
        }
56
  }
50
57
51
        public void setRelationshipId(Integer relationshipId) {
58
  public void setId(Integer id)
-
 
59
  {
52
                this.relationshipId = relationshipId;
60
    this.id = id;
53
        }
61
  }
54
62
55
        @Column(name = "name_from", unique = true, nullable = false)
63
  @Column(name = "name_from", unique = true, nullable = false)
56
        public String getNameFrom() {
64
  public String getNameFrom()
-
 
65
  {
57
                return this.nameFrom;
66
    return this.nameFrom;
58
        }
67
  }
59
68
60
        public void setNameFrom(String nameFrom) {
69
  public void setNameFrom(String nameFrom)
-
 
70
  {
61
                this.nameFrom = nameFrom;
71
    this.nameFrom = nameFrom;
62
        }
72
  }
63
73
64
        @Column(name = "name_to", nullable = false)
74
  @Column(name = "name_to", nullable = false)
65
        public String getNameTo() {
75
  public String getNameTo()
-
 
76
  {
66
                return this.nameTo;
77
    return this.nameTo;
67
        }
78
  }
68
79
69
        public void setNameTo(String nameTo) {
80
  public void setNameTo(String nameTo)
-
 
81
  {
70
                this.nameTo = nameTo;
82
    this.nameTo = nameTo;
71
        }
83
  }
72
84
73
        @OneToMany(fetch = FetchType.LAZY, mappedBy = "relationshipType")
85
  @OneToMany(fetch = FetchType.LAZY, mappedBy = "relationshipType")
74
        public Set<Relationship> getRelationships() {
86
  public Set<Relationship> getRelationships()
-
 
87
  {
75
                return this.relationships;
88
    return this.relationships;
76
        }
89
  }
77
90
78
        public void setRelationships(Set<Relationship> relationships) {
91
  public void setRelationships(Set<Relationship> relationships)
-
 
92
  {
79
                this.relationships = relationships;
93
    this.relationships = relationships;
80
        }
94
  }
81
95
82
}
96
}