01: /*
02: * Copyright 2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
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:
17: package org.kuali.kfs.bo;
18:
19: import java.util.LinkedHashMap;
20:
21: import org.kuali.core.bo.PersistableBusinessObjectBase;
22:
23: /**
24: *
25: */
26: public class State extends PersistableBusinessObjectBase {
27:
28: private String postalStateCode;
29: private String postalStateName;
30:
31: /**
32: * Default no-arg constructor.
33: */
34: public State() {
35:
36: }
37:
38: /**
39: * Gets the postalStateCode attribute.
40: *
41: * @return Returns the postalStateCode
42: */
43: public String getPostalStateCode() {
44: return postalStateCode;
45: }
46:
47: /**
48: * Sets the postalStateCode attribute.
49: *
50: * @param postalStateCode The postalStateCode to set.
51: */
52: public void setPostalStateCode(String postalStateCode) {
53: this .postalStateCode = postalStateCode;
54: }
55:
56: /**
57: * Gets the postalStateName attribute.
58: *
59: * @return Returns the postalStateName
60: */
61: public String getPostalStateName() {
62: return postalStateName;
63: }
64:
65: /**
66: * Sets the postalStateName attribute.
67: *
68: * @param postalStateName The postalStateName to set.
69: */
70: public void setPostalStateName(String postalStateName) {
71: this .postalStateName = postalStateName;
72: }
73:
74: /**
75: * @return Returns the code and description in format: xx - xxxxxxxxxxxxxxxx
76: */
77: public String getCodeAndDescription() {
78: String theString = getPostalStateCode() + " - "
79: + getPostalStateName();
80: return theString;
81: }
82:
83: /**
84: * @see org.kuali.core.bo.BusinessObjectBase#toStringMapper()
85: */
86: protected LinkedHashMap toStringMapper() {
87: LinkedHashMap m = new LinkedHashMap();
88: m.put("postalStateCode", this.postalStateCode);
89: return m;
90: }
91: }
|