Rev 33 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 33 | Rev 34 | ||
---|---|---|---|
Line 19... | Line 19... | ||
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 | {
|