Rev 33 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 33 | Rev 37 | ||
---|---|---|---|
Line 20... | Line 20... | ||
20 | import javax.persistence.OneToOne; |
20 | import javax.persistence.OneToOne; |
21 | import javax.persistence.Table; |
21 | import javax.persistence.Table; |
22 | import javax.persistence.Temporal; |
22 | import javax.persistence.Temporal; |
23 | import javax.persistence.TemporalType; |
23 | import javax.persistence.TemporalType; |
24 | 24 | ||
- | 25 | import org.hibernate.annotations.OrderBy; |
|
- | 26 | ||
25 | /**
|
27 | /**
|
26 | * ObjectEntity generated by hbm2java
|
28 | * ObjectEntity generated by hbm2java
|
27 | */
|
29 | */
|
28 | @Entity |
30 | @Entity |
29 | @Table(name = "object", catalog = "webengineering") |
31 | @Table(name = "object", catalog = "webengineering") |
Line 41... | Line 43... | ||
41 | private User userByOwnerId; |
43 | private User userByOwnerId; |
42 | private Date locked; |
44 | private Date locked; |
43 | private Date modified; |
45 | private Date modified; |
44 | private Boolean deleted; |
46 | private Boolean deleted; |
45 | private Term term; |
47 | private Term term; |
46 | private Set<History> histories = new HashSet<History>(0); |
48 | private Set<History> history = new HashSet<History>(0); |
47 | private Relationship relationship; |
49 | private Relationship relationship; |
48 | 50 | ||
49 | /**
|
51 | /**
|
50 | *
|
52 | *
|
51 | */
|
53 | */
|
Line 72... | Line 74... | ||
72 | * @param userByOwnerId
|
74 | * @param userByOwnerId
|
73 | * @param locked
|
75 | * @param locked
|
74 | * @param modified
|
76 | * @param modified
|
75 | * @param deleted
|
77 | * @param deleted
|
76 | * @param term
|
78 | * @param term
|
77 | * @param histories
|
79 | * @param history
|
78 | * @param relationship
|
80 | * @param relationship
|
79 | */
|
81 | */
|
80 | public ObjectEntity(User userByEditorId, ObjectType objectType, |
82 | public ObjectEntity(User userByEditorId, ObjectType objectType, |
81 | User userByOwnerId, Date locked, Date modified, Boolean deleted, |
83 | User userByOwnerId, Date locked, Date modified, Boolean deleted, |
82 | Term term, Set<History> histories, Relationship relationship) |
84 | Term term, Set<History> histories, Relationship relationship) |
Line 86... | Line 88... | ||
86 | this.userByOwnerId = userByOwnerId; |
88 | this.userByOwnerId = userByOwnerId; |
87 | this.locked = locked; |
89 | this.locked = locked; |
88 | this.modified = modified; |
90 | this.modified = modified; |
89 | this.deleted = deleted; |
91 | this.deleted = deleted; |
90 | this.term = term; |
92 | this.term = term; |
91 | this.histories = histories; |
93 | this.history = histories; |
92 | this.relationship = relationship; |
94 | this.relationship = relationship; |
93 | }
|
95 | }
|
94 | 96 | ||
95 | /**
|
97 | /**
|
96 | * @return
|
98 | * @return
|
Line 237... | Line 239... | ||
237 | 239 | ||
238 | /**
|
240 | /**
|
239 | * @return
|
241 | * @return
|
240 | */
|
242 | */
|
241 | @OneToMany(fetch = FetchType.LAZY, mappedBy = "object") |
243 | @OneToMany(fetch = FetchType.LAZY, mappedBy = "object") |
- | 244 | @OrderBy(clause = "date DESC") |
|
242 | public Set<History> getHistories() |
245 | public Set<History> getHistory() |
243 | {
|
246 | {
|
244 | return this.histories; |
247 | return this.history; |
245 | }
|
248 | }
|
246 | 249 | ||
247 | /**
|
250 | /**
|
248 | * @param histories
|
251 | * @param history
|
249 | */
|
252 | */
|
250 | public void setHistories(Set<History> histories) |
253 | public void setHistory(Set<History> history) |
251 | {
|
254 | {
|
252 | this.histories = histories; |
255 | this.history = history; |
253 | }
|
256 | }
|
254 | 257 | ||
255 | /**
|
258 | /**
|
256 | * @return
|
259 | * @return
|
257 | */
|
260 | */
|