001
014
015 package com.liferay.portal.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018
019 import java.util.HashMap;
020 import java.util.Map;
021
022
031 public class CountryWrapper implements Country, ModelWrapper<Country> {
032 public CountryWrapper(Country country) {
033 _country = country;
034 }
035
036 public Class<?> getModelClass() {
037 return Country.class;
038 }
039
040 public String getModelClassName() {
041 return Country.class.getName();
042 }
043
044 public Map<String, Object> getModelAttributes() {
045 Map<String, Object> attributes = new HashMap<String, Object>();
046
047 attributes.put("countryId", getCountryId());
048 attributes.put("name", getName());
049 attributes.put("a2", getA2());
050 attributes.put("a3", getA3());
051 attributes.put("number", getNumber());
052 attributes.put("idd", getIdd());
053 attributes.put("zipRequired", getZipRequired());
054 attributes.put("active", getActive());
055
056 return attributes;
057 }
058
059 public void setModelAttributes(Map<String, Object> attributes) {
060 Long countryId = (Long)attributes.get("countryId");
061
062 if (countryId != null) {
063 setCountryId(countryId);
064 }
065
066 String name = (String)attributes.get("name");
067
068 if (name != null) {
069 setName(name);
070 }
071
072 String a2 = (String)attributes.get("a2");
073
074 if (a2 != null) {
075 setA2(a2);
076 }
077
078 String a3 = (String)attributes.get("a3");
079
080 if (a3 != null) {
081 setA3(a3);
082 }
083
084 String number = (String)attributes.get("number");
085
086 if (number != null) {
087 setNumber(number);
088 }
089
090 String idd = (String)attributes.get("idd");
091
092 if (idd != null) {
093 setIdd(idd);
094 }
095
096 Boolean zipRequired = (Boolean)attributes.get("zipRequired");
097
098 if (zipRequired != null) {
099 setZipRequired(zipRequired);
100 }
101
102 Boolean active = (Boolean)attributes.get("active");
103
104 if (active != null) {
105 setActive(active);
106 }
107 }
108
109
114 public long getPrimaryKey() {
115 return _country.getPrimaryKey();
116 }
117
118
123 public void setPrimaryKey(long primaryKey) {
124 _country.setPrimaryKey(primaryKey);
125 }
126
127
132 public long getCountryId() {
133 return _country.getCountryId();
134 }
135
136
141 public void setCountryId(long countryId) {
142 _country.setCountryId(countryId);
143 }
144
145
150 public java.lang.String getName() {
151 return _country.getName();
152 }
153
154
159 public void setName(java.lang.String name) {
160 _country.setName(name);
161 }
162
163
168 public java.lang.String getA2() {
169 return _country.getA2();
170 }
171
172
177 public void setA2(java.lang.String a2) {
178 _country.setA2(a2);
179 }
180
181
186 public java.lang.String getA3() {
187 return _country.getA3();
188 }
189
190
195 public void setA3(java.lang.String a3) {
196 _country.setA3(a3);
197 }
198
199
204 public java.lang.String getNumber() {
205 return _country.getNumber();
206 }
207
208
213 public void setNumber(java.lang.String number) {
214 _country.setNumber(number);
215 }
216
217
222 public java.lang.String getIdd() {
223 return _country.getIdd();
224 }
225
226
231 public void setIdd(java.lang.String idd) {
232 _country.setIdd(idd);
233 }
234
235
240 public boolean getZipRequired() {
241 return _country.getZipRequired();
242 }
243
244
249 public boolean isZipRequired() {
250 return _country.isZipRequired();
251 }
252
253
258 public void setZipRequired(boolean zipRequired) {
259 _country.setZipRequired(zipRequired);
260 }
261
262
267 public boolean getActive() {
268 return _country.getActive();
269 }
270
271
276 public boolean isActive() {
277 return _country.isActive();
278 }
279
280
285 public void setActive(boolean active) {
286 _country.setActive(active);
287 }
288
289 public boolean isNew() {
290 return _country.isNew();
291 }
292
293 public void setNew(boolean n) {
294 _country.setNew(n);
295 }
296
297 public boolean isCachedModel() {
298 return _country.isCachedModel();
299 }
300
301 public void setCachedModel(boolean cachedModel) {
302 _country.setCachedModel(cachedModel);
303 }
304
305 public boolean isEscapedModel() {
306 return _country.isEscapedModel();
307 }
308
309 public java.io.Serializable getPrimaryKeyObj() {
310 return _country.getPrimaryKeyObj();
311 }
312
313 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
314 _country.setPrimaryKeyObj(primaryKeyObj);
315 }
316
317 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
318 return _country.getExpandoBridge();
319 }
320
321 public void setExpandoBridgeAttributes(
322 com.liferay.portal.service.ServiceContext serviceContext) {
323 _country.setExpandoBridgeAttributes(serviceContext);
324 }
325
326 @Override
327 public java.lang.Object clone() {
328 return new CountryWrapper((Country)_country.clone());
329 }
330
331 public int compareTo(com.liferay.portal.model.Country country) {
332 return _country.compareTo(country);
333 }
334
335 @Override
336 public int hashCode() {
337 return _country.hashCode();
338 }
339
340 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.Country> toCacheModel() {
341 return _country.toCacheModel();
342 }
343
344 public com.liferay.portal.model.Country toEscapedModel() {
345 return new CountryWrapper(_country.toEscapedModel());
346 }
347
348 public com.liferay.portal.model.Country toUnescapedModel() {
349 return new CountryWrapper(_country.toUnescapedModel());
350 }
351
352 @Override
353 public java.lang.String toString() {
354 return _country.toString();
355 }
356
357 public java.lang.String toXmlString() {
358 return _country.toXmlString();
359 }
360
361 @Override
362 public boolean equals(Object obj) {
363 if (this == obj) {
364 return true;
365 }
366
367 if (!(obj instanceof CountryWrapper)) {
368 return false;
369 }
370
371 CountryWrapper countryWrapper = (CountryWrapper)obj;
372
373 if (Validator.equals(_country, countryWrapper._country)) {
374 return true;
375 }
376
377 return false;
378 }
379
380
383 public Country getWrappedCountry() {
384 return _country;
385 }
386
387 public Country getWrappedModel() {
388 return _country;
389 }
390
391 public void resetOriginalValues() {
392 _country.resetOriginalValues();
393 }
394
395 private Country _country;
396 }