Commit ae6a08ed authored by prumde's avatar prumde

Added new Table Beans for Course Master and Transaction tables

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@199198 ce508802-f39f-4f6c-b175-0d175dae99d5
parent fdb01d41
package ibase.dashboard.common.hibernate.bean;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.search.annotations.Analyze;
import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Indexed;
import org.hibernate.search.annotations.Store;
import org.json.JSONObject;
/*
COURSE_CODE CHAR(10) [PK] Course Code
DESCR VARCHAR2(120) Course Description
COURSE_SUB VARCHAR2(25) Course Subject (Should be defined in GENCODES)
START_DATE DATE Course Start Date - Validity of course starts
END_DATE DATE Course End Date - Validity of course ends
COURSE_TAG VARCHAR2(100) Course tags enter while creating course
NO_CONTENTS NUMBER(3) No of Contents attached
QUES_SET_NOS NUMBER(3) No of Questions added
RATING_METHOD CHAR(1) Rating Method : 1 - Percentage | 2 - Pass / Fail | 3 - Grade ?
CHG_USER CHAR(10) Change User
CHG_DATE DATE Change Date
CHG_TERM VARCHAR2(300) Change Terminal
*/
@Indexed
@Entity
@Table(name = "COURSE")
@XmlRootElement(name = "Course")
public class Course implements java.io.Serializable {
private static final long serialVersionUID = 1L;
@Id
@Field(store = Store.YES, analyze = Analyze.NO)
@Column(name = "COURSE_CODE")
private String courseCode;
@Column(name = "DESCR")
private String descr;
@Column(name = "COURSE_SUB")
private String courseSub;
@Column(name = "START_DATE")
private Date startDate;
@Column(name = "END_DATE")
private Date endDate;
@Column(name = "COURSE_TAG")
private String courseTag;
@Column(name = "NO_CONTENTS")
private int noContents;
@Column(name = "QUES_SET_NOS")
private int quesSetNos;
@Column(name = "RATING_METHOD")
private String ratingMethod;
@Column(name = "CHG_USER")
private String chgUser;
@Column(name = "CHG_DATE")
private Date chgDate;
@Column(name = "CHG_TERM")
private String chgTerm;
public Course() {
}
public Course(String courseCode, String descr, String courseSub, Date startDate, Date endDate, String courseTag,
int noContents, int quesSetNos, String ratingMethod, String chgUser, Date chgDate, String chgTerm) {
this.courseCode = courseCode;
this.descr = descr;
this.courseSub = courseSub;
this.startDate = startDate;
this.endDate = endDate;
this.courseTag = courseTag;
this.noContents = noContents;
this.quesSetNos = quesSetNos;
this.ratingMethod = ratingMethod;
this.chgUser = chgUser;
this.chgDate = chgDate;
this.chgTerm = chgTerm;
}
public String getCourseCode() {
return courseCode;
}
public void setCourseCode(String courseCode) {
this.courseCode = courseCode;
}
public String getDescr() {
return descr;
}
public void setDescr(String descr) {
this.descr = descr;
}
public String getCourseSub() {
return courseSub;
}
public void setCourseSub(String courseSub) {
this.courseSub = courseSub;
}
public Date getStartDate() {
return startDate;
}
public void setStartDate(Date startDate) {
this.startDate = startDate;
}
public Date getEndDate() {
return endDate;
}
public void setEndDate(Date endDate) {
this.endDate = endDate;
}
public String getCourseTag() {
return courseTag;
}
public void setCourseTag(String courseTag) {
this.courseTag = courseTag;
}
public int getNoContents() {
return noContents;
}
public void setNoContents(int noContents) {
this.noContents = noContents;
}
public int getQuesSetNos() {
return quesSetNos;
}
public void setQuesSetNos(int quesSetNos) {
this.quesSetNos = quesSetNos;
}
public String getRatingMethod() {
return ratingMethod;
}
public void setRatingMethod(String ratingMethod) {
this.ratingMethod = ratingMethod;
}
public String getChgUser() {
return chgUser;
}
public void setChgUser(String chgUser) {
this.chgUser = chgUser;
}
public Date getChgDate() {
return chgDate;
}
public void setChgDate(Date chgDate) {
this.chgDate = chgDate;
}
public String getChgTerm() {
return chgTerm;
}
public void setChgTerm(String chgTerm) {
this.chgTerm = chgTerm;
}
@Override
public String toString() {
return "\n Course.toString >> [" + new JSONObject(this).toString() + "]";
}
}
package ibase.dashboard.common.hibernate.bean;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.search.annotations.Analyze;
import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Indexed;
import org.hibernate.search.annotations.Store;
import org.json.JSONObject;
/*
USER_ID CHAR(10) [PK] User ID
COURSE_CODE CHAR(10) [PK] Course Code
START_DATE DATE Start Date
LAST_INTER_DATE DATE Last Interaction date
COURSE_STATUS CHAR(1) Course Status : P - Pending | C - Completed
STATUS_DATE DATE Course Status Date
COURSE_RATING CHAR(10) Rating Data provided by user : <value%> Percentage | Pass / Fail | Grades ?
*/
@Indexed
@Entity
@Table(name = "COURSE_ATTEND")
@XmlRootElement(name = "CourseAttend")
public class CourseAttend implements java.io.Serializable {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "USER_ID")
@Field(store = Store.YES, analyze = Analyze.NO)
private String userId;
@Id
@Field(store = Store.YES, analyze = Analyze.NO)
@Column(name = "COURSE_CODE")
private String courseCode;
@Column(name = "START_DATE")
private Date startDate;
@Column(name = "LAST_INTER_DATE")
private Date lastInterDate;
@Column(name = "COURSE_STATUS")
private String courseStatus;
@Column(name = "STATUS_DATE")
private Date statusDate;
@Column(name = "COURSE_RATING")
private String courseRating;
public CourseAttend() {
}
public CourseAttend(String userId, String courseCode, Date startDate, Date lastInterDate, String courseStatus,
Date statusDate, String courseRating) {
this.userId = userId;
this.courseCode = courseCode;
this.startDate = startDate;
this.lastInterDate = lastInterDate;
this.courseStatus = courseStatus;
this.statusDate = statusDate;
this.courseRating = courseRating;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getCourseCode() {
return courseCode;
}
public void setCourseCode(String courseCode) {
this.courseCode = courseCode;
}
public Date getStartDate() {
return startDate;
}
public void setStartDate(Date startDate) {
this.startDate = startDate;
}
public Date getLastInterDate() {
return lastInterDate;
}
public void setLastInterDate(Date lastInterDate) {
this.lastInterDate = lastInterDate;
}
public String getCourseStatus() {
return courseStatus;
}
public boolean isCompleted() {
return "C".equalsIgnoreCase(courseStatus);
}
public void setCourseStatus(String courseStatus) {
this.courseStatus = courseStatus;
}
public Date getStatusDate() {
return statusDate;
}
public void setStatusDate(Date statusDate) {
this.statusDate = statusDate;
}
public String getCourseRating() {
return courseRating;
}
public void setCourseRating(String courseRating) {
this.courseRating = courseRating;
}
@Override
public String toString() {
return "\n CourseAttend.toString >> [" + new JSONObject(this).toString() + "]";
}
}
package ibase.dashboard.common.hibernate.bean;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.search.annotations.Analyze;
import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Indexed;
import org.hibernate.search.annotations.Store;
import org.json.JSONObject;
/*
COURSE_CODE CHAR(10) [PK] Course Code
CONTENT_NAME VARCHAR2(60) [PK] Content Name
ATTACHMENT CHAR(10) Attached contents - DOC_ID
CONTENT_DESCR VARCHAR2(120) Content Description
SEQ_NO NUMBER(4) Same as Line Number
*/
@Indexed
@Entity
@Table(name = "COURSE_CONTENT")
@XmlRootElement(name = "CourseContent")
public class CourseContent implements java.io.Serializable {
private static final long serialVersionUID = 1L;
@Id
@Field(store = Store.YES, analyze = Analyze.NO)
@Column(name = "COURSE_CODE")
private String courseCode;
@Id
@Field(store = Store.YES, analyze = Analyze.NO)
@Column(name = "CONTENT_NAME")
private String contentName;
@Column(name = "ATTACHMENT")
private String attachment;
@Column(name = "CONTENT_DESCR")
private String contentDescr;
@Column(name = "SEQ_NO")
private int seqNo;
public CourseContent() {
}
public CourseContent(String courseCode, String contentName, int seqNo, String attachment, String contentDescr) {
this.courseCode = courseCode;
this.contentName = contentName;
this.seqNo = seqNo;
this.attachment = attachment;
this.contentDescr = contentDescr;
}
public String getCourseCode() {
return courseCode;
}
public void setCourseCode(String courseCode) {
this.courseCode = courseCode;
}
public String getContentName() {
return contentName;
}
public void setContentName(String contentName) {
this.contentName = contentName;
}
public String getAttachment() {
return attachment;
}
public void setAttachment(String attachment) {
this.attachment = attachment;
}
public String getContentDescr() {
return contentDescr;
}
public void setContentDescr(String contentDescr) {
this.contentDescr = contentDescr;
}
public int getSeqNo() {
return seqNo;
}
public void setSeqNo(int seqNo) {
this.seqNo = seqNo;
}
@Override
public String toString() {
return "\n CourseContent.toString >> [" + new JSONObject(this).toString() + "]";
}
}
package ibase.dashboard.common.hibernate.bean;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.search.annotations.Analyze;
import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Indexed;
import org.hibernate.search.annotations.Store;
import org.json.JSONObject;
/*
USER_ID CHAR(10) [PK] User ID
COURSE_CODE CHAR(10) [PK] Course Code
CONTENT_NAME VARCHAR2(60) [PK] Content Name Refer from COURSE_CONTENT
LAST_ACC_DATE DATE Content last access date
ACCESS_POS CHAR(5) Access position : <value%> for Video | <page#> page number of PDF
ACCESS_STAT CHAR(1) Access Status : P - Partially View | C - Completely View
*/
@Indexed
@Entity
@Table(name = "COURSE_CONTENT_ATT")
@XmlRootElement(name = "CourseContentAtt")
public class CourseContentAtt implements java.io.Serializable {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "USER_ID")
@Field(store = Store.YES, analyze = Analyze.NO)
private String userId;
@Id
@Field(store = Store.YES, analyze = Analyze.NO)
@Column(name = "COURSE_CODE")
private String courseCode;
@Id
@Field(store = Store.YES, analyze = Analyze.NO)
@Column(name = "CONTENT_NAME")
private String contentName;
@Column(name = "LAST_ACC_DATE")
private Date lastAccDate;
@Column(name = "ACCESS_POS")
private String accessPos;
@Column(name = "ACCESS_STAT")
private String acessStat;
public CourseContentAtt() {
}
public CourseContentAtt(String userId, String courseCode, String contentName, Date lastAccDate, String accessPos, String acessStat)
{
this.userId = userId;
this.courseCode = courseCode;
this.contentName = contentName;
this.lastAccDate = lastAccDate;
this.accessPos = accessPos;
this.acessStat = acessStat;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getCourseCode() {
return courseCode;
}
public void setCourseCode(String courseCode) {
this.courseCode = courseCode;
}
public String getContentName() {
return contentName;
}
public void setContentName(String contentName) {
this.contentName = contentName;
}
public Date getLastAccDate() {
return lastAccDate;
}
public void setLastAccDate(Date lastAccDate) {
this.lastAccDate = lastAccDate;
}
public String getAccessPos() {
return accessPos;
}
public void setAccessPos(String accessPos) {
this.accessPos = accessPos;
}
public String getAcessStat() {
return acessStat;
}
public void setAcessStat(String acessStat) {
this.acessStat = acessStat;
}
@Override
public String toString() {
return "\n CourseContentAtt.toString >> [" + new JSONObject(this).toString() + "]";
}
}
package ibase.dashboard.common.hibernate.bean;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.search.annotations.Analyze;
import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Indexed;
import org.hibernate.search.annotations.Store;
import org.json.JSONObject;
/*
COURSE_CODE CHAR(10) [PK] Course Code
QUES_SET CHAR(10) [PK] Question Set (Should be defined in GENCODES)
SEQ_NO NUMBER(4) [PK] Same as Line Number
QUES_TEXT VARCHAR2(250) Question Detail text
ANSW_TYPE CHAR(1) Answer Type : 0 - Radio | 1 - Multiselect | 2 - Dropdown(Single select) | 3 - Text
ANSW_METADATA VARCHAR2(500) Answer metadata
ANSW_TIME_LIMIT NUMBER(3) Waiting time in seconds (No. of seconds) - Skip to next question on timeout
*/
@Indexed
@Entity
@Table(name = "COURSE_TEST_QUES")
@XmlRootElement(name = "CourseTestQues")
public class CourseTestQues implements java.io.Serializable {
private static final long serialVersionUID = 1L;
@Id
@Field(store = Store.YES, analyze = Analyze.NO)
@Column(name = "COURSE_CODE")
private String courseCode;
@Id
@Field(store = Store.YES, analyze = Analyze.NO)
@Column(name = "QUES_SET")
private String quesSet;
@Id
@Field(store = Store.YES, analyze = Analyze.NO)
@Column(name = "SEQ_NO")
private int seqNo;
@Column(name = "ANSW_TYPE")
private String answType;
@Column(name = "ANSW_METADATA")
private String answMetadata;
@Column(name = "ANSW_TIME_LIMIT")
private int answTimeLimit;
public CourseTestQues() {
}
public CourseTestQues(String courseCode, String quesSet, int seqNo, String answType, String answMetadata, int answTimeLimit) {
this.courseCode = courseCode;
this.quesSet = quesSet;
this.seqNo = seqNo;
this.answType = answType;
this.answMetadata = answMetadata;
this.answTimeLimit = answTimeLimit;
}
public String getCourseCode() {
return courseCode;
}
public void setCourseCode(String courseCode) {
this.courseCode = courseCode;
}
public String getQuesSet() {
return quesSet;
}
public void setQuesSet(String quesSet) {
this.quesSet = quesSet;
}
public int getSeqNo() {
return seqNo;
}
public void setSeqNo(int seqNo) {
this.seqNo = seqNo;
}
public String getAnswType() {
return answType;
}
public void setAnswType(String answType) {
this.answType = answType;
}
public String getAnswMetadata() {
return answMetadata;
}
public void setAnswMetadata(String answMetadata) {
this.answMetadata = answMetadata;
}
public int getAnswTimeLimit() {
return answTimeLimit;
}
public void setAnswTimeLimit(int answTimeLimit) {
this.answTimeLimit = answTimeLimit;
}
@Override
public String toString() {
return "\n CourseTestQues.toString >> [" + new JSONObject(this).toString() + "]";
}
}
package ibase.dashboard.common.hibernate.bean;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.search.annotations.Analyze;
import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Indexed;
import org.hibernate.search.annotations.Store;
import org.json.JSONObject;
/*
USER_ID CHAR(10) [PK] User ID
COURSE_CODE CHAR(10) [PK] Course Code
QUES_SET CHAR(10) [PK] Question Set (Should be defined in GEN_MST)
SEQ_NO NUMBER(4) [PK] Same as Line Number
TEST_DATA VARCHAR2(100) User submitted data - Answers provided for respective Question
RESULT_DATA CHAR(1) Result : 0 - Incorrect | 1 - Correct
*/
@Indexed
@Entity
@Table(name = "COURSE_TEST_RES")
@XmlRootElement(name = "CourseTestRes")
public class CourseTestRes implements java.io.Serializable
{
private static final long serialVersionUID = 1L;
@Id
@Column(name="USER_ID")
@Field(store = Store.YES, analyze = Analyze.NO)
private String userId;
@Id
@Field(store = Store.YES, analyze = Analyze.NO)
@Column(name="COURSE_CODE")
private String courseCode;
@Id
@Field(store = Store.YES, analyze = Analyze.NO)
@Column(name="QUES_SET")
private String quesSet;
@Id
@Field(store = Store.YES, analyze = Analyze.NO)
@Column(name="SEQ_NO")
private int seqNo;
@Column(name="TEST_DATA")
private String testData;
@Column(name="RESULT_DATA")
private String resultData;
public CourseTestRes() {
}
public CourseTestRes(String userId, String courseCode, String quesSet, int seqNo, String testData,
String resultData) {
this.userId = userId;
this.courseCode = courseCode;
this.quesSet = quesSet;
this.seqNo = seqNo;
this.testData = testData;
this.resultData = resultData;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getCourseCode() {
return courseCode;
}
public void setCourseCode(String courseCode) {
this.courseCode = courseCode;
}
public String getQuesSet() {
return quesSet;
}
public void setQuesSet(String quesSet) {
this.quesSet = quesSet;
}
public int getSeqNumber() {
return seqNo;
}
public void setSeqNumber(int seqNo) {
this.seqNo = seqNo;
}
public String getTestData() {
return testData;
}
public void setTestData(String testData) {
this.testData = testData;
}
public String getResultData() {
return resultData;
}
public void setResultData(String resultData) {
this.resultData = resultData;
}
@Override
public String toString(){
return "\n CourseTestRes.toString >> [" + new JSONObject(this).toString() + "]";
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment