001
014
015 package com.liferay.portal.model;
016
017 import java.util.HashMap;
018 import java.util.Map;
019
020
029 public class RegionWrapper implements Region, ModelWrapper<Region> {
030 public RegionWrapper(Region region) {
031 _region = region;
032 }
033
034 public Class<?> getModelClass() {
035 return Region.class;
036 }
037
038 public String getModelClassName() {
039 return Region.class.getName();
040 }
041
042 public Map<String, Object> getModelAttributes() {
043 Map<String, Object> attributes = new HashMap<String, Object>();
044
045 attributes.put("regionId", getRegionId());
046 attributes.put("countryId", getCountryId());
047 attributes.put("regionCode", getRegionCode());
048 attributes.put("name", getName());
049 attributes.put("active", getActive());
050
051 return attributes;
052 }
053
054 public void setModelAttributes(Map<String, Object> attributes) {
055 Long regionId = (Long)attributes.get("regionId");
056
057 if (regionId != null) {
058 setRegionId(regionId);
059 }
060
061 Long countryId = (Long)attributes.get("countryId");
062
063 if (countryId != null) {
064 setCountryId(countryId);
065 }
066
067 String regionCode = (String)attributes.get("regionCode");
068
069 if (regionCode != null) {
070 setRegionCode(regionCode);
071 }
072
073 String name = (String)attributes.get("name");
074
075 if (name != null) {
076 setName(name);
077 }
078
079 Boolean active = (Boolean)attributes.get("active");
080
081 if (active != null) {
082 setActive(active);
083 }
084 }
085
086
091 public long getPrimaryKey() {
092 return _region.getPrimaryKey();
093 }
094
095
100 public void setPrimaryKey(long primaryKey) {
101 _region.setPrimaryKey(primaryKey);
102 }
103
104
109 public long getRegionId() {
110 return _region.getRegionId();
111 }
112
113
118 public void setRegionId(long regionId) {
119 _region.setRegionId(regionId);
120 }
121
122
127 public long getCountryId() {
128 return _region.getCountryId();
129 }
130
131
136 public void setCountryId(long countryId) {
137 _region.setCountryId(countryId);
138 }
139
140
145 public java.lang.String getRegionCode() {
146 return _region.getRegionCode();
147 }
148
149
154 public void setRegionCode(java.lang.String regionCode) {
155 _region.setRegionCode(regionCode);
156 }
157
158
163 public java.lang.String getName() {
164 return _region.getName();
165 }
166
167
172 public void setName(java.lang.String name) {
173 _region.setName(name);
174 }
175
176
181 public boolean getActive() {
182 return _region.getActive();
183 }
184
185
190 public boolean isActive() {
191 return _region.isActive();
192 }
193
194
199 public void setActive(boolean active) {
200 _region.setActive(active);
201 }
202
203 public boolean isNew() {
204 return _region.isNew();
205 }
206
207 public void setNew(boolean n) {
208 _region.setNew(n);
209 }
210
211 public boolean isCachedModel() {
212 return _region.isCachedModel();
213 }
214
215 public void setCachedModel(boolean cachedModel) {
216 _region.setCachedModel(cachedModel);
217 }
218
219 public boolean isEscapedModel() {
220 return _region.isEscapedModel();
221 }
222
223 public java.io.Serializable getPrimaryKeyObj() {
224 return _region.getPrimaryKeyObj();
225 }
226
227 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
228 _region.setPrimaryKeyObj(primaryKeyObj);
229 }
230
231 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
232 return _region.getExpandoBridge();
233 }
234
235 public void setExpandoBridgeAttributes(
236 com.liferay.portal.service.ServiceContext serviceContext) {
237 _region.setExpandoBridgeAttributes(serviceContext);
238 }
239
240 @Override
241 public java.lang.Object clone() {
242 return new RegionWrapper((Region)_region.clone());
243 }
244
245 public int compareTo(com.liferay.portal.model.Region region) {
246 return _region.compareTo(region);
247 }
248
249 @Override
250 public int hashCode() {
251 return _region.hashCode();
252 }
253
254 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.Region> toCacheModel() {
255 return _region.toCacheModel();
256 }
257
258 public com.liferay.portal.model.Region toEscapedModel() {
259 return new RegionWrapper(_region.toEscapedModel());
260 }
261
262 public com.liferay.portal.model.Region toUnescapedModel() {
263 return new RegionWrapper(_region.toUnescapedModel());
264 }
265
266 @Override
267 public java.lang.String toString() {
268 return _region.toString();
269 }
270
271 public java.lang.String toXmlString() {
272 return _region.toXmlString();
273 }
274
275
278 public Region getWrappedRegion() {
279 return _region;
280 }
281
282 public Region getWrappedModel() {
283 return _region;
284 }
285
286 public void resetOriginalValues() {
287 _region.resetOriginalValues();
288 }
289
290 private Region _region;
291 }