001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.model;
016    
017    import java.util.HashMap;
018    import java.util.Map;
019    
020    /**
021     * <p>
022     * This class is a wrapper for {@link Country}.
023     * </p>
024     *
025     * @author    Brian Wing Shun Chan
026     * @see       Country
027     * @generated
028     */
029    public class CountryWrapper implements Country, ModelWrapper<Country> {
030            public CountryWrapper(Country country) {
031                    _country = country;
032            }
033    
034            public Class<?> getModelClass() {
035                    return Country.class;
036            }
037    
038            public String getModelClassName() {
039                    return Country.class.getName();
040            }
041    
042            public Map<String, Object> getModelAttributes() {
043                    Map<String, Object> attributes = new HashMap<String, Object>();
044    
045                    attributes.put("countryId", getCountryId());
046                    attributes.put("name", getName());
047                    attributes.put("a2", getA2());
048                    attributes.put("a3", getA3());
049                    attributes.put("number", getNumber());
050                    attributes.put("idd", getIdd());
051                    attributes.put("zipRequired", getZipRequired());
052                    attributes.put("active", getActive());
053    
054                    return attributes;
055            }
056    
057            public void setModelAttributes(Map<String, Object> attributes) {
058                    Long countryId = (Long)attributes.get("countryId");
059    
060                    if (countryId != null) {
061                            setCountryId(countryId);
062                    }
063    
064                    String name = (String)attributes.get("name");
065    
066                    if (name != null) {
067                            setName(name);
068                    }
069    
070                    String a2 = (String)attributes.get("a2");
071    
072                    if (a2 != null) {
073                            setA2(a2);
074                    }
075    
076                    String a3 = (String)attributes.get("a3");
077    
078                    if (a3 != null) {
079                            setA3(a3);
080                    }
081    
082                    String number = (String)attributes.get("number");
083    
084                    if (number != null) {
085                            setNumber(number);
086                    }
087    
088                    String idd = (String)attributes.get("idd");
089    
090                    if (idd != null) {
091                            setIdd(idd);
092                    }
093    
094                    Boolean zipRequired = (Boolean)attributes.get("zipRequired");
095    
096                    if (zipRequired != null) {
097                            setZipRequired(zipRequired);
098                    }
099    
100                    Boolean active = (Boolean)attributes.get("active");
101    
102                    if (active != null) {
103                            setActive(active);
104                    }
105            }
106    
107            /**
108            * Returns the primary key of this country.
109            *
110            * @return the primary key of this country
111            */
112            public long getPrimaryKey() {
113                    return _country.getPrimaryKey();
114            }
115    
116            /**
117            * Sets the primary key of this country.
118            *
119            * @param primaryKey the primary key of this country
120            */
121            public void setPrimaryKey(long primaryKey) {
122                    _country.setPrimaryKey(primaryKey);
123            }
124    
125            /**
126            * Returns the country ID of this country.
127            *
128            * @return the country ID of this country
129            */
130            public long getCountryId() {
131                    return _country.getCountryId();
132            }
133    
134            /**
135            * Sets the country ID of this country.
136            *
137            * @param countryId the country ID of this country
138            */
139            public void setCountryId(long countryId) {
140                    _country.setCountryId(countryId);
141            }
142    
143            /**
144            * Returns the name of this country.
145            *
146            * @return the name of this country
147            */
148            public java.lang.String getName() {
149                    return _country.getName();
150            }
151    
152            /**
153            * Sets the name of this country.
154            *
155            * @param name the name of this country
156            */
157            public void setName(java.lang.String name) {
158                    _country.setName(name);
159            }
160    
161            /**
162            * Returns the a2 of this country.
163            *
164            * @return the a2 of this country
165            */
166            public java.lang.String getA2() {
167                    return _country.getA2();
168            }
169    
170            /**
171            * Sets the a2 of this country.
172            *
173            * @param a2 the a2 of this country
174            */
175            public void setA2(java.lang.String a2) {
176                    _country.setA2(a2);
177            }
178    
179            /**
180            * Returns the a3 of this country.
181            *
182            * @return the a3 of this country
183            */
184            public java.lang.String getA3() {
185                    return _country.getA3();
186            }
187    
188            /**
189            * Sets the a3 of this country.
190            *
191            * @param a3 the a3 of this country
192            */
193            public void setA3(java.lang.String a3) {
194                    _country.setA3(a3);
195            }
196    
197            /**
198            * Returns the number of this country.
199            *
200            * @return the number of this country
201            */
202            public java.lang.String getNumber() {
203                    return _country.getNumber();
204            }
205    
206            /**
207            * Sets the number of this country.
208            *
209            * @param number the number of this country
210            */
211            public void setNumber(java.lang.String number) {
212                    _country.setNumber(number);
213            }
214    
215            /**
216            * Returns the idd of this country.
217            *
218            * @return the idd of this country
219            */
220            public java.lang.String getIdd() {
221                    return _country.getIdd();
222            }
223    
224            /**
225            * Sets the idd of this country.
226            *
227            * @param idd the idd of this country
228            */
229            public void setIdd(java.lang.String idd) {
230                    _country.setIdd(idd);
231            }
232    
233            /**
234            * Returns the zip required of this country.
235            *
236            * @return the zip required of this country
237            */
238            public boolean getZipRequired() {
239                    return _country.getZipRequired();
240            }
241    
242            /**
243            * Returns <code>true</code> if this country is zip required.
244            *
245            * @return <code>true</code> if this country is zip required; <code>false</code> otherwise
246            */
247            public boolean isZipRequired() {
248                    return _country.isZipRequired();
249            }
250    
251            /**
252            * Sets whether this country is zip required.
253            *
254            * @param zipRequired the zip required of this country
255            */
256            public void setZipRequired(boolean zipRequired) {
257                    _country.setZipRequired(zipRequired);
258            }
259    
260            /**
261            * Returns the active of this country.
262            *
263            * @return the active of this country
264            */
265            public boolean getActive() {
266                    return _country.getActive();
267            }
268    
269            /**
270            * Returns <code>true</code> if this country is active.
271            *
272            * @return <code>true</code> if this country is active; <code>false</code> otherwise
273            */
274            public boolean isActive() {
275                    return _country.isActive();
276            }
277    
278            /**
279            * Sets whether this country is active.
280            *
281            * @param active the active of this country
282            */
283            public void setActive(boolean active) {
284                    _country.setActive(active);
285            }
286    
287            public boolean isNew() {
288                    return _country.isNew();
289            }
290    
291            public void setNew(boolean n) {
292                    _country.setNew(n);
293            }
294    
295            public boolean isCachedModel() {
296                    return _country.isCachedModel();
297            }
298    
299            public void setCachedModel(boolean cachedModel) {
300                    _country.setCachedModel(cachedModel);
301            }
302    
303            public boolean isEscapedModel() {
304                    return _country.isEscapedModel();
305            }
306    
307            public java.io.Serializable getPrimaryKeyObj() {
308                    return _country.getPrimaryKeyObj();
309            }
310    
311            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
312                    _country.setPrimaryKeyObj(primaryKeyObj);
313            }
314    
315            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
316                    return _country.getExpandoBridge();
317            }
318    
319            public void setExpandoBridgeAttributes(
320                    com.liferay.portal.service.ServiceContext serviceContext) {
321                    _country.setExpandoBridgeAttributes(serviceContext);
322            }
323    
324            @Override
325            public java.lang.Object clone() {
326                    return new CountryWrapper((Country)_country.clone());
327            }
328    
329            public int compareTo(com.liferay.portal.model.Country country) {
330                    return _country.compareTo(country);
331            }
332    
333            @Override
334            public int hashCode() {
335                    return _country.hashCode();
336            }
337    
338            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.Country> toCacheModel() {
339                    return _country.toCacheModel();
340            }
341    
342            public com.liferay.portal.model.Country toEscapedModel() {
343                    return new CountryWrapper(_country.toEscapedModel());
344            }
345    
346            public com.liferay.portal.model.Country toUnescapedModel() {
347                    return new CountryWrapper(_country.toUnescapedModel());
348            }
349    
350            @Override
351            public java.lang.String toString() {
352                    return _country.toString();
353            }
354    
355            public java.lang.String toXmlString() {
356                    return _country.toXmlString();
357            }
358    
359            public java.lang.String getName(java.util.Locale locale) {
360                    return _country.getName(locale);
361            }
362    
363            public java.lang.String getNameCurrentLanguageId() {
364                    return _country.getNameCurrentLanguageId();
365            }
366    
367            public java.lang.String getNameCurrentValue() {
368                    return _country.getNameCurrentValue();
369            }
370    
371            public void setNameCurrentLanguageId(java.lang.String languageId) {
372                    _country.setNameCurrentLanguageId(languageId);
373            }
374    
375            /**
376             * @deprecated Renamed to {@link #getWrappedModel}
377             */
378            public Country getWrappedCountry() {
379                    return _country;
380            }
381    
382            public Country getWrappedModel() {
383                    return _country;
384            }
385    
386            public void resetOriginalValues() {
387                    _country.resetOriginalValues();
388            }
389    
390            private Country _country;
391    }