001
014
015 package com.liferay.portal.kernel.model;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.expando.kernel.model.ExpandoBridge;
020
021 import com.liferay.portal.kernel.service.ServiceContext;
022
023 import java.io.Serializable;
024
025 import java.util.HashMap;
026 import java.util.Map;
027 import java.util.Objects;
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 CacheModel<Country> toCacheModel() {
130 return _country.toCacheModel();
131 }
132
133 @Override
134 public Country toEscapedModel() {
135 return new CountryWrapper(_country.toEscapedModel());
136 }
137
138 @Override
139 public Country toUnescapedModel() {
140 return new CountryWrapper(_country.toUnescapedModel());
141 }
142
143
148 @Override
149 public boolean getActive() {
150 return _country.getActive();
151 }
152
153
158 @Override
159 public boolean getZipRequired() {
160 return _country.getZipRequired();
161 }
162
163
168 @Override
169 public boolean isActive() {
170 return _country.isActive();
171 }
172
173 @Override
174 public boolean isCachedModel() {
175 return _country.isCachedModel();
176 }
177
178 @Override
179 public boolean isEscapedModel() {
180 return _country.isEscapedModel();
181 }
182
183 @Override
184 public boolean isNew() {
185 return _country.isNew();
186 }
187
188
193 @Override
194 public boolean isZipRequired() {
195 return _country.isZipRequired();
196 }
197
198 @Override
199 public ExpandoBridge getExpandoBridge() {
200 return _country.getExpandoBridge();
201 }
202
203 @Override
204 public int compareTo(Country country) {
205 return _country.compareTo(country);
206 }
207
208 @Override
209 public int hashCode() {
210 return _country.hashCode();
211 }
212
213 @Override
214 public Serializable getPrimaryKeyObj() {
215 return _country.getPrimaryKeyObj();
216 }
217
218 @Override
219 public java.lang.Object clone() {
220 return new CountryWrapper((Country)_country.clone());
221 }
222
223
228 @Override
229 public java.lang.String getA2() {
230 return _country.getA2();
231 }
232
233
238 @Override
239 public java.lang.String getA3() {
240 return _country.getA3();
241 }
242
243
248 @Override
249 public java.lang.String getIdd() {
250 return _country.getIdd();
251 }
252
253
258 @Override
259 public java.lang.String getName() {
260 return _country.getName();
261 }
262
263 @Override
264 public java.lang.String getName(java.util.Locale locale) {
265 return _country.getName(locale);
266 }
267
268 @Override
269 public java.lang.String getNameCurrentLanguageId() {
270 return _country.getNameCurrentLanguageId();
271 }
272
273 @Override
274 public java.lang.String getNameCurrentValue() {
275 return _country.getNameCurrentValue();
276 }
277
278
283 @Override
284 public java.lang.String getNumber() {
285 return _country.getNumber();
286 }
287
288 @Override
289 public java.lang.String toString() {
290 return _country.toString();
291 }
292
293 @Override
294 public java.lang.String toXmlString() {
295 return _country.toXmlString();
296 }
297
298
303 @Override
304 public long getCountryId() {
305 return _country.getCountryId();
306 }
307
308
313 @Override
314 public long getMvccVersion() {
315 return _country.getMvccVersion();
316 }
317
318
323 @Override
324 public long getPrimaryKey() {
325 return _country.getPrimaryKey();
326 }
327
328
333 @Override
334 public void setA2(java.lang.String a2) {
335 _country.setA2(a2);
336 }
337
338
343 @Override
344 public void setA3(java.lang.String a3) {
345 _country.setA3(a3);
346 }
347
348
353 @Override
354 public void setActive(boolean active) {
355 _country.setActive(active);
356 }
357
358 @Override
359 public void setCachedModel(boolean cachedModel) {
360 _country.setCachedModel(cachedModel);
361 }
362
363
368 @Override
369 public void setCountryId(long countryId) {
370 _country.setCountryId(countryId);
371 }
372
373 @Override
374 public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
375 _country.setExpandoBridgeAttributes(baseModel);
376 }
377
378 @Override
379 public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
380 _country.setExpandoBridgeAttributes(expandoBridge);
381 }
382
383 @Override
384 public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
385 _country.setExpandoBridgeAttributes(serviceContext);
386 }
387
388
393 @Override
394 public void setIdd(java.lang.String idd) {
395 _country.setIdd(idd);
396 }
397
398
403 @Override
404 public void setMvccVersion(long mvccVersion) {
405 _country.setMvccVersion(mvccVersion);
406 }
407
408
413 @Override
414 public void setName(java.lang.String name) {
415 _country.setName(name);
416 }
417
418 @Override
419 public void setNameCurrentLanguageId(java.lang.String languageId) {
420 _country.setNameCurrentLanguageId(languageId);
421 }
422
423 @Override
424 public void setNew(boolean n) {
425 _country.setNew(n);
426 }
427
428
433 @Override
434 public void setNumber(java.lang.String number) {
435 _country.setNumber(number);
436 }
437
438
443 @Override
444 public void setPrimaryKey(long primaryKey) {
445 _country.setPrimaryKey(primaryKey);
446 }
447
448 @Override
449 public void setPrimaryKeyObj(Serializable primaryKeyObj) {
450 _country.setPrimaryKeyObj(primaryKeyObj);
451 }
452
453
458 @Override
459 public void setZipRequired(boolean zipRequired) {
460 _country.setZipRequired(zipRequired);
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 (Objects.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 }