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