001/**
002 * Copyright 2005-2016 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.kuali.rice.kim.bo.ui;
017
018import javax.persistence.CascadeType;
019import javax.persistence.Column;
020import javax.persistence.Convert;
021import javax.persistence.Entity;
022import javax.persistence.GeneratedValue;
023import javax.persistence.Id;
024import javax.persistence.JoinColumn;
025import javax.persistence.ManyToOne;
026import javax.persistence.Table;
027import javax.persistence.Transient;
028
029import org.eclipse.persistence.annotations.JoinFetch;
030import org.eclipse.persistence.annotations.JoinFetchType;
031import org.kuali.rice.core.api.util.type.KualiDecimal;
032import org.kuali.rice.kim.impl.identity.employment.EntityEmploymentStatusBo;
033import org.kuali.rice.kim.impl.identity.employment.EntityEmploymentTypeBo;
034import org.kuali.rice.krad.data.jpa.converters.BooleanYNConverter;
035import org.kuali.rice.krad.data.jpa.PortableSequenceGenerator;
036
037/**
038 * This is a description of what this class does - shyu don't forget to fill this in. 
039 * 
040 * @author Kuali Rice Team (rice.collab@kuali.org)
041 *
042 */
043@Entity
044@Table(name = "KRIM_PND_EMP_INFO_MT")
045public class PersonDocumentEmploymentInfo extends KimDocumentBoActivatableEditableBase {
046    private static final long serialVersionUID = 1L;
047
048    @PortableSequenceGenerator(name = "KRIM_ENTITY_EMP_ID_S")
049    @GeneratedValue(generator = "KRIM_ENTITY_EMP_ID_S")
050    @Id
051    @Column(name = "ENTITY_EMP_ID")
052    protected String entityEmploymentId;
053
054    @Column(name = "ENTITY_AFLTN_ID")
055    protected String entityAffiliationId;
056
057    @Column(name = "EMP_STAT_CD")
058    protected String employmentStatusCode;
059
060    @Column(name = "EMP_TYP_CD")
061    protected String employmentTypeCode;
062
063    @Column(name = "PRMRY_DEPT_CD")
064    protected String primaryDepartmentCode;
065
066    @Column(name = "BASE_SLRY_AMT")
067    protected KualiDecimal baseSalaryAmount;
068
069    @Column(name = "EMP_ID")
070    protected String employeeId;
071
072    @Column(name = "EMP_REC_ID")
073    protected String employmentRecordId;
074
075    @Column(name = "PRMRY_IND")
076    @Convert(converter = BooleanYNConverter.class)
077    protected boolean primary;
078
079    @JoinFetch(value= JoinFetchType.OUTER)
080    @ManyToOne(targetEntity = EntityEmploymentTypeBo.class, cascade = { CascadeType.REFRESH })
081    @JoinColumn(name = "EMP_TYP_CD", referencedColumnName = "EMP_TYP_CD", insertable = false, updatable = false)
082    protected EntityEmploymentTypeBo employmentType;
083
084    @JoinFetch(value= JoinFetchType.OUTER)
085    @ManyToOne(targetEntity = EntityEmploymentStatusBo.class, cascade = { CascadeType.REFRESH })
086    @JoinColumn(name = "EMP_STAT_CD", referencedColumnName = "EMP_STAT_CD", insertable = false, updatable = false)
087    protected EntityEmploymentStatusBo employmentStatus;
088
089    @Transient
090    protected PersonDocumentAffiliation affiliation;
091
092    public PersonDocumentEmploymentInfo() {
093        this.active = true;
094    }
095
096    /**
097         * @see org.kuali.rice.kim.api.identity.employment.EntityEmploymentContract#getBaseSalaryAmount()
098         */
099    public KualiDecimal getBaseSalaryAmount() {
100        return baseSalaryAmount;
101    }
102
103    /**
104         * @see org.kuali.rice.kim.api.identity.employment.EntityEmploymentContract#getEmployeeStatusCode()
105         */
106    public String getEmploymentStatusCode() {
107        return employmentStatusCode;
108    }
109
110    /**
111         * @see org.kuali.rice.kim.api.identity.employment.EntityEmploymentContract#getEmploymentTypeCode()
112         */
113    public String getEmploymentTypeCode() {
114        return employmentTypeCode;
115    }
116
117    /**
118         * @see org.kuali.rice.kim.api.identity.employment.EntityEmploymentContract#getEntityAffiliationId()
119         */
120    public String getEntityAffiliationId() {
121        return entityAffiliationId;
122    }
123
124    /**
125         * @see org.kuali.rice.kim.api.identity.employment.EntityEmploymentContract#getEntityEmploymentId()
126         */
127    public String getEntityEmploymentId() {
128        return entityEmploymentId;
129    }
130
131    /**
132         * @see org.kuali.rice.kim.api.identity.employment.EntityEmploymentContract#isPrimary()
133         */
134    public boolean isPrimary() {
135        return primary;
136    }
137
138    /**
139         * @see org.kuali.rice.kim.api.identity.employment.EntityEmploymentContract#setAffiliationId(java.lang.String)
140         */
141    public void setEntityAffiliationId(String entityAffiliationId) {
142        this.entityAffiliationId = entityAffiliationId;
143    }
144
145    /**
146         * @see org.kuali.rice.kim.api.identity.employment.EntityEmploymentContract#setBaseSalaryAmount(java.math.BigDecimal)
147         */
148    public void setBaseSalaryAmount(KualiDecimal baseSalaryAmount) {
149        this.baseSalaryAmount = baseSalaryAmount;
150    }
151
152    /**
153         * @see org.kuali.rice.kim.api.identity.employment.EntityEmploymentContract#setEmployeeStatusCode(java.lang.String)
154         */
155    public void setEmploymentStatusCode(String employmentStatusCode) {
156        this.employmentStatusCode = employmentStatusCode;
157    }
158
159    /**
160         * @see org.kuali.rice.kim.api.identity.employment.EntityEmploymentContract#setEmploymentTypeCode(java.lang.String)
161         */
162    public void setEmploymentTypeCode(String employmentTypeCode) {
163        this.employmentTypeCode = employmentTypeCode;
164    }
165
166    /**
167         * @see org.kuali.rice.kim.api.identity.employment.EntityEmploymentContract#setPrimary(boolean)
168         */
169    public void setPrimary(boolean primary) {
170        this.primary = primary;
171    }
172
173    public void setEntityEmploymentId(String entityEmploymentId) {
174        this.entityEmploymentId = entityEmploymentId;
175    }
176
177    public EntityEmploymentTypeBo getEmploymentType() {
178        return this.employmentType;
179    }
180
181    public void setEmploymentType(EntityEmploymentTypeBo employmentType) {
182        this.employmentType = employmentType;
183    }
184
185    public EntityEmploymentStatusBo getEmploymentStatus() {
186        return this.employmentStatus;
187    }
188
189    public void setEmploymentStatus(EntityEmploymentStatusBo employmentStatus) {
190        this.employmentStatus = employmentStatus;
191    }
192
193    public String getPrimaryDepartmentCode() {
194        return this.primaryDepartmentCode;
195    }
196
197    public void setPrimaryDepartmentCode(String primaryDepartmentCode) {
198        this.primaryDepartmentCode = primaryDepartmentCode;
199    }
200
201    public PersonDocumentAffiliation getAffiliation() {
202        return this.affiliation;
203    }
204
205    public void setAffiliation(PersonDocumentAffiliation affiliation) {
206        this.affiliation = affiliation;
207    }
208
209    public String getEmployeeId() {
210        return this.employeeId;
211    }
212
213    public void setEmployeeId(String employeeId) {
214        this.employeeId = employeeId;
215    }
216
217    public String getEmploymentRecordId() {
218        return this.employmentRecordId;
219    }
220
221    public void setEmploymentRecordId(String employmentRecordId) {
222        this.employmentRecordId = employmentRecordId;
223    }
224}