Coverage Report - org.kuali.student.core.organization.assembly.data.client.OrgHelper
 
Classes in this File Line Coverage Branch Coverage Complexity
OrgHelper
0%
0/22
0%
0/4
1.2
OrgHelper$Properties
0%
0/10
N/A
1.2
 
 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.client;
 17  
 
 18  
 
 19  
 import org.kuali.student.common.assembly.data.Data;
 20  
 import org.kuali.student.common.assembly.helper.PropertyEnum;
 21  
 
 22  
 
 23  
 
 24  
 public class OrgHelper
 25  
 {
 26  
         private static final long serialVersionUID = 1;
 27  
         
 28  0
         public enum Properties implements PropertyEnum
 29  
         {
 30  0
                 TYPE ("type"),
 31  0
                 NAME ("name"),
 32  0
                 ABBR ("abbr"),
 33  0
                 _RUNTIME_DATA ("_runtimeData"),
 34  0
                 VERSIONS ("versions");
 35  
                 
 36  
                 private final String key;
 37  
                 
 38  
                 private Properties (final String key)
 39  0
                 {
 40  0
                         this.key = key;
 41  0
                 }
 42  
                 
 43  
                 @Override
 44  
                 public String getKey ()
 45  
                 {
 46  0
                         return this.key;
 47  
                 }
 48  
         }
 49  
         private Data data;
 50  
         
 51  
         private OrgHelper (Data data)
 52  0
         {
 53  0
                 this.data = data;
 54  0
         }
 55  
         
 56  
         public static OrgHelper wrap (Data data)
 57  
         {
 58  0
                 if (data == null)
 59  
                 {
 60  0
                          return null;
 61  
                 }
 62  0
                 return new OrgHelper (data);
 63  
         }
 64  
         
 65  
         public Data getData ()
 66  
         {
 67  0
                 return data;
 68  
         }
 69  
         
 70  
         
 71  
         public void setType (String value)
 72  
         {
 73  0
                 data.set (Properties.TYPE.getKey (), value);
 74  0
         }
 75  
         
 76  
         
 77  
         public String getType ()
 78  
         {
 79  0
                 return (String) data.get (Properties.TYPE.getKey ());
 80  
         }
 81  
         
 82  
         
 83  
         public void setName (String value)
 84  
         {
 85  0
                 data.set (Properties.NAME.getKey (), value);
 86  0
         }
 87  
         
 88  
         
 89  
         public String getName ()
 90  
         {
 91  0
                 return (String) data.get (Properties.NAME.getKey ());
 92  
         }
 93  
         
 94  
         
 95  
         public void setAbbr (String value)
 96  
         {
 97  0
                 data.set (Properties.ABBR.getKey (), value);
 98  0
         }
 99  
         
 100  
         
 101  
         public String getAbbr ()
 102  
         {
 103  0
                 return (String) data.get (Properties.ABBR.getKey ());
 104  
         }
 105  
         
 106  
         
 107  
         public void set_runtimeData (RuntimeDataHelper value)
 108  
         {
 109  0
                 data.set (Properties._RUNTIME_DATA.getKey (), (value == null) ? null : value.getData ());
 110  0
         }
 111  
         
 112  
         
 113  
         public RuntimeDataHelper get_runtimeData ()
 114  
         {
 115  0
                 return RuntimeDataHelper.wrap ((Data) data.get (Properties._RUNTIME_DATA.getKey ()));
 116  
         }
 117  
         
 118  
         
 119  
         public void setVersions (Data value)
 120  
         {
 121  0
                 data.set (Properties.VERSIONS.getKey (), value);
 122  0
         }
 123  
         
 124  
         
 125  
         public Data getVersions ()
 126  
         {
 127  0
                 return (Data) data.get (Properties.VERSIONS.getKey ());
 128  
         }
 129  
         
 130  
 }
 131