Coverage Report - org.kuali.student.core.organization.assembly.data.server.org.OrgPositionHelper
 
Classes in this File Line Coverage Branch Coverage Complexity
OrgPositionHelper
0%
0/28
0%
0/2
1.105
OrgPositionHelper$Properties
0%
0/7
N/A
1.105
 
 1  
 /**
 2  
  * Copyright 2010 The Kuali Foundation Licensed under the
 3  
  * Educational Community License, Version 2.0 (the "License"); you may
 4  
  * not use this file except in compliance with the License. You may
 5  
  * obtain a copy of the License at
 6  
  *
 7  
  * http://www.osedu.org/licenses/ECL-2.0
 8  
  *
 9  
  * Unless required by applicable law or agreed to in writing,
 10  
  * software distributed under the License is distributed on an "AS IS"
 11  
  * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 12  
  * or implied. See the License for the specific language governing
 13  
  * permissions and limitations under the License.
 14  
  */
 15  
 
 16  
 package org.kuali.student.core.organization.assembly.data.server.org;
 17  
 
 18  
 import org.kuali.student.core.assembly.data.Data;
 19  
 import org.kuali.student.core.assembly.helper.PropertyEnum;
 20  
 
 21  
 public class OrgPositionHelper {
 22  
     private static final long serialVersionUID = 1L;
 23  
 
 24  0
     public enum Properties implements PropertyEnum {
 25  0
         ID("id"),ORG_ID("orgId"),PERSON_RELATION_TYPE("orgPersonRelationTypeKey"),TITLE("title"),
 26  0
         DESC("desc"),MIN_NUM_RELATIONS("minNumRelations"), MAX_NUM_RELATIONS("maxNumRelations");
 27  
 
 28  
         private final String key;
 29  
 
 30  0
         private Properties(final String key) {
 31  0
             this.key = key;
 32  0
         }
 33  
 
 34  
         @Override
 35  
         public String getKey() {
 36  0
             return this.key;
 37  
         }
 38  
     }
 39  
     
 40  
     private Data data;
 41  
     
 42  0
     private OrgPositionHelper(Data data){
 43  0
         this.data=data;
 44  0
     }
 45  
 
 46  
     public static OrgPositionHelper wrap (Data data)
 47  
     {
 48  0
         if (data == null)
 49  
         {
 50  0
              return null;
 51  
         }
 52  0
         return new OrgPositionHelper(data);
 53  
     }
 54  
     
 55  
     public Data getData(){
 56  0
         return data;
 57  
     }
 58  
     
 59  
     public void setId(String id){
 60  0
         data.set(Properties.ID.getKey(), id);
 61  0
     }
 62  
     
 63  
     public String getId() {
 64  0
         return data.get(Properties.ID.getKey());
 65  
     }
 66  
     
 67  
     public void setOrgId(String orgId){
 68  0
         data.set(Properties.ORG_ID.getKey(), orgId);
 69  0
     }
 70  
     
 71  
     public String getOrgId() {
 72  0
         return data.get(Properties.ORG_ID.getKey());
 73  
     }
 74  
     
 75  
     public void setPersonRelationType(String personRelationType){
 76  0
         data.set(Properties.PERSON_RELATION_TYPE.getKey(), personRelationType);
 77  0
     }
 78  
     
 79  
     public String getPersonRelationType() {
 80  0
         return data.get(Properties.PERSON_RELATION_TYPE.getKey());
 81  
     }
 82  
     
 83  
     public void setTitle(String title) {
 84  0
         data.set(Properties.TITLE.getKey(), title);
 85  0
     }
 86  
     
 87  
     public String getTitle() {
 88  0
         return data.get(Properties.TITLE.getKey());
 89  
     }
 90  
     
 91  
     public void setDesc(String desc) {
 92  0
         data.set(Properties.DESC.getKey(), desc);
 93  0
     }
 94  
     
 95  
     public String getDesc() {
 96  0
         return data.get(Properties.DESC.getKey());
 97  
     }
 98  
     
 99  
     public Integer getMinNumRelations() {
 100  0
         return Integer.parseInt((String)data.get(Properties.MIN_NUM_RELATIONS.getKey()));
 101  
     }
 102  
     
 103  
     public void setMinNumRelations(Integer value)  {
 104  0
         data.set(Properties.MIN_NUM_RELATIONS.getKey(), value);
 105  0
     }
 106  
     
 107  
     public String getMaxNumRelations() {
 108  0
         return data.get(Properties.MAX_NUM_RELATIONS.getKey());
 109  
     }
 110  
     
 111  
     public void setMaxNumRelations(String value)  {
 112  0
         data.set(Properties.MAX_NUM_RELATIONS.getKey(), value);
 113  0
     }
 114  
     
 115  
 
 116  
     
 117  
 }