| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| StateImpl |
|
| 1.0;1 |
| 1 | /* | |
| 2 | * Copyright 2007-2009 The Kuali Foundation | |
| 3 | * | |
| 4 | * Licensed under the Educational Community License, Version 2.0 (the "License"); | |
| 5 | * you may not use this file except in compliance with the License. | |
| 6 | * You may obtain a copy of the License at | |
| 7 | * | |
| 8 | * http://www.opensource.org/licenses/ecl2.php | |
| 9 | * | |
| 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.rice.kns.bo; | |
| 18 | ||
| 19 | import java.util.LinkedHashMap; | |
| 20 | ||
| 21 | import org.kuali.rice.kns.bo.Inactivateable; | |
| 22 | import org.kuali.rice.kns.bo.PersistableBusinessObjectBase; | |
| 23 | ||
| 24 | /** | |
| 25 | * | |
| 26 | */ | |
| 27 | public class StateImpl extends PersistableBusinessObjectBase implements Inactivateable, State { | |
| 28 | ||
| 29 | private String postalCountryCode; | |
| 30 | private String postalStateCode; | |
| 31 | private String postalStateName; | |
| 32 | private boolean active; | |
| 33 | ||
| 34 | private Country country; | |
| 35 | ||
| 36 | /** | |
| 37 | * Default no-arg constructor. | |
| 38 | */ | |
| 39 | 0 | public StateImpl() { |
| 40 | ||
| 41 | 0 | } |
| 42 | ||
| 43 | /** | |
| 44 | * Gets the postalStateCode attribute. | |
| 45 | * | |
| 46 | * @return Returns the postalStateCode | |
| 47 | */ | |
| 48 | public String getPostalStateCode() { | |
| 49 | 0 | return postalStateCode; |
| 50 | } | |
| 51 | ||
| 52 | /** | |
| 53 | * Sets the postalStateCode attribute. | |
| 54 | * | |
| 55 | * @param postalStateCode The postalStateCode to set. | |
| 56 | */ | |
| 57 | public void setPostalStateCode(String postalStateCode) { | |
| 58 | 0 | this.postalStateCode = postalStateCode; |
| 59 | 0 | } |
| 60 | ||
| 61 | /** | |
| 62 | * Gets the postalStateName attribute. | |
| 63 | * | |
| 64 | * @return Returns the postalStateName | |
| 65 | */ | |
| 66 | public String getPostalStateName() { | |
| 67 | 0 | return postalStateName; |
| 68 | } | |
| 69 | ||
| 70 | /** | |
| 71 | * Sets the postalStateName attribute. | |
| 72 | * | |
| 73 | * @param postalStateName The postalStateName to set. | |
| 74 | */ | |
| 75 | public void setPostalStateName(String postalStateName) { | |
| 76 | 0 | this.postalStateName = postalStateName; |
| 77 | 0 | } |
| 78 | ||
| 79 | ||
| 80 | /** | |
| 81 | * @return Returns the code and description in format: xx - xxxxxxxxxxxxxxxx | |
| 82 | */ | |
| 83 | public String getCodeAndDescription() { | |
| 84 | 0 | String theString = getPostalStateCode() + " - " + getPostalStateName(); |
| 85 | 0 | return theString; |
| 86 | } | |
| 87 | ||
| 88 | /** | |
| 89 | * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper() | |
| 90 | */ | |
| 91 | protected LinkedHashMap toStringMapper() { | |
| 92 | 0 | LinkedHashMap m = new LinkedHashMap(); |
| 93 | 0 | m.put("postalStateCode", this.postalStateCode); |
| 94 | 0 | return m; |
| 95 | } | |
| 96 | ||
| 97 | /** | |
| 98 | * Gets the active attribute. | |
| 99 | * | |
| 100 | * @return Returns the active. | |
| 101 | */ | |
| 102 | public boolean isActive() { | |
| 103 | 0 | return active; |
| 104 | } | |
| 105 | ||
| 106 | /** | |
| 107 | * Sets the active attribute value. | |
| 108 | * | |
| 109 | * @param active The active to set. | |
| 110 | */ | |
| 111 | public void setActive(boolean active) { | |
| 112 | 0 | this.active = active; |
| 113 | 0 | } |
| 114 | ||
| 115 | /** | |
| 116 | * Gets the postalCountryCode attribute. | |
| 117 | * | |
| 118 | * @return Returns the postalCountryCode. | |
| 119 | */ | |
| 120 | public String getPostalCountryCode() { | |
| 121 | 0 | return postalCountryCode; |
| 122 | } | |
| 123 | ||
| 124 | /** | |
| 125 | * Sets the postalCountryCode attribute value. | |
| 126 | * | |
| 127 | * @param postalCountryCode The postalCountryCode to set. | |
| 128 | */ | |
| 129 | public void setPostalCountryCode(String postalCountryCode) { | |
| 130 | 0 | this.postalCountryCode = postalCountryCode; |
| 131 | 0 | } |
| 132 | ||
| 133 | /** | |
| 134 | * Gets the country attribute. | |
| 135 | * | |
| 136 | * @return Returns the country. | |
| 137 | */ | |
| 138 | public Country getCountry() { | |
| 139 | 0 | return country; |
| 140 | } | |
| 141 | ||
| 142 | /** | |
| 143 | * Sets the country attribute value. | |
| 144 | * | |
| 145 | * @param country The country to set. | |
| 146 | */ | |
| 147 | public void setCountry(Country country) { | |
| 148 | 0 | this.country = country; |
| 149 | 0 | } |
| 150 | ||
| 151 | } |