22,6 → 22,8 |
import javax.persistence.Temporal; |
import javax.persistence.TemporalType; |
|
import org.hibernate.annotations.OrderBy; |
|
/** |
* ObjectEntity generated by hbm2java |
*/ |
43,7 → 45,7 |
private Date modified; |
private Boolean deleted; |
private Term term; |
private Set<History> histories = new HashSet<History>(0); |
private Set<History> history = new HashSet<History>(0); |
private Relationship relationship; |
|
/** |
74,7 → 76,7 |
* @param modified |
* @param deleted |
* @param term |
* @param histories |
* @param history |
* @param relationship |
*/ |
public ObjectEntity(User userByEditorId, ObjectType objectType, |
88,7 → 90,7 |
this.modified = modified; |
this.deleted = deleted; |
this.term = term; |
this.histories = histories; |
this.history = histories; |
this.relationship = relationship; |
} |
|
239,17 → 241,18 |
* @return |
*/ |
@OneToMany(fetch = FetchType.LAZY, mappedBy = "object") |
public Set<History> getHistories() |
@OrderBy(clause = "date DESC") |
public Set<History> getHistory() |
{ |
return this.histories; |
return this.history; |
} |
|
/** |
* @param histories |
* @param history |
*/ |
public void setHistories(Set<History> histories) |
public void setHistory(Set<History> history) |
{ |
this.histories = histories; |
this.history = history; |
} |
|
/** |