Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package cgd.sec.data;
- import cgd.ref.data.StatusInfo;
- import cgd.ref.data.Title;
- import cgd.util.DateConvert;
- import java.io.Serializable;
- import java.sql.Timestamp;
- import java.text.SimpleDateFormat;
- import java.util.Date;
- import java.util.List;
- import java.util.Locale;
- import javax.persistence.Column;
- import javax.persistence.Entity;
- import javax.persistence.Id;
- import javax.persistence.JoinColumn;
- import javax.persistence.ManyToOne;
- import javax.persistence.NamedQueries;
- import javax.persistence.NamedQuery;
- import javax.persistence.OneToMany;
- import javax.persistence.Table;
- import javax.persistence.Temporal;
- import javax.persistence.TemporalType;
- import javax.persistence.Transient;
- @Entity
- @NamedQueries(
- {
- @NamedQuery(name = "UserInfo.findAll", query = "select o from UserInfo o")
- })
- @Table(name = "SEC_USER_INFO")
- public class UserInfo
- implements Serializable
- {
- private static final long serialVersionUID = -7641485433085072800L;
- @Column(length = 300)
- private String address;
- private Integer approvedocstatus;
- private Integer approveleavestatus;
- @Column(nullable = false)
- private Integer birthdate;
- @Column(nullable = false, length = 13)
- private String cardid;
- private Integer considerstatus;
- //@Temporal(TemporalType.DATE)
- @Column(nullable = false)
- private Timestamp datecreated;
- //@Temporal(TemporalType.DATE)
- private Timestamp dateupdated;
- @Column(nullable = false, length = 1)
- private String disabledindicator;
- @Column(nullable = false)
- private Integer entrydate;
- private Integer finishdate;
- @Column(nullable = false, length = 50)
- private String firstname;
- @Column(nullable = false)
- private String gender;
- @Column(nullable = false)
- private String hadj;
- @Column(length = 50)
- private String ipaddress;
- @Column(nullable = false, length = 50)
- private String lastname;
- private Integer logincount;
- @Column(nullable = false)
- private String marriage;
- @Column(nullable = false)
- private String ordain;
- private Integer organizeid;
- @Column(length = 128)
- private String password;
- @Column(length = 30)
- private String phoneno;
- @Column(length = 6)
- private String positionid;
- @Column(nullable = false)
- private byte recordstatus;
- @Column(nullable = false)
- private String religion;
- @Column(nullable = false)
- private Integer retiredate;
- @Column(length = 20)
- private String screenid;
- private Integer startdate;
- @Column(length = 3)
- private String statusid;
- @Column(length = 3)
- private String titleid;
- @Column(length = 10)
- private String usercode;
- @Id
- @Column(nullable = false, length = 10)
- private String userid;
- @Column(nullable = false, length = 10)
- private String useridcreated;
- @Column(length = 10)
- private String useridupdated;
- private Integer userlevel;
- private String usertype;
- private Integer workorganizeid;
- @Transient
- private int officialageyear;
- @Transient
- private int officialagemonth;
- @Transient
- private int officialageday;
- @Transient
- private int totalannualleave;
- @OneToMany(mappedBy = "userInfo")
- private List<UserRole> userRoleList;
- @ManyToOne()
- @JoinColumn(name="USERIDUPDATED", insertable=false, updatable=false, nullable=false)
- private UserInfo useridupdatedInfo;
- @ManyToOne()
- @JoinColumn(name="titleid", insertable=false, updatable=false, nullable=false)
- private Title title;
- @ManyToOne()
- @JoinColumn(name="organizeid",referencedColumnName = "organizeid", insertable=false, updatable=false, nullable=false)
- private OrganizeInfo organizeInfo;
- @ManyToOne()
- @JoinColumn(name="workorganizeid",referencedColumnName = "organizeid", insertable=false, updatable=false, nullable=false)
- private OrganizeInfo workorganizeInfo;
- @ManyToOne()
- @JoinColumn(name="statusid", insertable=false, updatable=false, nullable=false)
- private StatusInfo statusInfo;
- public UserInfo()
- {
- }
- public UserInfo(String address, Integer approvedocstatus, Integer approveleavestatus, Integer birthdate,
- String cardid, Integer considerstatus, Timestamp datecreated, Timestamp dateupdated, String disabledindicator,
- Integer entrydate, Integer finishdate, String firstname, String gender, String hadj, String ipaddress,
- String lastname, Integer logincount, String marriage, String ordain, Integer organizeid,
- String password, String phoneno, String positionid, byte recordstatus, String religion,
- Integer retiredate, String screenid, Integer startdate, String statusid, String titleid,
- String usercode, String userid, String useridcreated, String useridupdated, Integer userlevel,
- String usertype, Integer workorganizeid)
- {
- this.address = address;
- this.approvedocstatus = approvedocstatus;
- this.approveleavestatus = approveleavestatus;
- this.birthdate = birthdate;
- this.cardid = cardid;
- this.considerstatus = considerstatus;
- this.datecreated = datecreated;
- this.dateupdated = dateupdated;
- this.disabledindicator = disabledindicator;
- this.entrydate = entrydate;
- this.finishdate = finishdate;
- this.firstname = firstname;
- this.gender = gender;
- this.hadj = hadj;
- this.ipaddress = ipaddress;
- this.lastname = lastname;
- this.logincount = logincount;
- this.marriage = marriage;
- this.ordain = ordain;
- this.organizeid = organizeid;
- this.password = password;
- this.phoneno = phoneno;
- this.positionid = positionid;
- this.recordstatus = recordstatus;
- this.religion = religion;
- this.retiredate = retiredate;
- this.screenid = screenid;
- this.startdate = startdate;
- this.statusid = statusid;
- this.titleid = titleid;
- this.usercode = usercode;
- this.userid = userid;
- this.useridcreated = useridcreated;
- this.useridupdated = useridupdated;
- this.userlevel = userlevel;
- this.usertype = usertype;
- this.workorganizeid = workorganizeid;
- }
- public String getAddress()
- {
- return address;
- }
- public void setAddress(String address)
- {
- this.address = address;
- }
- public Integer getApprovedocstatus()
- {
- return approvedocstatus;
- }
- public void setApprovedocstatus(Integer approvedocstatus)
- {
- this.approvedocstatus = approvedocstatus;
- }
- public Integer getApproveleavestatus()
- {
- return approveleavestatus;
- }
- public void setApproveleavestatus(Integer approveleavestatus)
- {
- this.approveleavestatus = approveleavestatus;
- }
- public Integer getBirthdate()
- {
- return birthdate;
- }
- public String getBirthdateDisplay()
- {
- String vaRtn = "";
- if(this.birthdate != null)
- {
- vaRtn = DateConvert.storeDate2DisplayDate(String.valueOf(this.birthdate));
- }
- return vaRtn;
- }
- public void setBirthdate(Integer birthdate)
- {
- this.birthdate = birthdate;
- }
- public String getCardid()
- {
- return cardid;
- }
- public void setCardid(String cardid)
- {
- this.cardid = cardid;
- }
- public Integer getConsiderstatus()
- {
- return considerstatus;
- }
- public void setConsiderstatus(Integer considerstatus)
- {
- this.considerstatus = considerstatus;
- }
- public Timestamp getDatecreated()
- {
- return datecreated;
- }
- public void setDatecreated(Timestamp datecreated)
- {
- this.datecreated = datecreated;
- }
- public Timestamp getDateupdated()
- {
- return dateupdated;
- }
- public String getDateupdatedDisplay()
- {
- String vaRtn = "";
- if(this.dateupdated != null)
- {
- vaRtn = DateConvert.convTimestamp2String(this.dateupdated);
- }
- return vaRtn;
- }
- public void setDateupdated(Timestamp dateupdated)
- {
- this.dateupdated = dateupdated;
- }
- public String getDisabledindicator()
- {
- return disabledindicator;
- }
- public void setDisabledindicator(String disabledindicator)
- {
- this.disabledindicator = disabledindicator;
- }
- public Integer getEntrydate()
- {
- return entrydate;
- }
- public String getEntrydateDisplay()
- {
- String vaRtn = "";
- if(this.entrydate != null)
- {
- vaRtn = DateConvert.storeDate2DisplayDate(String.valueOf(this.entrydate));
- }
- return vaRtn;
- }
- public void setEntrydate(Integer entrydate)
- {
- this.entrydate = entrydate;
- }
- public Integer getFinishdate()
- {
- return finishdate;
- }
- public String getFinishdateDisplay()
- {
- String vaRtn = "";
- if(this.finishdate != null)
- {
- vaRtn = DateConvert.storeDate2DisplayDate(String.valueOf(this.finishdate));
- }
- return vaRtn;
- }
- public void setFinishdate(Integer finishdate)
- {
- this.finishdate = finishdate;
- }
- public String getFirstname()
- {
- return firstname;
- }
- public void setFirstname(String firstname)
- {
- this.firstname = firstname;
- }
- public String getGender()
- {
- return gender;
- }
- public void setGender(String gender)
- {
- this.gender = gender;
- }
- public String getHadj()
- {
- return hadj;
- }
- public void setHadj(String hadj)
- {
- this.hadj = hadj;
- }
- public String getIpaddress()
- {
- return ipaddress;
- }
- public void setIpaddress(String ipaddress)
- {
- this.ipaddress = ipaddress;
- }
- public String getLastname()
- {
- return lastname;
- }
- public void setLastname(String lastname)
- {
- this.lastname = lastname;
- }
- public Integer getLogincount()
- {
- return logincount;
- }
- public void setLogincount(Integer logincount)
- {
- this.logincount = logincount;
- }
- public String getMarriage()
- {
- return marriage;
- }
- public void setMarriage(String marriage)
- {
- this.marriage = marriage;
- }
- public String getOrdain()
- {
- return ordain;
- }
- public void setOrdain(String ordain)
- {
- this.ordain = ordain;
- }
- public Integer getOrganizeid()
- {
- return organizeid;
- }
- public void setOrganizeid(Integer organizeid)
- {
- this.organizeid = organizeid;
- }
- public String getPassword()
- {
- return password;
- }
- public void setPassword(String password)
- {
- this.password = password;
- }
- public String getPhoneno()
- {
- return phoneno;
- }
- public void setPhoneno(String phoneno)
- {
- this.phoneno = phoneno;
- }
- public String getPositionid()
- {
- return positionid;
- }
- public void setPositionid(String positionid)
- {
- this.positionid = positionid;
- }
- public byte getRecordstatus()
- {
- return recordstatus;
- }
- public void setRecordstatus(byte recordstatus)
- {
- this.recordstatus = recordstatus;
- }
- public String getReligion()
- {
- return religion;
- }
- public void setReligion(String religion)
- {
- this.religion = religion;
- }
- public Integer getRetiredate()
- {
- return retiredate;
- }
- public String getRetiredateDisplay()
- {
- String vaRtn = "";
- if(this.retiredate != null)
- {
- vaRtn = DateConvert.storeDate2DisplayDate(String.valueOf(this.retiredate));
- }
- return vaRtn;
- }
- public void setRetiredate(Integer retiredate)
- {
- this.retiredate = retiredate;
- }
- public String getScreenid()
- {
- return screenid;
- }
- public void setScreenid(String screenid)
- {
- this.screenid = screenid;
- }
- public Integer getStartdate()
- {
- return startdate;
- }
- public String getStartdateDisplay()
- {
- String vaRtn = "";
- if(this.startdate != null)
- {
- vaRtn = DateConvert.storeDate2DisplayDate(String.valueOf(this.startdate));
- }
- return vaRtn;
- }
- public void setStartdate(Integer startdate)
- {
- this.startdate = startdate;
- }
- public String getStatusid()
- {
- return statusid;
- }
- public void setStatusid(String statusid)
- {
- this.statusid = statusid;
- }
- public String getTitleid()
- {
- return titleid;
- }
- public void setTitleid(String titleid)
- {
- this.titleid = titleid;
- }
- public String getUsercode()
- {
- return usercode;
- }
- public void setUsercode(String usercode)
- {
- this.usercode = usercode;
- }
- public String getUserid()
- {
- return userid;
- }
- public void setUserid(String userid)
- {
- this.userid = userid;
- }
- public String getUseridcreated()
- {
- return useridcreated;
- }
- public void setUseridcreated(String useridcreated)
- {
- this.useridcreated = useridcreated;
- }
- public String getUseridupdated()
- {
- return useridupdated;
- }
- public void setUseridupdated(String useridupdated)
- {
- this.useridupdated = useridupdated;
- }
- public Integer getUserlevel()
- {
- return userlevel;
- }
- public void setUserlevel(Integer userlevel)
- {
- this.userlevel = userlevel;
- }
- public String getUsertype()
- {
- return usertype;
- }
- public void setUsertype(String usertype)
- {
- this.usertype = usertype;
- }
- public Integer getWorkorganizeid()
- {
- return workorganizeid;
- }
- public void setWorkorganizeid(Integer workorganizeid)
- {
- this.workorganizeid = workorganizeid;
- }
- public List<UserRole> getUserRoleList()
- {
- return userRoleList;
- }
- public void setUserRoleList(List<UserRole> userRoleList)
- {
- this.userRoleList = userRoleList;
- }
- public UserRole addUserRole(UserRole userRole)
- {
- getUserRoleList().add(userRole);
- userRole.setUserInfo(this);
- return userRole;
- }
- public UserRole removeUserRole(UserRole userRole)
- {
- getUserRoleList().remove(userRole);
- userRole.setUserInfo(null);
- return userRole;
- }
- public String getUseridupdatedDisplay()
- {
- String vaRtn = this.useridupdated;
- if(this.useridupdatedInfo != null)
- {
- vaRtn = vaRtn+"-"+this.useridupdatedInfo.getFirstname()+" "+this.useridupdatedInfo.getLastname();
- }
- return vaRtn;
- }
- public String getNameDisplay()
- {
- String vaTitlename = "";
- if(this.title != null)
- {
- vaTitlename = this.title.getShortname();
- }
- String vaRtn = vaTitlename+" "+this.firstname+" "+this.lastname;
- return vaRtn;
- }
- public String getRecordstatusDescription()
- {
- String vaRecordstatusDescription = "";
- if(this.recordstatus==0)
- {
- vaRecordstatusDescription = "Inactive";
- }
- else if(this.recordstatus==1)
- {
- vaRecordstatusDescription = "Active";
- }
- return vaRecordstatusDescription;
- }
- public Title getTitle()
- {
- return title;
- }
- public void setTitle(Title title)
- {
- this.title = title;
- }
- public OrganizeInfo getOrganizeInfo()
- {
- return organizeInfo;
- }
- public void setOrganizeInfo(OrganizeInfo organizeInfo)
- {
- this.organizeInfo = organizeInfo;
- }
- public OrganizeInfo getWorkorganizeInfo()
- {
- return workorganizeInfo;
- }
- public void setWorkorganizeInfo(OrganizeInfo workorganizeInfo)
- {
- this.workorganizeInfo = workorganizeInfo;
- }
- public StatusInfo getStatusInfo()
- {
- return statusInfo;
- }
- public void setStatusInfo(StatusInfo statusInfo)
- {
- this.statusInfo = statusInfo;
- }
- public void setOfficialageyear(int officialageyear)
- {
- this.officialageyear = officialageyear;
- }
- public int getOfficialageyear()
- {
- return officialageyear;
- }
- public void setOfficialagemonth(int officialagemonth)
- {
- this.officialagemonth = officialagemonth;
- }
- public int getOfficialagemonth()
- {
- return officialagemonth;
- }
- public void setOfficialageday(int officialageday)
- {
- this.officialageday = officialageday;
- }
- public int getOfficialageday()
- {
- return officialageday;
- }
- public void setTotalannualleave(int totalannualleave)
- {
- this.totalannualleave = totalannualleave;
- }
- public int getTotalannualleave()
- {
- return totalannualleave;
- }
- public void setUseridupdatedInfo(UserInfo useridupdatedInfo)
- {
- this.useridupdatedInfo = useridupdatedInfo;
- }
- public UserInfo getUseridupdatedInfo()
- {
- return useridupdatedInfo;
- }
- public String getOrganizePhoneNumber()
- {
- return (workorganizeInfo!=null&& workorganizeInfo.getPhoneno() != null )? workorganizeInfo.getPhoneno():"";
- }
- public String getOrganizeName()
- {
- return (workorganizeInfo!=null && workorganizeInfo.getOrganizename() != null)?workorganizeInfo.getOrganizename():"";
- }
- @Override
- public String toString()
- {
- return "{\"nameDisplay\":\"" + (getNameDisplay())
- + "\", \"organizeid\":\"" + (organizeid==null?"":organizeid)
- + "\", \"positionid\":\"" + (positionid==null?"":positionid)
- + "\", \"statusid\":\"" + (statusid==null?"":statusid)
- + "\", \"userid\":\"" + (userid==null?"":userid)
- + "\", \"firstname\":\"" + (firstname==null?"":firstname)
- + "\", \"lastname\":\"" + (lastname==null?"":lastname)
- + "\", \"phoneno\":\"" + (phoneno==null?"":phoneno)
- + "\", \"organizePhoneNumber\":\"" + getOrganizePhoneNumber()
- + "\", \"organizeName\":\"" + getOrganizeName()
- + "\"}";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment