Coverage Report - org.kuali.rice.kim.impl.identity.address.EntityAddressTypeBo
 
Classes in this File Line Coverage Branch Coverage Complexity
EntityAddressTypeBo
9%
1/11
25%
1/4
0
 
 1  
 package org.kuali.rice.kim.impl.identity.address
 2  
 
 3  
 import javax.persistence.Column
 4  
 import javax.persistence.Id
 5  
 
 6  
 import org.kuali.rice.kim.api.identity.Type
 7  
 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase
 8  
 import javax.persistence.Entity
 9  
 
 10  
 import javax.persistence.Table
 11  
 
 12  
 import org.kuali.rice.kim.api.identity.TypeContract
 13  
 
 14  
 @Entity
 15  
 @Table(name="KRIM_ADDR_TYP_T")
 16  
 public class EntityAddressTypeBo extends PersistableBusinessObjectBase implements TypeContract {
 17  
     @Id
 18  
     @Column(name="ADDR_TYP_CD")
 19  
     String code;
 20  
     @Column(name="NM")
 21  
     String name;
 22  
     @org.hibernate.annotations.Type(type="yes_no")
 23  
     @Column(name="ACTV_IND")
 24  
     boolean active;
 25  
     @Column(name="DISPLAY_SORT_CD")
 26  
     String sortCode;
 27  
 
 28  
 
 29  
     /**
 30  
    * Converts a mutable AddressTypeBo to an immutable AddressType representation.
 31  
    * @param bo
 32  
    * @return an immutable AddressType
 33  
    */
 34  
   static Type to(EntityAddressTypeBo bo) {
 35  0
     if (bo == null) { return null }
 36  0
     return Type.Builder.create(bo).build()
 37  
   }
 38  
 
 39  
   /**
 40  
    * Creates a AddressType business object from an immutable representation of a AddressType.
 41  
    * @param an immutable AddressType
 42  
    * @return a AddressTypeBo
 43  
    */
 44  
   static EntityAddressTypeBo from(Type immutable) {
 45  1
     if (immutable == null) {return null}
 46  
 
 47  0
     EntityAddressTypeBo bo = new EntityAddressTypeBo()
 48  0
     bo.code = immutable.code
 49  0
     bo.name = immutable.name
 50  0
     bo.sortCode = immutable.sortCode
 51  0
     bo.active = immutable.active
 52  0
     bo.versionNumber = immutable.versionNumber
 53  0
     bo.objectId = immutable.objectId
 54  
 
 55  0
     return bo;
 56  
   }
 57  
 }