Comments
git-svn-id: svn://svn.dsv.su.se/scipro/scipro/trunk@258 73ecded7-942e-4092-bab0-0e58ef0ee984
This commit is contained in:
parent
8a4c2d9a21
commit
39c052c468
src/main/java/se/su/dsv/scipro/data/dataobjects
@ -5,6 +5,7 @@ package se.su.dsv.scipro.data.dataobjects;
|
||||
|
||||
import javax.persistence.Cacheable;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Lob;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.Cache;
|
||||
@ -19,5 +20,16 @@ import org.hibernate.annotations.CacheConcurrencyStrategy;
|
||||
@Cacheable(true)
|
||||
@Cache(usage= CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
|
||||
public class Comment extends Ratable {
|
||||
|
||||
@Lob
|
||||
private String comment;
|
||||
|
||||
public String getComment() {
|
||||
return comment;
|
||||
}
|
||||
|
||||
public void setComment(String comment) {
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,73 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package se.su.dsv.scipro.data.dataobjects;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.Cacheable;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.Cache;
|
||||
import org.hibernate.annotations.CacheConcurrencyStrategy;
|
||||
|
||||
/**
|
||||
* @author Johan Aschan - aschan@dsv.su.se
|
||||
*
|
||||
*/
|
||||
@Entity
|
||||
@Table(name="thread")
|
||||
@Cacheable(true)
|
||||
@Cache(usage= CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
|
||||
public class CommentThread extends DomainObject{
|
||||
|
||||
@Id
|
||||
@GeneratedValue
|
||||
private Long id;
|
||||
|
||||
private String className;
|
||||
private Long classId;
|
||||
|
||||
@OneToMany
|
||||
private List<Comment> commentList = new ArrayList<Comment>();
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see se.su.dsv.scipro.data.dataobjects.DomainObject#getId()
|
||||
*/
|
||||
@Override
|
||||
public Long getId() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
public Long getClassId() {
|
||||
return classId;
|
||||
}
|
||||
|
||||
public void setClassId(Long classId) {
|
||||
this.classId = classId;
|
||||
}
|
||||
|
||||
public List<Comment> getCommentList() {
|
||||
return commentList;
|
||||
}
|
||||
|
||||
public void setCommentList(List<Comment> commentList) {
|
||||
this.commentList = commentList;
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user