001/**
002 * Copyright 2005-2014 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.kuali.rice.core.api.util.type.KualiDecimal;
030import org.kuali.rice.kim.impl.identity.employment.EntityEmploymentStatusBo;
031import org.kuali.rice.kim.impl.identity.employment.EntityEmploymentTypeBo;
032import org.kuali.rice.krad.data.jpa.converters.BooleanYNConverter;
033import org.kuali.rice.krad.data.jpa.PortableSequenceGenerator;
034
035/**
036 * This is a description of what this class does - shyu don't forget to fill this in. 
037 * 
038 * @author Kuali Rice Team (rice.collab@kuali.org)
039 *
040 */
041@Entity
042@Table(name = "KRIM_PND_EMP_INFO_MT")
043public class PersonDocumentEmploymentInfo extends KimDocumentBoActivatableEditableBase {
044    private static final long serialVersionUID = 1L;
045
046    @PortableSequenceGenerator(name = "KRIM_ENTITY_EMP_ID_S")
047    @GeneratedValue(generator = "KRIM_ENTITY_EMP_ID_S")
048    @Id
049    @Column(name = "ENTITY_EMP_ID")
050    protected String entityEmploymentId;
051
052    @Column(name = "ENTITY_AFLTN_ID")
053    protected String entityAffiliationId;
054
055    @Column(name = "EMP_STAT_CD")
056    protected String employmentStatusCode;
057
058    @Column(name = "EMP_TYP_CD")
059    protected String employmentTypeCode;
060
061    @Column(name = "PRMRY_DEPT_CD")
062    protected String primaryDepartmentCode;
063
064    @Column(name = "BASE_SLRY_AMT")
065    protected KualiDecimal baseSalaryAmount;
066
067    @Column(name = "EMP_ID")
068    protected String employeeId;
069
070    @Column(name = "EMP_REC_ID")
071    protected String employmentRecordId;
072
073    @Column(name = "PRMRY_IND")
074    @Convert(converter = BooleanYNConverter.class)
075    protected boolean primary;
076
077    @ManyToOne(targetEntity = EntityEmploymentTypeBo.class, cascade = { CascadeType.REFRESH })
078    @JoinColumn(name = "EMP_TYP_CD", referencedColumnName = "EMP_TYP_CD", insertable = false, updatable = false)
079    protected EntityEmploymentTypeBo employmentType;
080
081    @ManyToOne(targetEntity = EntityEmploymentStatusBo.class, cascade = { CascadeType.REFRESH })
082    @JoinColumn(name = "EMP_STAT_CD", referencedColumnName = "EMP_STAT_CD", insertable = false, updatable = false)
083    protected EntityEmploymentStatusBo employmentStatus;
084
085    @Transient
086    protected PersonDocumentAffiliation affiliation;
087
088    public PersonDocumentEmploymentInfo() {
089        this.active = true;
090    }
091
092    /**
093         * @see org.kuali.rice.kim.api.identity.employment.EntityEmploymentContract#getBaseSalaryAmount()
094         */
095    public KualiDecimal getBaseSalaryAmount() {
096        return baseSalaryAmount;
097    }
098
099    /**
100         * @see org.kuali.rice.kim.api.identity.employment.EntityEmploymentContract#getEmployeeStatusCode()
101         */
102    public String getEmploymentStatusCode() {
103        return employmentStatusCode;
104    }
105
106    /**
107         * @see org.kuali.rice.kim.api.identity.employment.EntityEmploymentContract#getEmploymentTypeCode()
108         */
109    public String getEmploymentTypeCode() {
110        return employmentTypeCode;
111    }
112
113    /**
114         * @see org.kuali.rice.kim.api.identity.employment.EntityEmploymentContract#getEntityAffiliationId()
115         */
116    public String getEntityAffiliationId() {
117        return entityAffiliationId;
118    }
119
120    /**
121         * @see org.kuali.rice.kim.api.identity.employment.EntityEmploymentContract#getEntityEmploymentId()
122         */
123    public String getEntityEmploymentId() {
124        return entityEmploymentId;
125    }
126
127    /**
128         * @see org.kuali.rice.kim.api.identity.employment.EntityEmploymentContract#isPrimary()
129         */
130    public boolean isPrimary() {
131        return primary;
132    }
133
134    /**
135         * @see org.kuali.rice.kim.api.identity.employment.EntityEmploymentContract#setAffiliationId(java.lang.String)
136         */
137    public void setEntityAffiliationId(String entityAffiliationId) {
138        this.entityAffiliationId = entityAffiliationId;
139    }
140
141    /**
142         * @see org.kuali.rice.kim.api.identity.employment.EntityEmploymentContract#setBaseSalaryAmount(java.math.BigDecimal)
143         */
144    public void setBaseSalaryAmount(KualiDecimal baseSalaryAmount) {
145        this.baseSalaryAmount = baseSalaryAmount;
146    }
147
148    /**
149         * @see org.kuali.rice.kim.api.identity.employment.EntityEmploymentContract#setEmployeeStatusCode(java.lang.String)
150         */
151    public void setEmploymentStatusCode(String employmentStatusCode) {
152        this.employmentStatusCode = employmentStatusCode;
153    }
154
155    /**
156         * @see org.kuali.rice.kim.api.identity.employment.EntityEmploymentContract#setEmploymentTypeCode(java.lang.String)
157         */
158    public void setEmploymentTypeCode(String employmentTypeCode) {
159        this.employmentTypeCode = employmentTypeCode;
160    }
161
162    /**
163         * @see org.kuali.rice.kim.api.identity.employment.EntityEmploymentContract#setPrimary(boolean)
164         */
165    public void setPrimary(boolean primary) {
166        this.primary = primary;
167    }
168
169    public void setEntityEmploymentId(String entityEmploymentId) {
170        this.entityEmploymentId = entityEmploymentId;
171    }
172
173    public EntityEmploymentTypeBo getEmploymentType() {
174        return this.employmentType;
175    }
176
177    public void setEmploymentType(EntityEmploymentTypeBo employmentType) {
178        this.employmentType = employmentType;
179    }
180
181    public EntityEmploymentStatusBo getEmploymentStatus() {
182        return this.employmentStatus;
183    }
184
185    public void setEmploymentStatus(EntityEmploymentStatusBo employmentStatus) {
186        this.employmentStatus = employmentStatus;
187    }
188
189    public String getPrimaryDepartmentCode() {
190        return this.primaryDepartmentCode;
191    }
192
193    public void setPrimaryDepartmentCode(String primaryDepartmentCode) {
194        this.primaryDepartmentCode = primaryDepartmentCode;
195    }
196
197    public PersonDocumentAffiliation getAffiliation() {
198        return this.affiliation;
199    }
200
201    public void setAffiliation(PersonDocumentAffiliation affiliation) {
202        this.affiliation = affiliation;
203    }
204
205    public String getEmployeeId() {
206        return this.employeeId;
207    }
208
209    public void setEmployeeId(String employeeId) {
210        this.employeeId = employeeId;
211    }
212
213    public String getEmploymentRecordId() {
214        return this.employmentRecordId;
215    }
216
217    public void setEmploymentRecordId(String employmentRecordId) {
218        this.employmentRecordId = employmentRecordId;
219    }
220}