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 @Override
037 public Class<?> getModelClass() {
038 return Country.class;
039 }
040
041 @Override
042 public String getModelClassName() {
043 return Country.class.getName();
044 }
045
046 @Override
047 public Map<String, Object> getModelAttributes() {
048 Map<String, Object> attributes = new HashMap<String, Object>();
049
050 attributes.put("countryId", getCountryId());
051 attributes.put("name", getName());
052 attributes.put("a2", getA2());
053 attributes.put("a3", getA3());
054 attributes.put("number", getNumber());
055 attributes.put("idd", getIdd());
056 attributes.put("zipRequired", getZipRequired());
057 attributes.put("active", getActive());
058
059 return attributes;
060 }
061
062 @Override
063 public void setModelAttributes(Map<String, Object> attributes) {
064 Long countryId = (Long)attributes.get("countryId");
065
066 if (countryId != null) {
067 setCountryId(countryId);
068 }
069
070 String name = (String)attributes.get("name");
071
072 if (name != null) {
073 setName(name);
074 }
075
076 String a2 = (String)attributes.get("a2");
077
078 if (a2 != null) {
079 setA2(a2);
080 }
081
082 String a3 = (String)attributes.get("a3");
083
084 if (a3 != null) {
085 setA3(a3);
086 }
087
088 String number = (String)attributes.get("number");
089
090 if (number != null) {
091 setNumber(number);
092 }
093
094 String idd = (String)attributes.get("idd");
095
096 if (idd != null) {
097 setIdd(idd);
098 }
099
100 Boolean zipRequired = (Boolean)attributes.get("zipRequired");
101
102 if (zipRequired != null) {
103 setZipRequired(zipRequired);
104 }
105
106 Boolean active = (Boolean)attributes.get("active");
107
108 if (active != null) {
109 setActive(active);
110 }
111 }
112
113
118 @Override
119 public long getPrimaryKey() {
120 return _country.getPrimaryKey();
121 }
122
123
128 @Override
129 public void setPrimaryKey(long primaryKey) {
130 _country.setPrimaryKey(primaryKey);
131 }
132
133
138 @Override
139 public long getCountryId() {
140 return _country.getCountryId();
141 }
142
143
148 @Override
149 public void setCountryId(long countryId) {
150 _country.setCountryId(countryId);
151 }
152
153
158 @Override
159 public java.lang.String getName() {
160 return _country.getName();
161 }
162
163
168 @Override
169 public void setName(java.lang.String name) {
170 _country.setName(name);
171 }
172
173
178 @Override
179 public java.lang.String getA2() {
180 return _country.getA2();
181 }
182
183
188 @Override
189 public void setA2(java.lang.String a2) {
190 _country.setA2(a2);
191 }
192
193
198 @Override
199 public java.lang.String getA3() {
200 return _country.getA3();
201 }
202
203
208 @Override
209 public void setA3(java.lang.String a3) {
210 _country.setA3(a3);
211 }
212
213
218 @Override
219 public java.lang.String getNumber() {
220 return _country.getNumber();
221 }
222
223
228 @Override
229 public void setNumber(java.lang.String number) {
230 _country.setNumber(number);
231 }
232
233
238 @Override
239 public java.lang.String getIdd() {
240 return _country.getIdd();
241 }
242
243
248 @Override
249 public void setIdd(java.lang.String idd) {
250 _country.setIdd(idd);
251 }
252
253
258 @Override
259 public boolean getZipRequired() {
260 return _country.getZipRequired();
261 }
262
263
268 @Override
269 public boolean isZipRequired() {
270 return _country.isZipRequired();
271 }
272
273
278 @Override
279 public void setZipRequired(boolean zipRequired) {
280 _country.setZipRequired(zipRequired);
281 }
282
283
288 @Override
289 public boolean getActive() {
290 return _country.getActive();
291 }
292
293
298 @Override
299 public boolean isActive() {
300 return _country.isActive();
301 }
302
303
308 @Override
309 public void setActive(boolean active) {
310 _country.setActive(active);
311 }
312
313 @Override
314 public boolean isNew() {
315 return _country.isNew();
316 }
317
318 @Override
319 public void setNew(boolean n) {
320 _country.setNew(n);
321 }
322
323 @Override
324 public boolean isCachedModel() {
325 return _country.isCachedModel();
326 }
327
328 @Override
329 public void setCachedModel(boolean cachedModel) {
330 _country.setCachedModel(cachedModel);
331 }
332
333 @Override
334 public boolean isEscapedModel() {
335 return _country.isEscapedModel();
336 }
337
338 @Override
339 public java.io.Serializable getPrimaryKeyObj() {
340 return _country.getPrimaryKeyObj();
341 }
342
343 @Override
344 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
345 _country.setPrimaryKeyObj(primaryKeyObj);
346 }
347
348 @Override
349 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
350 return _country.getExpandoBridge();
351 }
352
353 @Override
354 public void setExpandoBridgeAttributes(
355 com.liferay.portal.model.BaseModel<?> baseModel) {
356 _country.setExpandoBridgeAttributes(baseModel);
357 }
358
359 @Override
360 public void setExpandoBridgeAttributes(
361 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
362 _country.setExpandoBridgeAttributes(expandoBridge);
363 }
364
365 @Override
366 public void setExpandoBridgeAttributes(
367 com.liferay.portal.service.ServiceContext serviceContext) {
368 _country.setExpandoBridgeAttributes(serviceContext);
369 }
370
371 @Override
372 public java.lang.Object clone() {
373 return new CountryWrapper((Country)_country.clone());
374 }
375
376 @Override
377 public int compareTo(com.liferay.portal.model.Country country) {
378 return _country.compareTo(country);
379 }
380
381 @Override
382 public int hashCode() {
383 return _country.hashCode();
384 }
385
386 @Override
387 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.Country> toCacheModel() {
388 return _country.toCacheModel();
389 }
390
391 @Override
392 public com.liferay.portal.model.Country toEscapedModel() {
393 return new CountryWrapper(_country.toEscapedModel());
394 }
395
396 @Override
397 public com.liferay.portal.model.Country toUnescapedModel() {
398 return new CountryWrapper(_country.toUnescapedModel());
399 }
400
401 @Override
402 public java.lang.String toString() {
403 return _country.toString();
404 }
405
406 @Override
407 public java.lang.String toXmlString() {
408 return _country.toXmlString();
409 }
410
411 @Override
412 public java.lang.String getName(java.util.Locale locale) {
413 return _country.getName(locale);
414 }
415
416 @Override
417 public java.lang.String getNameCurrentLanguageId() {
418 return _country.getNameCurrentLanguageId();
419 }
420
421 @Override
422 public java.lang.String getNameCurrentValue() {
423 return _country.getNameCurrentValue();
424 }
425
426 @Override
427 public void setNameCurrentLanguageId(java.lang.String languageId) {
428 _country.setNameCurrentLanguageId(languageId);
429 }
430
431 @Override
432 public boolean equals(Object obj) {
433 if (this == obj) {
434 return true;
435 }
436
437 if (!(obj instanceof CountryWrapper)) {
438 return false;
439 }
440
441 CountryWrapper countryWrapper = (CountryWrapper)obj;
442
443 if (Validator.equals(_country, countryWrapper._country)) {
444 return true;
445 }
446
447 return false;
448 }
449
450
453 public Country getWrappedCountry() {
454 return _country;
455 }
456
457 @Override
458 public Country getWrappedModel() {
459 return _country;
460 }
461
462 @Override
463 public void resetOriginalValues() {
464 _country.resetOriginalValues();
465 }
466
467 private Country _country;
468 }