| 1 |  |   | 
  | 2 |  |   | 
  | 3 |  |   | 
  | 4 |  |   | 
  | 5 |  |   | 
  | 6 |  |   | 
  | 7 |  |   | 
  | 8 |  |   | 
  | 9 |  |   | 
  | 10 |  |   | 
  | 11 |  |   | 
  | 12 |  |   | 
  | 13 |  |   | 
  | 14 |  |   | 
  | 15 |  |   | 
  | 16 |  |  package org.kuali.student.core.organization.assembly.data.server.org; | 
  | 17 |  |   | 
  | 18 |  |  import org.kuali.student.common.assembly.data.Data; | 
  | 19 |  |  import org.kuali.student.common.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 |  |  } |