Coverage Report - org.kuali.rice.kim.impl.identity.external.EntityExternalIdentifierTypeBo
 
Classes in this File Line Coverage Branch Coverage Complexity
EntityExternalIdentifierTypeBo
0%
0/12
12%
1/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.external
 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.external.EntityExternalIdentifierTypeContract
 26  
 import org.kuali.rice.kim.api.identity.external.EntityExternalIdentifierType
 27  
 
 28  
 @Entity
 29  
 @Table(name="KRIM_EXT_ID_TYP_T")
 30  
 public class EntityExternalIdentifierTypeBo extends PersistableBusinessObjectBase implements EntityExternalIdentifierTypeContract {
 31  
     @Id
 32  
     @Column(name="EXT_ID_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="ENCR_REQ_IND")
 44  
         boolean encryptionRequired;
 45  
 
 46  
 
 47  
     /**
 48  
    * Converts a mutable AddressTypeBo to an immutable AddressType representation.
 49  
    * @param bo
 50  
    * @return an immutable AddressType
 51  
    */
 52  
   static EntityExternalIdentifierType to(EntityExternalIdentifierTypeBo bo) {
 53  0
     if (bo == null) { return null }
 54  0
     return EntityExternalIdentifierType.Builder.create(bo).build()
 55  
   }
 56  
 
 57  
   /**
 58  
    * Creates a AddressType business object from an immutable representation of a AddressType.
 59  
    * @param an immutable AddressType
 60  
    * @return a AddressTypeBo
 61  
    */
 62  
   static EntityExternalIdentifierTypeBo from(EntityExternalIdentifierType immutable) {
 63  0
     if (immutable == null) {return null}
 64  
 
 65  0
     EntityExternalIdentifierTypeBo bo = new EntityExternalIdentifierTypeBo()
 66  0
     bo.code = immutable.code
 67  0
     bo.name = immutable.name
 68  0
     bo.sortCode = immutable.sortCode
 69  0
     bo.active = immutable.active
 70  0
     bo.encryptionRequired = immutable.encryptionRequired
 71  0
     bo.versionNumber = immutable.versionNumber
 72  0
     bo.objectId = immutable.objectId
 73  
 
 74  0
     return bo;
 75  
   }
 76  
 }