Coverage Report - org.kuali.rice.kim.bo.reference.impl.ExternalIdentifierTypeImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
ExternalIdentifierTypeImpl
0%
0/17
N/A
1
 
 1  
 /*
 2  
  * Copyright 2007-2008 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.reference.impl;
 17  
 
 18  
 import javax.persistence.AttributeOverride;
 19  
 import javax.persistence.AttributeOverrides;
 20  
 import javax.persistence.Column;
 21  
 import javax.persistence.Entity;
 22  
 import javax.persistence.Table;
 23  
 
 24  
 import org.hibernate.annotations.Type;
 25  
 import org.kuali.rice.kim.bo.reference.ExternalIdentifierType;
 26  
 import org.kuali.rice.kim.bo.reference.dto.ExternalIdentifierTypeInfo;
 27  
 
 28  
 /**
 29  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 30  
  */
 31  
 @Entity
 32  
 @Table(name="KRIM_EXT_ID_TYP_T")
 33  
 @AttributeOverrides({
 34  
         @AttributeOverride(name="code",column=@Column(name="EXT_ID_TYP_CD")),
 35  
         @AttributeOverride(name="name",column=@Column(name="NM"))
 36  
 })
 37  0
 public class ExternalIdentifierTypeImpl extends KimCodeBase implements ExternalIdentifierType {
 38  
 
 39  
         private static final long serialVersionUID = 1L;
 40  
 
 41  
     @Type(type="yes_no")
 42  
         @Column(name="ENCR_REQ_IND")
 43  
         protected boolean encryptionRequired;
 44  
         
 45  
         /**
 46  
          * @see org.kuali.rice.kim.bo.reference.ExternalIdentifierType#getExternalIdentifierTypeCode()
 47  
          */
 48  
         public String getExternalIdentifierTypeCode() {
 49  0
                 return getCode();
 50  
         }
 51  
 
 52  
         /**
 53  
          * @see org.kuali.rice.kim.bo.reference.ExternalIdentifierType#getExternalIdentifierTypeName()
 54  
          */
 55  
         public String getExternalIdentifierTypeName() {
 56  0
                 return getName();
 57  
         }
 58  
 
 59  
         /**
 60  
          * @see org.kuali.rice.kim.bo.reference.ExternalIdentifierType#setExternalIdentifierTypeCode(java.lang.String)
 61  
          */
 62  
         public void setExternalIdentifierTypeCode(String externalIdentifierTypeCode) {
 63  0
                 setCode(externalIdentifierTypeCode);
 64  0
         }
 65  
 
 66  
         /**
 67  
          * @see org.kuali.rice.kim.bo.reference.ExternalIdentifierType#setExternalIdentifierTypeName(java.lang.String)
 68  
          */
 69  
         public void setExternalIdentifierTypeName(String externalIdentifierTypeName) {
 70  0
                 setName(externalIdentifierTypeName);
 71  0
         }
 72  
 
 73  
         public boolean isEncryptionRequired() {
 74  0
                 return this.encryptionRequired;
 75  
         }
 76  
 
 77  
         public void setEncryptionRequired(boolean encryptionRequired) {
 78  0
                 this.encryptionRequired = encryptionRequired;
 79  0
         }
 80  
         
 81  
         public ExternalIdentifierTypeInfo toInfo() {
 82  0
                 ExternalIdentifierTypeInfo info = new ExternalIdentifierTypeInfo();
 83  0
                 info.setCode(code);
 84  0
                 info.setName(name);
 85  0
                 info.setActive(active);
 86  0
                 info.setEncryptionRequired(encryptionRequired);
 87  0
                 info.setDisplaySortCode(displaySortCode);
 88  0
                 return info;
 89  
         }
 90  
 }