1 package org.kuali.ole.location.bo;
2
3 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
4
5 import java.util.LinkedHashMap;
6
7 /**
8 * The OleLocation is a BO class that defines the location fields with getters and setters which
9 * is used for interacting the location data with the persistence layer in OLE.
10 */
11 public class OleLocation extends PersistableBusinessObjectBase {
12
13 private String locationId;
14 private String locationCode;
15 private String locationName;
16 private String parentLocationId;
17 private String levelId;
18 private String levelCode;
19 private OleLocation oleLocation;
20 private OleLocationLevel oleLocationLevel;
21
22 /**
23 * Gets the levelCode string value from this OleLocation class
24 * @return levelCode
25 */
26 public String getLevelCode() {
27 return oleLocationLevel.getLevelCode();
28 }
29
30 /**
31 * Sets the levelCode string value inside this OleLocation class
32 * @param levelCode
33 */
34 public void setLevelCode(String levelCode) {
35 this.levelCode = levelCode;
36 }
37
38 /**
39 * Gets the parentLocationId string value from this OleLocation class
40 * @return parentLocationId
41 */
42 public String getParentLocationId() {
43 return parentLocationId;
44 }
45
46 /**
47 * Sets the parentLocationId string value inside this OleLocation class
48 * @param parentLocationId
49 */
50 public void setParentLocationId(String parentLocationId) {
51 if(parentLocationId != null && parentLocationId.equals(""))
52 this.parentLocationId = null;
53 else
54 this.parentLocationId = parentLocationId;
55 }
56
57 /**
58 * Gets the locationName string value from this OleLocation class
59 * @return locationName
60 */
61 public String getLocationName() {
62 return locationName;
63 }
64
65 /**
66 * Sets the locationName string value inside this OleLocation class
67 * @param locationName
68 */
69 public void setLocationName(String locationName) {
70 this.locationName = locationName;
71 }
72
73 /**
74 * Gets the locationCode string value from this OleLocation class
75 * @return locationCode
76 */
77 public String getLocationCode() {
78 return locationCode;
79 }
80
81 /**
82 * Sets the locationCode string value inside this OleLocation class
83 * @param locationCode
84 */
85 public void setLocationCode(String locationCode) {
86 this.locationCode = locationCode;
87 }
88
89 /**
90 * Gets the locationId string value from this OleLocation class
91 * @return locationId
92 */
93 public String getLocationId() {
94 return locationId;
95 }
96
97 /**
98 * Sets the locationId string value inside this OleLocation class
99 * @param locationId
100 */
101 public void setLocationId(String locationId) {
102 this.locationId = locationId;
103 }
104
105 /**
106 * Gets the oleLocation object value from this OleLocation class
107 * @return oleLocation
108 */
109 public OleLocation getOleLocation() {
110 return oleLocation;
111 }
112
113 /**
114 * Sets the oleLocation value inside this OleLocation class
115 * @param oleLocation
116 */
117 public void setOleLocation(OleLocation oleLocation) {
118 this.oleLocation = oleLocation;
119 }
120
121 /**
122 * Gets the levelId string value from this OleLocation class
123 * @return levelId
124 */
125 public String getLevelId() {
126 return levelId;
127 }
128
129 /**
130 * Sets the levelId string value inside this OleLocation class
131 * @param levelId
132 */
133 public void setLevelId(String levelId) {
134 this.levelId = levelId;
135 }
136
137 /**
138 * Gets the oleLocationLevel object value from this OleLocation class
139 * @return oleLocationLevel
140 */
141 public OleLocationLevel getOleLocationLevel() {
142 return oleLocationLevel;
143 }
144
145 /**
146 * Sets the oleLocationLevel value inside this OleLocation class
147 * @param oleLocationLevel
148 */
149 public void setOleLocationLevel(OleLocationLevel oleLocationLevel) {
150 this.oleLocationLevel = oleLocationLevel;
151 }
152
153 /**
154 * This method returns a map that contains the Primary Key value of this OleLocation class
155 * @return toStringMap
156 */
157 protected LinkedHashMap toStringMapper() {
158 LinkedHashMap toStringMap = new LinkedHashMap();
159 toStringMap.put("locationId", locationId);
160 return toStringMap;
161 }
162 }