Coverage Report - org.kuali.rice.kim.bo.types.dto.KimTypeInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
KimTypeInfo
0%
0/30
0%
0/16
1.923
 
 1  
 /*
 2  
  * Copyright 2007-2009 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.types.dto;
 17  
 
 18  
 import java.io.Serializable;
 19  
 import java.util.ArrayList;
 20  
 import java.util.List;
 21  
 
 22  
 import org.apache.commons.lang.StringUtils;
 23  
 import org.kuali.rice.kim.bo.KimType;
 24  
 import org.kuali.rice.kns.bo.TransientBusinessObjectBase;
 25  
 
 26  
 /**
 27  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 28  
  */
 29  
 public class KimTypeInfo extends TransientBusinessObjectBase implements KimType, Serializable {
 30  
 
 31  
         private static final long serialVersionUID = 4229466320569714756L;
 32  
         
 33  
         protected String kimTypeId;
 34  
         protected String name;
 35  
         protected String namespaceCode;
 36  
         protected String kimTypeServiceName;
 37  
 
 38  
         protected List<KimTypeAttributeInfo> attributeDefinitions;
 39  
 
 40  0
         public KimTypeInfo() {
 41  0
                 attributeDefinitions = new ArrayList<KimTypeAttributeInfo> ();
 42  0
         }
 43  
 
 44  
         public List<KimTypeAttributeInfo> getAttributeDefinitions() {
 45  0
                 return attributeDefinitions;
 46  
         }
 47  
 
 48  
         public String getKimTypeId() {
 49  0
                 return kimTypeId;
 50  
         }
 51  
 
 52  
         public String getKimTypeServiceName() {
 53  0
                 return kimTypeServiceName;
 54  
         }
 55  
 
 56  
         public String getName() {
 57  0
                 return name;
 58  
         }
 59  
 
 60  
         public void setAttributeDefinitions(List<KimTypeAttributeInfo> attributeDefinitions) {
 61  0
                 this.attributeDefinitions = attributeDefinitions;
 62  0
         }
 63  
         
 64  
         public KimTypeAttributeInfo getAttributeDefinition( String kimAttributeId ) {
 65  0
                 if ( kimAttributeId == null || attributeDefinitions == null ) {
 66  0
                         return null;
 67  
                 }
 68  0
                 for ( KimTypeAttributeInfo def : attributeDefinitions ) {
 69  0
                         if ( def.kimAttributeId.equals( kimAttributeId ) ) {
 70  0
                                 return def;
 71  
                         }
 72  
                 }
 73  0
                 return null;
 74  
         }
 75  
 
 76  
         public KimTypeAttributeInfo getAttributeDefinitionByName( String attributeName ) {
 77  0
                 if ( attributeName == null || attributeDefinitions == null ) {
 78  0
                         return null;
 79  
                 }
 80  0
                 for ( KimTypeAttributeInfo def : attributeDefinitions ) {
 81  0
                         if ( StringUtils.equals(def.attributeName, attributeName) ) {
 82  0
                                 return def;
 83  
                         }
 84  
                 }
 85  0
                 return null;
 86  
         }
 87  
         
 88  
         public void setKimTypeServiceName(String kimTypeServiceName) {
 89  0
                 this.kimTypeServiceName = kimTypeServiceName;
 90  0
         }
 91  
 
 92  
         public void setName(String name) {
 93  0
                 this.name = name;
 94  0
         }
 95  
 
 96  
         public String getNamespaceCode() {
 97  0
                 return this.namespaceCode;
 98  
         }
 99  
 
 100  
         public void setNamespaceCode(String namespaceCode) {
 101  0
                 this.namespaceCode = namespaceCode;
 102  0
         }
 103  
 
 104  
         public void setKimTypeId(String kimTypeId) {
 105  0
                 this.kimTypeId = kimTypeId;
 106  0
         }
 107  
 }