View Javadoc
1   /**
2    * Copyright 2005-2014 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.kim.bo.ui;
17  
18  import javax.persistence.CascadeType;
19  import javax.persistence.Column;
20  import javax.persistence.Convert;
21  import javax.persistence.Entity;
22  import javax.persistence.GeneratedValue;
23  import javax.persistence.Id;
24  import javax.persistence.JoinColumn;
25  import javax.persistence.ManyToOne;
26  import javax.persistence.Table;
27  import javax.persistence.Transient;
28  
29  import org.kuali.rice.core.api.util.type.KualiDecimal;
30  import org.kuali.rice.kim.impl.identity.employment.EntityEmploymentStatusBo;
31  import org.kuali.rice.kim.impl.identity.employment.EntityEmploymentTypeBo;
32  import org.kuali.rice.krad.data.jpa.converters.BooleanYNConverter;
33  import org.kuali.rice.krad.data.jpa.PortableSequenceGenerator;
34  
35  /**
36   * This is a description of what this class does - shyu don't forget to fill this in. 
37   * 
38   * @author Kuali Rice Team (rice.collab@kuali.org)
39   *
40   */
41  @Entity
42  @Table(name = "KRIM_PND_EMP_INFO_MT")
43  public class PersonDocumentEmploymentInfo extends KimDocumentBoActivatableEditableBase {
44      private static final long serialVersionUID = 1L;
45  
46      @PortableSequenceGenerator(name = "KRIM_ENTITY_EMP_ID_S")
47      @GeneratedValue(generator = "KRIM_ENTITY_EMP_ID_S")
48      @Id
49      @Column(name = "ENTITY_EMP_ID")
50      protected String entityEmploymentId;
51  
52      @Column(name = "ENTITY_AFLTN_ID")
53      protected String entityAffiliationId;
54  
55      @Column(name = "EMP_STAT_CD")
56      protected String employmentStatusCode;
57  
58      @Column(name = "EMP_TYP_CD")
59      protected String employmentTypeCode;
60  
61      @Column(name = "PRMRY_DEPT_CD")
62      protected String primaryDepartmentCode;
63  
64      @Column(name = "BASE_SLRY_AMT")
65      protected KualiDecimal baseSalaryAmount;
66  
67      @Column(name = "EMP_ID")
68      protected String employeeId;
69  
70      @Column(name = "EMP_REC_ID")
71      protected String employmentRecordId;
72  
73      @Column(name = "PRMRY_IND")
74      @Convert(converter = BooleanYNConverter.class)
75      protected boolean primary;
76  
77      @ManyToOne(targetEntity = EntityEmploymentTypeBo.class, cascade = { CascadeType.REFRESH })
78      @JoinColumn(name = "EMP_TYP_CD", referencedColumnName = "EMP_TYP_CD", insertable = false, updatable = false)
79      protected EntityEmploymentTypeBo employmentType;
80  
81      @ManyToOne(targetEntity = EntityEmploymentStatusBo.class, cascade = { CascadeType.REFRESH })
82      @JoinColumn(name = "EMP_STAT_CD", referencedColumnName = "EMP_STAT_CD", insertable = false, updatable = false)
83      protected EntityEmploymentStatusBo employmentStatus;
84  
85      @Transient
86      protected PersonDocumentAffiliation affiliation;
87  
88      public PersonDocumentEmploymentInfo() {
89          this.active = true;
90      }
91  
92      /**
93  	 * @see org.kuali.rice.kim.api.identity.employment.EntityEmploymentContract#getBaseSalaryAmount()
94  	 */
95      public KualiDecimal getBaseSalaryAmount() {
96          return baseSalaryAmount;
97      }
98  
99      /**
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 }