webnotification for scipro

Change-Id: I6e5e2126c9bcaf5eadcec416b6650872d2530c8d
This commit is contained in:
joha-asc 2011-07-18 16:58:56 +02:00
parent 4cc172b512
commit 30887666ca

@ -0,0 +1,120 @@
/**
*
*/
package se.su.dsv.scipro.data.dataobjects;
import javax.persistence.Cacheable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
/**
* @author Johan Aschan - aschan@dsv.su.se
*
*/
@Entity
@Table(name="web_notification")
@Cacheable(true)
@Cache(usage= CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class WebNotification extends DomainObject{
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
private Long id;
@Lob
private String infoText;
@Lob
private String restRelativeURL;
@ManyToOne(optional=false)
private User user;
private boolean readByUser = false;
@Override
public Long getId() {
return id;
}
/**
* @return the infoText
*/
public String getInfoText() {
return infoText;
}
/**
* @param infoText the infoText to set
*/
public void setInfoText(String infoText) {
this.infoText = infoText;
}
/**
* @return the user
*/
public User getUser() {
return user;
}
/**
* @param user the user to set
*/
public void setUser(User user) {
this.user = user;
}
/**
* @return the readByUser
*/
public boolean isReadByUser() {
return readByUser;
}
/**
* @param readByUser the readByUser to set
*/
public void setReadByUser(boolean readByUser) {
this.readByUser = readByUser;
}
/**
* @return the restRelativeURL
*/
public String getRestRelativeURL() {
return restRelativeURL;
}
/**
* @param restRelativeURL the restRelativeURL to set
*/
public void setRestRelativeURL(String restRelativeURL) {
this.restRelativeURL = restRelativeURL;
}
}