Coverage Report - org.kuali.rice.kim.impl.identity.affiliation.EntityAffiliationTypeBo
 
Classes in this File Line Coverage Branch Coverage Complexity
EntityAffiliationTypeBo
0%
0/12
0%
0/8
0
 
 1  
 /**
 2  
  * Copyright 2005-2011 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.impl.identity.affiliation
 17  
 
 18  
 import javax.persistence.Column
 19  
 import javax.persistence.Entity
 20  
 import javax.persistence.Id
 21  
 import javax.persistence.Table
 22  
 import org.kuali.rice.kim.api.identity.CodedAttribute
 23  
 import org.kuali.rice.kim.api.identity.CodedAttributeContract
 24  
 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase
 25  
 import org.kuali.rice.kim.api.identity.affiliation.EntityAffiliationTypeContract
 26  
 import org.kuali.rice.kim.api.identity.affiliation.EntityAffiliationType
 27  
 
 28  
 @Entity
 29  
 @Table(name="KRIM_AFLTN_TYP_T")
 30  
 public class EntityAffiliationTypeBo extends PersistableBusinessObjectBase implements EntityAffiliationTypeContract {
 31  
     @Id
 32  
     @Column(name="EMP_TYP_CD")
 33  
     String code;
 34  
     @Column(name="NM")
 35  
     String name;
 36  
     @org.hibernate.annotations.Type(type="yes_no")
 37  
     @Column(name="ACTV_IND")
 38  
     boolean active;
 39  
     @Column(name="DISPLAY_SORT_CD")
 40  
     String sortCode;
 41  
     
 42  
     @org.hibernate.annotations.Type(type="yes_no")
 43  
     @Column(name="EMP_AFLTN_TYP_IND")
 44  
     boolean employmentAffiliationType;
 45  
 
 46  
 
 47  
     /**
 48  
    * Converts a mutable EntityAffiliationTypeBo to an immutable EntityAffiliationType representation.
 49  
    * @param bo
 50  
    * @return an immutable EntityAffiliationType
 51  
    */
 52  
   static EntityAffiliationType to(EntityAffiliationTypeBo bo) {
 53  0
     if (bo == null) { return null }
 54  0
     return EntityAffiliationType.Builder.create(bo).build()
 55  
   }
 56  
 
 57  
   /**
 58  
    * Creates a EntityAffiliationType business object from an immutable representation of a EntityAffiliationType.
 59  
    * @param an immutable EntityAffiliationType
 60  
    * @return a EntityAffiliationTypeBo
 61  
    */
 62  
   static EntityAffiliationTypeBo from(EntityAffiliationType immutable) {
 63  0
     if (immutable == null) {return null}
 64  
 
 65  0
     EntityAffiliationTypeBo bo = new EntityAffiliationTypeBo()
 66  0
     bo.code = immutable.code
 67  0
     bo.name = immutable.name
 68  0
     bo.sortCode = immutable.sortCode
 69  0
     bo.employmentAffiliationType = immutable.employmentAffiliationType
 70  0
     bo.active = immutable.active
 71  0
     bo.versionNumber = immutable.versionNumber
 72  0
     bo.objectId = immutable.objectId
 73  
 
 74  0
     return bo;
 75  
   }
 76  
 }