package webctdbexport.db;
// Generated 17-Jun-2011 11:38:57 by Hibernate Tools 3.4.0.CR1
import java.math.BigDecimal;
import java.sql.Clob;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
/**
* Announcement generated by hbm2java
*/
@Entity
@Table(name="ANNOUNCEMENT"
)
public class Announcement implements java.io.Serializable {
private BigDecimal id;
private LearningContext learningContextByCreatedInLcid;
private Person person;
private LearningContext learningContextByDeliverToLcid;
private BigDecimal startTimestamp;
private String title;
private Clob content;
private boolean deliverAsPopup;
private boolean htmlContent;
private BigDecimal createTs;
private BigDecimal lastmodifyTs;
private BigDecimal endTimestamp;
private Set<AnnouncementRole> announcementRoles = new HashSet<AnnouncementRole>(0);
private Set<AnnouncementPersonRead> announcementPersonReads = new HashSet<AnnouncementPersonRead>(0);
public Announcement() {
}
public Announcement(BigDecimal id, LearningContext learningContextByCreatedInLcid, Person person, LearningContext learningContextByDeliverToLcid, BigDecimal startTimestamp, String title, boolean deliverAsPopup, boolean htmlContent, BigDecimal createTs, BigDecimal lastmodifyTs) {
this.id = id;
this.learningContextByCreatedInLcid = learningContextByCreatedInLcid;
this.person = person;
this.learningContextByDeliverToLcid = learningContextByDeliverToLcid;
this.startTimestamp = startTimestamp;
this.title = title;
this.deliverAsPopup = deliverAsPopup;
this.htmlContent = htmlContent;
this.createTs = createTs;
this.lastmodifyTs = lastmodifyTs;
}
public Announcement(BigDecimal id, LearningContext learningContextByCreatedInLcid, Person person, LearningContext learningContextByDeliverToLcid, BigDecimal startTimestamp, String title, Clob content, boolean deliverAsPopup, boolean htmlContent, BigDecimal createTs, BigDecimal lastmodifyTs, BigDecimal endTimestamp, Set<AnnouncementRole> announcementRoles, Set<AnnouncementPersonRead> announcementPersonReads) {
this.id = id;
this.learningContextByCreatedInLcid = learningContextByCreatedInLcid;
this.person = person;
this.learningContextByDeliverToLcid = learningContextByDeliverToLcid;
this.startTimestamp = startTimestamp;
this.title = title;
this.content = content;
this.deliverAsPopup = deliverAsPopup;
this.htmlContent = htmlContent;
this.createTs = createTs;
this.lastmodifyTs = lastmodifyTs;
this.endTimestamp = endTimestamp;
this.announcementRoles = announcementRoles;
this.announcementPersonReads = announcementPersonReads;
}
@Id
@Column(name="ID", nullable=false, precision=20, scale=0)
public BigDecimal getId() {
return this.id;
}
public void setId(BigDecimal id) {
this.id = id;
}
@ManyToOne(fetch=FetchType.LAZY)
@JoinColumn(name="CREATED_IN_LCID", nullable=false)
public LearningContext getLearningContextByCreatedInLcid() {
return this.learningContextByCreatedInLcid;
}
public void setLearningContextByCreatedInLcid(LearningContext learningContextByCreatedInLcid) {
this.learningContextByCreatedInLcid = learningContextByCreatedInLcid;
}
@ManyToOne(fetch=FetchType.LAZY)
@JoinColumn(name="PERSON_ID", nullable=false)
public Person getPerson() {
return this.person;
}
public void setPerson(Person person) {
this.person = person;
}
@ManyToOne(fetch=FetchType.LAZY)
@JoinColumn(name="DELIVER_TO_LCID", nullable=false)
public LearningContext getLearningContextByDeliverToLcid() {
return this.learningContextByDeliverToLcid;
}
public void setLearningContextByDeliverToLcid(LearningContext learningContextByDeliverToLcid) {
this.learningContextByDeliverToLcid = learningContextByDeliverToLcid;
}
@Column(name="START_TIMESTAMP", nullable=false, precision=20, scale=0)
public BigDecimal getStartTimestamp() {
return this.startTimestamp;
}
public void setStartTimestamp(BigDecimal startTimestamp) {
this.startTimestamp = startTimestamp;
}
@Column(name="TITLE", nullable=false, length=1000)
public String getTitle() {
return this.title;
}
public void setTitle(String title) {
this.title = title;
}
@Column(name="CONTENT")
public Clob getContent() {
return this.content;
}
public void setContent(Clob content) {
this.content = content;
}
@Column(name="DELIVER_AS_POPUP", nullable=false, precision=1, scale=0)
public boolean isDeliverAsPopup() {
return this.deliverAsPopup;
}
public void setDeliverAsPopup(boolean deliverAsPopup) {
this.deliverAsPopup = deliverAsPopup;
}
@Column(name="HTML_CONTENT", nullable=false, precision=1, scale=0)
public boolean isHtmlContent() {
return this.htmlContent;
}
public void setHtmlContent(boolean htmlContent) {
this.htmlContent = htmlContent;
}
@Column(name="CREATE_TS", nullable=false, precision=20, scale=0)
public BigDecimal getCreateTs() {
return this.createTs;
}
public void setCreateTs(BigDecimal createTs) {
this.createTs = createTs;
}
@Column(name="LASTMODIFY_TS", nullable=false, precision=20, scale=0)
public BigDecimal getLastmodifyTs() {
return this.lastmodifyTs;
}
public void setLastmodifyTs(BigDecimal lastmodifyTs) {
this.lastmodifyTs = lastmodifyTs;
}
@Column(name="END_TIMESTAMP", precision=20, scale=0)
public BigDecimal getEndTimestamp() {
return this.endTimestamp;
}
public void setEndTimestamp(BigDecimal endTimestamp) {
this.endTimestamp = endTimestamp;
}
@OneToMany(fetch=FetchType.LAZY, mappedBy="announcement")
public Set<AnnouncementRole> getAnnouncementRoles() {
return this.announcementRoles;
}
public void setAnnouncementRoles(Set<AnnouncementRole> announcementRoles) {
this.announcementRoles = announcementRoles;
}
@OneToMany(fetch=FetchType.LAZY, mappedBy="announcement")
public Set<AnnouncementPersonRead> getAnnouncementPersonReads() {
return this.announcementPersonReads;
}
public void setAnnouncementPersonReads(Set<AnnouncementPersonRead> announcementPersonReads) {
this.announcementPersonReads = announcementPersonReads;
}
}