package webctdbexport.db;
// Generated 17-Jun-2011 11:38:57 by Hibernate Tools 3.4.0.CR1
import java.math.BigDecimal;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;
/**
* AssmtQuestionLink generated by hbm2java
*/
@Entity
@Table(name="ASSMT_QUESTION_LINK"
)
public class AssmtQuestionLink implements java.io.Serializable {
private BigDecimal id;
private AssmtSectionElement assmtSectionElement;
private AssmtQuestion assmtQuestion;
private BigDecimal points;
private BigDecimal createTs;
private BigDecimal lastmodifyTs;
private Set<AssmtAttemptItem> assmtAttemptItems = new HashSet<AssmtAttemptItem>(0);
public AssmtQuestionLink() {
}
public AssmtQuestionLink(AssmtSectionElement assmtSectionElement, AssmtQuestion assmtQuestion, BigDecimal points, BigDecimal createTs, BigDecimal lastmodifyTs) {
this.assmtSectionElement = assmtSectionElement;
this.assmtQuestion = assmtQuestion;
this.points = points;
this.createTs = createTs;
this.lastmodifyTs = lastmodifyTs;
}
public AssmtQuestionLink(AssmtSectionElement assmtSectionElement, AssmtQuestion assmtQuestion, BigDecimal points, BigDecimal createTs, BigDecimal lastmodifyTs, Set<AssmtAttemptItem> assmtAttemptItems) {
this.assmtSectionElement = assmtSectionElement;
this.assmtQuestion = assmtQuestion;
this.points = points;
this.createTs = createTs;
this.lastmodifyTs = lastmodifyTs;
this.assmtAttemptItems = assmtAttemptItems;
}
@GenericGenerator(name="generator", strategy="foreign", parameters=@Parameter(name="property", value="assmtSectionElement"))@Id @GeneratedValue(generator="generator")
@Column(name="ID", nullable=false, precision=20, scale=0)
public BigDecimal getId() {
return this.id;
}
public void setId(BigDecimal id) {
this.id = id;
}
@OneToOne(fetch=FetchType.LAZY)
public AssmtSectionElement getAssmtSectionElement() {
return this.assmtSectionElement;
}
public void setAssmtSectionElement(AssmtSectionElement assmtSectionElement) {
this.assmtSectionElement = assmtSectionElement;
}
@ManyToOne(fetch=FetchType.LAZY)
@JoinColumn(name="QUESTION_ID", nullable=false)
public AssmtQuestion getAssmtQuestion() {
return this.assmtQuestion;
}
public void setAssmtQuestion(AssmtQuestion assmtQuestion) {
this.assmtQuestion = assmtQuestion;
}
@Column(name="POINTS", nullable=false, precision=8, scale=4)
public BigDecimal getPoints() {
return this.points;
}
public void setPoints(BigDecimal points) {
this.points = points;
}
@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;
}
@OneToMany(fetch=FetchType.LAZY, mappedBy="assmtQuestionLink")
public Set<AssmtAttemptItem> getAssmtAttemptItems() {
return this.assmtAttemptItems;
}
public void setAssmtAttemptItems(Set<AssmtAttemptItem> assmtAttemptItems) {
this.assmtAttemptItems = assmtAttemptItems;
}
}