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("countryId", getCountryId());
054 attributes.put("name", getName());
055 attributes.put("a2", getA2());
056 attributes.put("a3", getA3());
057 attributes.put("number", getNumber());
058 attributes.put("idd", getIdd());
059 attributes.put("zipRequired", getZipRequired());
060 attributes.put("active", getActive());
061
062 return attributes;
063 }
064
065 @Override
066 public void setModelAttributes(Map<String, Object> attributes) {
067 Long countryId = (Long)attributes.get("countryId");
068
069 if (countryId != null) {
070 setCountryId(countryId);
071 }
072
073 String name = (String)attributes.get("name");
074
075 if (name != null) {
076 setName(name);
077 }
078
079 String a2 = (String)attributes.get("a2");
080
081 if (a2 != null) {
082 setA2(a2);
083 }
084
085 String a3 = (String)attributes.get("a3");
086
087 if (a3 != null) {
088 setA3(a3);
089 }
090
091 String number = (String)attributes.get("number");
092
093 if (number != null) {
094 setNumber(number);
095 }
096
097 String idd = (String)attributes.get("idd");
098
099 if (idd != null) {
100 setIdd(idd);
101 }
102
103 Boolean zipRequired = (Boolean)attributes.get("zipRequired");
104
105 if (zipRequired != null) {
106 setZipRequired(zipRequired);
107 }
108
109 Boolean active = (Boolean)attributes.get("active");
110
111 if (active != null) {
112 setActive(active);
113 }
114 }
115
116
121 @Override
122 public long getPrimaryKey() {
123 return _country.getPrimaryKey();
124 }
125
126
131 @Override
132 public void setPrimaryKey(long primaryKey) {
133 _country.setPrimaryKey(primaryKey);
134 }
135
136
141 @Override
142 public long getCountryId() {
143 return _country.getCountryId();
144 }
145
146
151 @Override
152 public void setCountryId(long countryId) {
153 _country.setCountryId(countryId);
154 }
155
156
161 @Override
162 public java.lang.String getName() {
163 return _country.getName();
164 }
165
166
171 @Override
172 public void setName(java.lang.String name) {
173 _country.setName(name);
174 }
175
176
181 @Override
182 public java.lang.String getA2() {
183 return _country.getA2();
184 }
185
186
191 @Override
192 public void setA2(java.lang.String a2) {
193 _country.setA2(a2);
194 }
195
196
201 @Override
202 public java.lang.String getA3() {
203 return _country.getA3();
204 }
205
206
211 @Override
212 public void setA3(java.lang.String a3) {
213 _country.setA3(a3);
214 }
215
216
221 @Override
222 public java.lang.String getNumber() {
223 return _country.getNumber();
224 }
225
226
231 @Override
232 public void setNumber(java.lang.String number) {
233 _country.setNumber(number);
234 }
235
236
241 @Override
242 public java.lang.String getIdd() {
243 return _country.getIdd();
244 }
245
246
251 @Override
252 public void setIdd(java.lang.String idd) {
253 _country.setIdd(idd);
254 }
255
256
261 @Override
262 public boolean getZipRequired() {
263 return _country.getZipRequired();
264 }
265
266
271 @Override
272 public boolean isZipRequired() {
273 return _country.isZipRequired();
274 }
275
276
281 @Override
282 public void setZipRequired(boolean zipRequired) {
283 _country.setZipRequired(zipRequired);
284 }
285
286
291 @Override
292 public boolean getActive() {
293 return _country.getActive();
294 }
295
296
301 @Override
302 public boolean isActive() {
303 return _country.isActive();
304 }
305
306
311 @Override
312 public void setActive(boolean active) {
313 _country.setActive(active);
314 }
315
316 @Override
317 public boolean isNew() {
318 return _country.isNew();
319 }
320
321 @Override
322 public void setNew(boolean n) {
323 _country.setNew(n);
324 }
325
326 @Override
327 public boolean isCachedModel() {
328 return _country.isCachedModel();
329 }
330
331 @Override
332 public void setCachedModel(boolean cachedModel) {
333 _country.setCachedModel(cachedModel);
334 }
335
336 @Override
337 public boolean isEscapedModel() {
338 return _country.isEscapedModel();
339 }
340
341 @Override
342 public java.io.Serializable getPrimaryKeyObj() {
343 return _country.getPrimaryKeyObj();
344 }
345
346 @Override
347 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
348 _country.setPrimaryKeyObj(primaryKeyObj);
349 }
350
351 @Override
352 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
353 return _country.getExpandoBridge();
354 }
355
356 @Override
357 public void setExpandoBridgeAttributes(
358 com.liferay.portal.model.BaseModel<?> baseModel) {
359 _country.setExpandoBridgeAttributes(baseModel);
360 }
361
362 @Override
363 public void setExpandoBridgeAttributes(
364 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
365 _country.setExpandoBridgeAttributes(expandoBridge);
366 }
367
368 @Override
369 public void setExpandoBridgeAttributes(
370 com.liferay.portal.service.ServiceContext serviceContext) {
371 _country.setExpandoBridgeAttributes(serviceContext);
372 }
373
374 @Override
375 public java.lang.Object clone() {
376 return new CountryWrapper((Country)_country.clone());
377 }
378
379 @Override
380 public int compareTo(com.liferay.portal.model.Country country) {
381 return _country.compareTo(country);
382 }
383
384 @Override
385 public int hashCode() {
386 return _country.hashCode();
387 }
388
389 @Override
390 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.Country> toCacheModel() {
391 return _country.toCacheModel();
392 }
393
394 @Override
395 public com.liferay.portal.model.Country toEscapedModel() {
396 return new CountryWrapper(_country.toEscapedModel());
397 }
398
399 @Override
400 public com.liferay.portal.model.Country toUnescapedModel() {
401 return new CountryWrapper(_country.toUnescapedModel());
402 }
403
404 @Override
405 public java.lang.String toString() {
406 return _country.toString();
407 }
408
409 @Override
410 public java.lang.String toXmlString() {
411 return _country.toXmlString();
412 }
413
414 @Override
415 public java.lang.String getName(java.util.Locale locale) {
416 return _country.getName(locale);
417 }
418
419 @Override
420 public java.lang.String getNameCurrentLanguageId() {
421 return _country.getNameCurrentLanguageId();
422 }
423
424 @Override
425 public java.lang.String getNameCurrentValue() {
426 return _country.getNameCurrentValue();
427 }
428
429 @Override
430 public void setNameCurrentLanguageId(java.lang.String languageId) {
431 _country.setNameCurrentLanguageId(languageId);
432 }
433
434 @Override
435 public boolean equals(Object obj) {
436 if (this == obj) {
437 return true;
438 }
439
440 if (!(obj instanceof CountryWrapper)) {
441 return false;
442 }
443
444 CountryWrapper countryWrapper = (CountryWrapper)obj;
445
446 if (Validator.equals(_country, countryWrapper._country)) {
447 return true;
448 }
449
450 return false;
451 }
452
453
456 public Country getWrappedCountry() {
457 return _country;
458 }
459
460 @Override
461 public Country getWrappedModel() {
462 return _country;
463 }
464
465 @Override
466 public void resetOriginalValues() {
467 _country.resetOriginalValues();
468 }
469
470 private Country _country;
471 }