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 LayoutPrototype}.
023     * </p>
024     *
025     * @author    Brian Wing Shun Chan
026     * @see       LayoutPrototype
027     * @generated
028     */
029    public class LayoutPrototypeWrapper implements LayoutPrototype,
030            ModelWrapper<LayoutPrototype> {
031            public LayoutPrototypeWrapper(LayoutPrototype layoutPrototype) {
032                    _layoutPrototype = layoutPrototype;
033            }
034    
035            public Class<?> getModelClass() {
036                    return LayoutPrototype.class;
037            }
038    
039            public String getModelClassName() {
040                    return LayoutPrototype.class.getName();
041            }
042    
043            public Map<String, Object> getModelAttributes() {
044                    Map<String, Object> attributes = new HashMap<String, Object>();
045    
046                    attributes.put("uuid", getUuid());
047                    attributes.put("layoutPrototypeId", getLayoutPrototypeId());
048                    attributes.put("companyId", getCompanyId());
049                    attributes.put("name", getName());
050                    attributes.put("description", getDescription());
051                    attributes.put("settings", getSettings());
052                    attributes.put("active", getActive());
053    
054                    return attributes;
055            }
056    
057            public void setModelAttributes(Map<String, Object> attributes) {
058                    String uuid = (String)attributes.get("uuid");
059    
060                    if (uuid != null) {
061                            setUuid(uuid);
062                    }
063    
064                    Long layoutPrototypeId = (Long)attributes.get("layoutPrototypeId");
065    
066                    if (layoutPrototypeId != null) {
067                            setLayoutPrototypeId(layoutPrototypeId);
068                    }
069    
070                    Long companyId = (Long)attributes.get("companyId");
071    
072                    if (companyId != null) {
073                            setCompanyId(companyId);
074                    }
075    
076                    String name = (String)attributes.get("name");
077    
078                    if (name != null) {
079                            setName(name);
080                    }
081    
082                    String description = (String)attributes.get("description");
083    
084                    if (description != null) {
085                            setDescription(description);
086                    }
087    
088                    String settings = (String)attributes.get("settings");
089    
090                    if (settings != null) {
091                            setSettings(settings);
092                    }
093    
094                    Boolean active = (Boolean)attributes.get("active");
095    
096                    if (active != null) {
097                            setActive(active);
098                    }
099            }
100    
101            /**
102            * Returns the primary key of this layout prototype.
103            *
104            * @return the primary key of this layout prototype
105            */
106            public long getPrimaryKey() {
107                    return _layoutPrototype.getPrimaryKey();
108            }
109    
110            /**
111            * Sets the primary key of this layout prototype.
112            *
113            * @param primaryKey the primary key of this layout prototype
114            */
115            public void setPrimaryKey(long primaryKey) {
116                    _layoutPrototype.setPrimaryKey(primaryKey);
117            }
118    
119            /**
120            * Returns the uuid of this layout prototype.
121            *
122            * @return the uuid of this layout prototype
123            */
124            public java.lang.String getUuid() {
125                    return _layoutPrototype.getUuid();
126            }
127    
128            /**
129            * Sets the uuid of this layout prototype.
130            *
131            * @param uuid the uuid of this layout prototype
132            */
133            public void setUuid(java.lang.String uuid) {
134                    _layoutPrototype.setUuid(uuid);
135            }
136    
137            /**
138            * Returns the layout prototype ID of this layout prototype.
139            *
140            * @return the layout prototype ID of this layout prototype
141            */
142            public long getLayoutPrototypeId() {
143                    return _layoutPrototype.getLayoutPrototypeId();
144            }
145    
146            /**
147            * Sets the layout prototype ID of this layout prototype.
148            *
149            * @param layoutPrototypeId the layout prototype ID of this layout prototype
150            */
151            public void setLayoutPrototypeId(long layoutPrototypeId) {
152                    _layoutPrototype.setLayoutPrototypeId(layoutPrototypeId);
153            }
154    
155            /**
156            * Returns the company ID of this layout prototype.
157            *
158            * @return the company ID of this layout prototype
159            */
160            public long getCompanyId() {
161                    return _layoutPrototype.getCompanyId();
162            }
163    
164            /**
165            * Sets the company ID of this layout prototype.
166            *
167            * @param companyId the company ID of this layout prototype
168            */
169            public void setCompanyId(long companyId) {
170                    _layoutPrototype.setCompanyId(companyId);
171            }
172    
173            /**
174            * Returns the name of this layout prototype.
175            *
176            * @return the name of this layout prototype
177            */
178            public java.lang.String getName() {
179                    return _layoutPrototype.getName();
180            }
181    
182            /**
183            * Returns the localized name of this layout prototype in the language. Uses the default language if no localization exists for the requested language.
184            *
185            * @param locale the locale of the language
186            * @return the localized name of this layout prototype
187            */
188            public java.lang.String getName(java.util.Locale locale) {
189                    return _layoutPrototype.getName(locale);
190            }
191    
192            /**
193            * Returns the localized name of this layout prototype in the language, optionally using the default language if no localization exists for the requested language.
194            *
195            * @param locale the local of the language
196            * @param useDefault whether to use the default language if no localization exists for the requested language
197            * @return the localized name of this layout prototype. If <code>useDefault</code> is <code>false</code> and no localization exists for the requested language, an empty string will be returned.
198            */
199            public java.lang.String getName(java.util.Locale locale, boolean useDefault) {
200                    return _layoutPrototype.getName(locale, useDefault);
201            }
202    
203            /**
204            * Returns the localized name of this layout prototype in the language. Uses the default language if no localization exists for the requested language.
205            *
206            * @param languageId the ID of the language
207            * @return the localized name of this layout prototype
208            */
209            public java.lang.String getName(java.lang.String languageId) {
210                    return _layoutPrototype.getName(languageId);
211            }
212    
213            /**
214            * Returns the localized name of this layout prototype in the language, optionally using the default language if no localization exists for the requested language.
215            *
216            * @param languageId the ID of the language
217            * @param useDefault whether to use the default language if no localization exists for the requested language
218            * @return the localized name of this layout prototype
219            */
220            public java.lang.String getName(java.lang.String languageId,
221                    boolean useDefault) {
222                    return _layoutPrototype.getName(languageId, useDefault);
223            }
224    
225            public java.lang.String getNameCurrentLanguageId() {
226                    return _layoutPrototype.getNameCurrentLanguageId();
227            }
228    
229            public java.lang.String getNameCurrentValue() {
230                    return _layoutPrototype.getNameCurrentValue();
231            }
232    
233            /**
234            * Returns a map of the locales and localized names of this layout prototype.
235            *
236            * @return the locales and localized names of this layout prototype
237            */
238            public java.util.Map<java.util.Locale, java.lang.String> getNameMap() {
239                    return _layoutPrototype.getNameMap();
240            }
241    
242            /**
243            * Sets the name of this layout prototype.
244            *
245            * @param name the name of this layout prototype
246            */
247            public void setName(java.lang.String name) {
248                    _layoutPrototype.setName(name);
249            }
250    
251            /**
252            * Sets the localized name of this layout prototype in the language.
253            *
254            * @param name the localized name of this layout prototype
255            * @param locale the locale of the language
256            */
257            public void setName(java.lang.String name, java.util.Locale locale) {
258                    _layoutPrototype.setName(name, locale);
259            }
260    
261            /**
262            * Sets the localized name of this layout prototype in the language, and sets the default locale.
263            *
264            * @param name the localized name of this layout prototype
265            * @param locale the locale of the language
266            * @param defaultLocale the default locale
267            */
268            public void setName(java.lang.String name, java.util.Locale locale,
269                    java.util.Locale defaultLocale) {
270                    _layoutPrototype.setName(name, locale, defaultLocale);
271            }
272    
273            public void setNameCurrentLanguageId(java.lang.String languageId) {
274                    _layoutPrototype.setNameCurrentLanguageId(languageId);
275            }
276    
277            /**
278            * Sets the localized names of this layout prototype from the map of locales and localized names.
279            *
280            * @param nameMap the locales and localized names of this layout prototype
281            */
282            public void setNameMap(
283                    java.util.Map<java.util.Locale, java.lang.String> nameMap) {
284                    _layoutPrototype.setNameMap(nameMap);
285            }
286    
287            /**
288            * Sets the localized names of this layout prototype from the map of locales and localized names, and sets the default locale.
289            *
290            * @param nameMap the locales and localized names of this layout prototype
291            * @param defaultLocale the default locale
292            */
293            public void setNameMap(
294                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
295                    java.util.Locale defaultLocale) {
296                    _layoutPrototype.setNameMap(nameMap, defaultLocale);
297            }
298    
299            /**
300            * Returns the description of this layout prototype.
301            *
302            * @return the description of this layout prototype
303            */
304            public java.lang.String getDescription() {
305                    return _layoutPrototype.getDescription();
306            }
307    
308            /**
309            * Sets the description of this layout prototype.
310            *
311            * @param description the description of this layout prototype
312            */
313            public void setDescription(java.lang.String description) {
314                    _layoutPrototype.setDescription(description);
315            }
316    
317            /**
318            * Returns the settings of this layout prototype.
319            *
320            * @return the settings of this layout prototype
321            */
322            public java.lang.String getSettings() {
323                    return _layoutPrototype.getSettings();
324            }
325    
326            /**
327            * Sets the settings of this layout prototype.
328            *
329            * @param settings the settings of this layout prototype
330            */
331            public void setSettings(java.lang.String settings) {
332                    _layoutPrototype.setSettings(settings);
333            }
334    
335            /**
336            * Returns the active of this layout prototype.
337            *
338            * @return the active of this layout prototype
339            */
340            public boolean getActive() {
341                    return _layoutPrototype.getActive();
342            }
343    
344            /**
345            * Returns <code>true</code> if this layout prototype is active.
346            *
347            * @return <code>true</code> if this layout prototype is active; <code>false</code> otherwise
348            */
349            public boolean isActive() {
350                    return _layoutPrototype.isActive();
351            }
352    
353            /**
354            * Sets whether this layout prototype is active.
355            *
356            * @param active the active of this layout prototype
357            */
358            public void setActive(boolean active) {
359                    _layoutPrototype.setActive(active);
360            }
361    
362            public boolean isNew() {
363                    return _layoutPrototype.isNew();
364            }
365    
366            public void setNew(boolean n) {
367                    _layoutPrototype.setNew(n);
368            }
369    
370            public boolean isCachedModel() {
371                    return _layoutPrototype.isCachedModel();
372            }
373    
374            public void setCachedModel(boolean cachedModel) {
375                    _layoutPrototype.setCachedModel(cachedModel);
376            }
377    
378            public boolean isEscapedModel() {
379                    return _layoutPrototype.isEscapedModel();
380            }
381    
382            public java.io.Serializable getPrimaryKeyObj() {
383                    return _layoutPrototype.getPrimaryKeyObj();
384            }
385    
386            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
387                    _layoutPrototype.setPrimaryKeyObj(primaryKeyObj);
388            }
389    
390            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
391                    return _layoutPrototype.getExpandoBridge();
392            }
393    
394            public void setExpandoBridgeAttributes(
395                    com.liferay.portal.service.ServiceContext serviceContext) {
396                    _layoutPrototype.setExpandoBridgeAttributes(serviceContext);
397            }
398    
399            public void prepareLocalizedFieldsForImport(
400                    java.util.Locale defaultImportLocale)
401                    throws com.liferay.portal.LocaleException {
402                    _layoutPrototype.prepareLocalizedFieldsForImport(defaultImportLocale);
403            }
404    
405            @Override
406            public java.lang.Object clone() {
407                    return new LayoutPrototypeWrapper((LayoutPrototype)_layoutPrototype.clone());
408            }
409    
410            public int compareTo(
411                    com.liferay.portal.model.LayoutPrototype layoutPrototype) {
412                    return _layoutPrototype.compareTo(layoutPrototype);
413            }
414    
415            @Override
416            public int hashCode() {
417                    return _layoutPrototype.hashCode();
418            }
419    
420            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.LayoutPrototype> toCacheModel() {
421                    return _layoutPrototype.toCacheModel();
422            }
423    
424            public com.liferay.portal.model.LayoutPrototype toEscapedModel() {
425                    return new LayoutPrototypeWrapper(_layoutPrototype.toEscapedModel());
426            }
427    
428            @Override
429            public java.lang.String toString() {
430                    return _layoutPrototype.toString();
431            }
432    
433            public java.lang.String toXmlString() {
434                    return _layoutPrototype.toXmlString();
435            }
436    
437            public void persist()
438                    throws com.liferay.portal.kernel.exception.SystemException {
439                    _layoutPrototype.persist();
440            }
441    
442            public com.liferay.portal.model.Group getGroup()
443                    throws com.liferay.portal.kernel.exception.PortalException,
444                            com.liferay.portal.kernel.exception.SystemException {
445                    return _layoutPrototype.getGroup();
446            }
447    
448            public long getGroupId()
449                    throws com.liferay.portal.kernel.exception.PortalException,
450                            com.liferay.portal.kernel.exception.SystemException {
451                    return _layoutPrototype.getGroupId();
452            }
453    
454            public com.liferay.portal.model.Layout getLayout()
455                    throws com.liferay.portal.kernel.exception.PortalException,
456                            com.liferay.portal.kernel.exception.SystemException {
457                    return _layoutPrototype.getLayout();
458            }
459    
460            /**
461             * @deprecated Renamed to {@link #getWrappedModel}
462             */
463            public LayoutPrototype getWrappedLayoutPrototype() {
464                    return _layoutPrototype;
465            }
466    
467            public LayoutPrototype getWrappedModel() {
468                    return _layoutPrototype;
469            }
470    
471            public void resetOriginalValues() {
472                    _layoutPrototype.resetOriginalValues();
473            }
474    
475            private LayoutPrototype _layoutPrototype;
476    }