001
014
015 package com.liferay.portal.model;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.util.Validator;
020 import com.liferay.portal.service.ServiceContext;
021
022 import com.liferay.portlet.expando.model.ExpandoBridge;
023
024 import java.io.Serializable;
025
026 import java.util.HashMap;
027 import java.util.Map;
028
029
038 @ProviderType
039 public class CountryWrapper implements Country, ModelWrapper<Country> {
040 public CountryWrapper(Country country) {
041 _country = country;
042 }
043
044 @Override
045 public Class<?> getModelClass() {
046 return Country.class;
047 }
048
049 @Override
050 public String getModelClassName() {
051 return Country.class.getName();
052 }
053
054 @Override
055 public Map<String, Object> getModelAttributes() {
056 Map<String, Object> attributes = new HashMap<String, Object>();
057
058 attributes.put("mvccVersion", getMvccVersion());
059 attributes.put("countryId", getCountryId());
060 attributes.put("name", getName());
061 attributes.put("a2", getA2());
062 attributes.put("a3", getA3());
063 attributes.put("number", getNumber());
064 attributes.put("idd", getIdd());
065 attributes.put("zipRequired", getZipRequired());
066 attributes.put("active", getActive());
067
068 return attributes;
069 }
070
071 @Override
072 public void setModelAttributes(Map<String, Object> attributes) {
073 Long mvccVersion = (Long)attributes.get("mvccVersion");
074
075 if (mvccVersion != null) {
076 setMvccVersion(mvccVersion);
077 }
078
079 Long countryId = (Long)attributes.get("countryId");
080
081 if (countryId != null) {
082 setCountryId(countryId);
083 }
084
085 String name = (String)attributes.get("name");
086
087 if (name != null) {
088 setName(name);
089 }
090
091 String a2 = (String)attributes.get("a2");
092
093 if (a2 != null) {
094 setA2(a2);
095 }
096
097 String a3 = (String)attributes.get("a3");
098
099 if (a3 != null) {
100 setA3(a3);
101 }
102
103 String number = (String)attributes.get("number");
104
105 if (number != null) {
106 setNumber(number);
107 }
108
109 String idd = (String)attributes.get("idd");
110
111 if (idd != null) {
112 setIdd(idd);
113 }
114
115 Boolean zipRequired = (Boolean)attributes.get("zipRequired");
116
117 if (zipRequired != null) {
118 setZipRequired(zipRequired);
119 }
120
121 Boolean active = (Boolean)attributes.get("active");
122
123 if (active != null) {
124 setActive(active);
125 }
126 }
127
128 @Override
129 public java.lang.Object clone() {
130 return new CountryWrapper((Country)_country.clone());
131 }
132
133 @Override
134 public int compareTo(com.liferay.portal.model.Country country) {
135 return _country.compareTo(country);
136 }
137
138
143 @Override
144 public java.lang.String getA2() {
145 return _country.getA2();
146 }
147
148
153 @Override
154 public java.lang.String getA3() {
155 return _country.getA3();
156 }
157
158
163 @Override
164 public boolean getActive() {
165 return _country.getActive();
166 }
167
168
173 @Override
174 public long getCountryId() {
175 return _country.getCountryId();
176 }
177
178 @Override
179 public ExpandoBridge getExpandoBridge() {
180 return _country.getExpandoBridge();
181 }
182
183
188 @Override
189 public java.lang.String getIdd() {
190 return _country.getIdd();
191 }
192
193
198 @Override
199 public long getMvccVersion() {
200 return _country.getMvccVersion();
201 }
202
203
208 @Override
209 public java.lang.String getName() {
210 return _country.getName();
211 }
212
213 @Override
214 public java.lang.String getName(java.util.Locale locale) {
215 return _country.getName(locale);
216 }
217
218 @Override
219 public java.lang.String getNameCurrentLanguageId() {
220 return _country.getNameCurrentLanguageId();
221 }
222
223 @Override
224 public java.lang.String getNameCurrentValue() {
225 return _country.getNameCurrentValue();
226 }
227
228
233 @Override
234 public java.lang.String getNumber() {
235 return _country.getNumber();
236 }
237
238
243 @Override
244 public long getPrimaryKey() {
245 return _country.getPrimaryKey();
246 }
247
248 @Override
249 public Serializable getPrimaryKeyObj() {
250 return _country.getPrimaryKeyObj();
251 }
252
253
258 @Override
259 public boolean getZipRequired() {
260 return _country.getZipRequired();
261 }
262
263 @Override
264 public int hashCode() {
265 return _country.hashCode();
266 }
267
268
273 @Override
274 public boolean isActive() {
275 return _country.isActive();
276 }
277
278 @Override
279 public boolean isCachedModel() {
280 return _country.isCachedModel();
281 }
282
283 @Override
284 public boolean isEscapedModel() {
285 return _country.isEscapedModel();
286 }
287
288 @Override
289 public boolean isNew() {
290 return _country.isNew();
291 }
292
293
298 @Override
299 public boolean isZipRequired() {
300 return _country.isZipRequired();
301 }
302
303
308 @Override
309 public void setA2(java.lang.String a2) {
310 _country.setA2(a2);
311 }
312
313
318 @Override
319 public void setA3(java.lang.String a3) {
320 _country.setA3(a3);
321 }
322
323
328 @Override
329 public void setActive(boolean active) {
330 _country.setActive(active);
331 }
332
333 @Override
334 public void setCachedModel(boolean cachedModel) {
335 _country.setCachedModel(cachedModel);
336 }
337
338
343 @Override
344 public void setCountryId(long countryId) {
345 _country.setCountryId(countryId);
346 }
347
348 @Override
349 public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
350 _country.setExpandoBridgeAttributes(baseModel);
351 }
352
353 @Override
354 public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
355 _country.setExpandoBridgeAttributes(expandoBridge);
356 }
357
358 @Override
359 public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
360 _country.setExpandoBridgeAttributes(serviceContext);
361 }
362
363
368 @Override
369 public void setIdd(java.lang.String idd) {
370 _country.setIdd(idd);
371 }
372
373
378 @Override
379 public void setMvccVersion(long mvccVersion) {
380 _country.setMvccVersion(mvccVersion);
381 }
382
383
388 @Override
389 public void setName(java.lang.String name) {
390 _country.setName(name);
391 }
392
393 @Override
394 public void setNameCurrentLanguageId(java.lang.String languageId) {
395 _country.setNameCurrentLanguageId(languageId);
396 }
397
398 @Override
399 public void setNew(boolean n) {
400 _country.setNew(n);
401 }
402
403
408 @Override
409 public void setNumber(java.lang.String number) {
410 _country.setNumber(number);
411 }
412
413
418 @Override
419 public void setPrimaryKey(long primaryKey) {
420 _country.setPrimaryKey(primaryKey);
421 }
422
423 @Override
424 public void setPrimaryKeyObj(Serializable primaryKeyObj) {
425 _country.setPrimaryKeyObj(primaryKeyObj);
426 }
427
428
433 @Override
434 public void setZipRequired(boolean zipRequired) {
435 _country.setZipRequired(zipRequired);
436 }
437
438 @Override
439 public CacheModel<com.liferay.portal.model.Country> toCacheModel() {
440 return _country.toCacheModel();
441 }
442
443 @Override
444 public com.liferay.portal.model.Country toEscapedModel() {
445 return new CountryWrapper(_country.toEscapedModel());
446 }
447
448 @Override
449 public java.lang.String toString() {
450 return _country.toString();
451 }
452
453 @Override
454 public com.liferay.portal.model.Country toUnescapedModel() {
455 return new CountryWrapper(_country.toUnescapedModel());
456 }
457
458 @Override
459 public java.lang.String toXmlString() {
460 return _country.toXmlString();
461 }
462
463 @Override
464 public boolean equals(Object obj) {
465 if (this == obj) {
466 return true;
467 }
468
469 if (!(obj instanceof CountryWrapper)) {
470 return false;
471 }
472
473 CountryWrapper countryWrapper = (CountryWrapper)obj;
474
475 if (Validator.equals(_country, countryWrapper._country)) {
476 return true;
477 }
478
479 return false;
480 }
481
482 @Override
483 public Country getWrappedModel() {
484 return _country;
485 }
486
487 @Override
488 public boolean isEntityCacheEnabled() {
489 return _country.isEntityCacheEnabled();
490 }
491
492 @Override
493 public boolean isFinderCacheEnabled() {
494 return _country.isFinderCacheEnabled();
495 }
496
497 @Override
498 public void resetOriginalValues() {
499 _country.resetOriginalValues();
500 }
501
502 private final Country _country;
503 }