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
021 import java.util.HashMap;
022 import java.util.Map;
023
024
033 @ProviderType
034 public class CountryWrapper implements Country, ModelWrapper<Country> {
035 public CountryWrapper(Country country) {
036 _country = country;
037 }
038
039 @Override
040 public Class<?> getModelClass() {
041 return Country.class;
042 }
043
044 @Override
045 public String getModelClassName() {
046 return Country.class.getName();
047 }
048
049 @Override
050 public Map<String, Object> getModelAttributes() {
051 Map<String, Object> attributes = new HashMap<String, Object>();
052
053 attributes.put("mvccVersion", getMvccVersion());
054 attributes.put("countryId", getCountryId());
055 attributes.put("name", getName());
056 attributes.put("a2", getA2());
057 attributes.put("a3", getA3());
058 attributes.put("number", getNumber());
059 attributes.put("idd", getIdd());
060 attributes.put("zipRequired", getZipRequired());
061 attributes.put("active", getActive());
062
063 return attributes;
064 }
065
066 @Override
067 public void setModelAttributes(Map<String, Object> attributes) {
068 Long mvccVersion = (Long)attributes.get("mvccVersion");
069
070 if (mvccVersion != null) {
071 setMvccVersion(mvccVersion);
072 }
073
074 Long countryId = (Long)attributes.get("countryId");
075
076 if (countryId != null) {
077 setCountryId(countryId);
078 }
079
080 String name = (String)attributes.get("name");
081
082 if (name != null) {
083 setName(name);
084 }
085
086 String a2 = (String)attributes.get("a2");
087
088 if (a2 != null) {
089 setA2(a2);
090 }
091
092 String a3 = (String)attributes.get("a3");
093
094 if (a3 != null) {
095 setA3(a3);
096 }
097
098 String number = (String)attributes.get("number");
099
100 if (number != null) {
101 setNumber(number);
102 }
103
104 String idd = (String)attributes.get("idd");
105
106 if (idd != null) {
107 setIdd(idd);
108 }
109
110 Boolean zipRequired = (Boolean)attributes.get("zipRequired");
111
112 if (zipRequired != null) {
113 setZipRequired(zipRequired);
114 }
115
116 Boolean active = (Boolean)attributes.get("active");
117
118 if (active != null) {
119 setActive(active);
120 }
121 }
122
123 @Override
124 public java.lang.Object clone() {
125 return new CountryWrapper((Country)_country.clone());
126 }
127
128 @Override
129 public int compareTo(com.liferay.portal.model.Country country) {
130 return _country.compareTo(country);
131 }
132
133
138 @Override
139 public java.lang.String getA2() {
140 return _country.getA2();
141 }
142
143
148 @Override
149 public java.lang.String getA3() {
150 return _country.getA3();
151 }
152
153
158 @Override
159 public boolean getActive() {
160 return _country.getActive();
161 }
162
163
168 @Override
169 public long getCountryId() {
170 return _country.getCountryId();
171 }
172
173 @Override
174 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
175 return _country.getExpandoBridge();
176 }
177
178
183 @Override
184 public java.lang.String getIdd() {
185 return _country.getIdd();
186 }
187
188
193 @Override
194 public long getMvccVersion() {
195 return _country.getMvccVersion();
196 }
197
198
203 @Override
204 public java.lang.String getName() {
205 return _country.getName();
206 }
207
208 @Override
209 public java.lang.String getName(java.util.Locale locale) {
210 return _country.getName(locale);
211 }
212
213 @Override
214 public java.lang.String getNameCurrentLanguageId() {
215 return _country.getNameCurrentLanguageId();
216 }
217
218 @Override
219 public java.lang.String getNameCurrentValue() {
220 return _country.getNameCurrentValue();
221 }
222
223
228 @Override
229 public java.lang.String getNumber() {
230 return _country.getNumber();
231 }
232
233
238 @Override
239 public long getPrimaryKey() {
240 return _country.getPrimaryKey();
241 }
242
243 @Override
244 public java.io.Serializable getPrimaryKeyObj() {
245 return _country.getPrimaryKeyObj();
246 }
247
248
253 @Override
254 public boolean getZipRequired() {
255 return _country.getZipRequired();
256 }
257
258 @Override
259 public int hashCode() {
260 return _country.hashCode();
261 }
262
263
268 @Override
269 public boolean isActive() {
270 return _country.isActive();
271 }
272
273 @Override
274 public boolean isCachedModel() {
275 return _country.isCachedModel();
276 }
277
278 @Override
279 public boolean isEscapedModel() {
280 return _country.isEscapedModel();
281 }
282
283 @Override
284 public boolean isNew() {
285 return _country.isNew();
286 }
287
288
293 @Override
294 public boolean isZipRequired() {
295 return _country.isZipRequired();
296 }
297
298
303 @Override
304 public void setA2(java.lang.String a2) {
305 _country.setA2(a2);
306 }
307
308
313 @Override
314 public void setA3(java.lang.String a3) {
315 _country.setA3(a3);
316 }
317
318
323 @Override
324 public void setActive(boolean active) {
325 _country.setActive(active);
326 }
327
328 @Override
329 public void setCachedModel(boolean cachedModel) {
330 _country.setCachedModel(cachedModel);
331 }
332
333
338 @Override
339 public void setCountryId(long countryId) {
340 _country.setCountryId(countryId);
341 }
342
343 @Override
344 public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
345 _country.setExpandoBridgeAttributes(baseModel);
346 }
347
348 @Override
349 public void setExpandoBridgeAttributes(
350 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
351 _country.setExpandoBridgeAttributes(expandoBridge);
352 }
353
354 @Override
355 public void setExpandoBridgeAttributes(
356 com.liferay.portal.service.ServiceContext serviceContext) {
357 _country.setExpandoBridgeAttributes(serviceContext);
358 }
359
360
365 @Override
366 public void setIdd(java.lang.String idd) {
367 _country.setIdd(idd);
368 }
369
370
375 @Override
376 public void setMvccVersion(long mvccVersion) {
377 _country.setMvccVersion(mvccVersion);
378 }
379
380
385 @Override
386 public void setName(java.lang.String name) {
387 _country.setName(name);
388 }
389
390 @Override
391 public void setNameCurrentLanguageId(java.lang.String languageId) {
392 _country.setNameCurrentLanguageId(languageId);
393 }
394
395 @Override
396 public void setNew(boolean n) {
397 _country.setNew(n);
398 }
399
400
405 @Override
406 public void setNumber(java.lang.String number) {
407 _country.setNumber(number);
408 }
409
410
415 @Override
416 public void setPrimaryKey(long primaryKey) {
417 _country.setPrimaryKey(primaryKey);
418 }
419
420 @Override
421 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
422 _country.setPrimaryKeyObj(primaryKeyObj);
423 }
424
425
430 @Override
431 public void setZipRequired(boolean zipRequired) {
432 _country.setZipRequired(zipRequired);
433 }
434
435 @Override
436 public CacheModel<com.liferay.portal.model.Country> toCacheModel() {
437 return _country.toCacheModel();
438 }
439
440 @Override
441 public com.liferay.portal.model.Country toEscapedModel() {
442 return new CountryWrapper(_country.toEscapedModel());
443 }
444
445 @Override
446 public java.lang.String toString() {
447 return _country.toString();
448 }
449
450 @Override
451 public com.liferay.portal.model.Country toUnescapedModel() {
452 return new CountryWrapper(_country.toUnescapedModel());
453 }
454
455 @Override
456 public java.lang.String toXmlString() {
457 return _country.toXmlString();
458 }
459
460 @Override
461 public boolean equals(Object obj) {
462 if (this == obj) {
463 return true;
464 }
465
466 if (!(obj instanceof CountryWrapper)) {
467 return false;
468 }
469
470 CountryWrapper countryWrapper = (CountryWrapper)obj;
471
472 if (Validator.equals(_country, countryWrapper._country)) {
473 return true;
474 }
475
476 return false;
477 }
478
479 @Override
480 public Country getWrappedModel() {
481 return _country;
482 }
483
484 @Override
485 public boolean isEntityCacheEnabled() {
486 return _country.isEntityCacheEnabled();
487 }
488
489 @Override
490 public boolean isFinderCacheEnabled() {
491 return _country.isFinderCacheEnabled();
492 }
493
494 @Override
495 public void resetOriginalValues() {
496 _country.resetOriginalValues();
497 }
498
499 private final Country _country;
500 }