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.lar.StagedModelType;
018    import com.liferay.portal.kernel.util.Validator;
019    
020    import java.util.Date;
021    import java.util.HashMap;
022    import java.util.Map;
023    
024    /**
025     * <p>
026     * This class is a wrapper for {@link LayoutSetPrototype}.
027     * </p>
028     *
029     * @author Brian Wing Shun Chan
030     * @see LayoutSetPrototype
031     * @generated
032     */
033    public class LayoutSetPrototypeWrapper implements LayoutSetPrototype,
034            ModelWrapper<LayoutSetPrototype> {
035            public LayoutSetPrototypeWrapper(LayoutSetPrototype layoutSetPrototype) {
036                    _layoutSetPrototype = layoutSetPrototype;
037            }
038    
039            @Override
040            public Class<?> getModelClass() {
041                    return LayoutSetPrototype.class;
042            }
043    
044            @Override
045            public String getModelClassName() {
046                    return LayoutSetPrototype.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("uuid", getUuid());
054                    attributes.put("layoutSetPrototypeId", getLayoutSetPrototypeId());
055                    attributes.put("companyId", getCompanyId());
056                    attributes.put("userId", getUserId());
057                    attributes.put("userName", getUserName());
058                    attributes.put("createDate", getCreateDate());
059                    attributes.put("modifiedDate", getModifiedDate());
060                    attributes.put("name", getName());
061                    attributes.put("description", getDescription());
062                    attributes.put("settings", getSettings());
063                    attributes.put("active", getActive());
064    
065                    return attributes;
066            }
067    
068            @Override
069            public void setModelAttributes(Map<String, Object> attributes) {
070                    String uuid = (String)attributes.get("uuid");
071    
072                    if (uuid != null) {
073                            setUuid(uuid);
074                    }
075    
076                    Long layoutSetPrototypeId = (Long)attributes.get("layoutSetPrototypeId");
077    
078                    if (layoutSetPrototypeId != null) {
079                            setLayoutSetPrototypeId(layoutSetPrototypeId);
080                    }
081    
082                    Long companyId = (Long)attributes.get("companyId");
083    
084                    if (companyId != null) {
085                            setCompanyId(companyId);
086                    }
087    
088                    Long userId = (Long)attributes.get("userId");
089    
090                    if (userId != null) {
091                            setUserId(userId);
092                    }
093    
094                    String userName = (String)attributes.get("userName");
095    
096                    if (userName != null) {
097                            setUserName(userName);
098                    }
099    
100                    Date createDate = (Date)attributes.get("createDate");
101    
102                    if (createDate != null) {
103                            setCreateDate(createDate);
104                    }
105    
106                    Date modifiedDate = (Date)attributes.get("modifiedDate");
107    
108                    if (modifiedDate != null) {
109                            setModifiedDate(modifiedDate);
110                    }
111    
112                    String name = (String)attributes.get("name");
113    
114                    if (name != null) {
115                            setName(name);
116                    }
117    
118                    String description = (String)attributes.get("description");
119    
120                    if (description != null) {
121                            setDescription(description);
122                    }
123    
124                    String settings = (String)attributes.get("settings");
125    
126                    if (settings != null) {
127                            setSettings(settings);
128                    }
129    
130                    Boolean active = (Boolean)attributes.get("active");
131    
132                    if (active != null) {
133                            setActive(active);
134                    }
135            }
136    
137            /**
138            * Returns the primary key of this layout set prototype.
139            *
140            * @return the primary key of this layout set prototype
141            */
142            @Override
143            public long getPrimaryKey() {
144                    return _layoutSetPrototype.getPrimaryKey();
145            }
146    
147            /**
148            * Sets the primary key of this layout set prototype.
149            *
150            * @param primaryKey the primary key of this layout set prototype
151            */
152            @Override
153            public void setPrimaryKey(long primaryKey) {
154                    _layoutSetPrototype.setPrimaryKey(primaryKey);
155            }
156    
157            /**
158            * Returns the uuid of this layout set prototype.
159            *
160            * @return the uuid of this layout set prototype
161            */
162            @Override
163            public java.lang.String getUuid() {
164                    return _layoutSetPrototype.getUuid();
165            }
166    
167            /**
168            * Sets the uuid of this layout set prototype.
169            *
170            * @param uuid the uuid of this layout set prototype
171            */
172            @Override
173            public void setUuid(java.lang.String uuid) {
174                    _layoutSetPrototype.setUuid(uuid);
175            }
176    
177            /**
178            * Returns the layout set prototype ID of this layout set prototype.
179            *
180            * @return the layout set prototype ID of this layout set prototype
181            */
182            @Override
183            public long getLayoutSetPrototypeId() {
184                    return _layoutSetPrototype.getLayoutSetPrototypeId();
185            }
186    
187            /**
188            * Sets the layout set prototype ID of this layout set prototype.
189            *
190            * @param layoutSetPrototypeId the layout set prototype ID of this layout set prototype
191            */
192            @Override
193            public void setLayoutSetPrototypeId(long layoutSetPrototypeId) {
194                    _layoutSetPrototype.setLayoutSetPrototypeId(layoutSetPrototypeId);
195            }
196    
197            /**
198            * Returns the company ID of this layout set prototype.
199            *
200            * @return the company ID of this layout set prototype
201            */
202            @Override
203            public long getCompanyId() {
204                    return _layoutSetPrototype.getCompanyId();
205            }
206    
207            /**
208            * Sets the company ID of this layout set prototype.
209            *
210            * @param companyId the company ID of this layout set prototype
211            */
212            @Override
213            public void setCompanyId(long companyId) {
214                    _layoutSetPrototype.setCompanyId(companyId);
215            }
216    
217            /**
218            * Returns the user ID of this layout set prototype.
219            *
220            * @return the user ID of this layout set prototype
221            */
222            @Override
223            public long getUserId() {
224                    return _layoutSetPrototype.getUserId();
225            }
226    
227            /**
228            * Sets the user ID of this layout set prototype.
229            *
230            * @param userId the user ID of this layout set prototype
231            */
232            @Override
233            public void setUserId(long userId) {
234                    _layoutSetPrototype.setUserId(userId);
235            }
236    
237            /**
238            * Returns the user uuid of this layout set prototype.
239            *
240            * @return the user uuid of this layout set prototype
241            * @throws SystemException if a system exception occurred
242            */
243            @Override
244            public java.lang.String getUserUuid()
245                    throws com.liferay.portal.kernel.exception.SystemException {
246                    return _layoutSetPrototype.getUserUuid();
247            }
248    
249            /**
250            * Sets the user uuid of this layout set prototype.
251            *
252            * @param userUuid the user uuid of this layout set prototype
253            */
254            @Override
255            public void setUserUuid(java.lang.String userUuid) {
256                    _layoutSetPrototype.setUserUuid(userUuid);
257            }
258    
259            /**
260            * Returns the user name of this layout set prototype.
261            *
262            * @return the user name of this layout set prototype
263            */
264            @Override
265            public java.lang.String getUserName() {
266                    return _layoutSetPrototype.getUserName();
267            }
268    
269            /**
270            * Sets the user name of this layout set prototype.
271            *
272            * @param userName the user name of this layout set prototype
273            */
274            @Override
275            public void setUserName(java.lang.String userName) {
276                    _layoutSetPrototype.setUserName(userName);
277            }
278    
279            /**
280            * Returns the create date of this layout set prototype.
281            *
282            * @return the create date of this layout set prototype
283            */
284            @Override
285            public java.util.Date getCreateDate() {
286                    return _layoutSetPrototype.getCreateDate();
287            }
288    
289            /**
290            * Sets the create date of this layout set prototype.
291            *
292            * @param createDate the create date of this layout set prototype
293            */
294            @Override
295            public void setCreateDate(java.util.Date createDate) {
296                    _layoutSetPrototype.setCreateDate(createDate);
297            }
298    
299            /**
300            * Returns the modified date of this layout set prototype.
301            *
302            * @return the modified date of this layout set prototype
303            */
304            @Override
305            public java.util.Date getModifiedDate() {
306                    return _layoutSetPrototype.getModifiedDate();
307            }
308    
309            /**
310            * Sets the modified date of this layout set prototype.
311            *
312            * @param modifiedDate the modified date of this layout set prototype
313            */
314            @Override
315            public void setModifiedDate(java.util.Date modifiedDate) {
316                    _layoutSetPrototype.setModifiedDate(modifiedDate);
317            }
318    
319            /**
320            * Returns the name of this layout set prototype.
321            *
322            * @return the name of this layout set prototype
323            */
324            @Override
325            public java.lang.String getName() {
326                    return _layoutSetPrototype.getName();
327            }
328    
329            /**
330            * Returns the localized name of this layout set prototype in the language. Uses the default language if no localization exists for the requested language.
331            *
332            * @param locale the locale of the language
333            * @return the localized name of this layout set prototype
334            */
335            @Override
336            public java.lang.String getName(java.util.Locale locale) {
337                    return _layoutSetPrototype.getName(locale);
338            }
339    
340            /**
341            * 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.
342            *
343            * @param locale the local of the language
344            * @param useDefault whether to use the default language if no localization exists for the requested language
345            * @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.
346            */
347            @Override
348            public java.lang.String getName(java.util.Locale locale, boolean useDefault) {
349                    return _layoutSetPrototype.getName(locale, useDefault);
350            }
351    
352            /**
353            * Returns the localized name of this layout set prototype in the language. Uses the default language if no localization exists for the requested language.
354            *
355            * @param languageId the ID of the language
356            * @return the localized name of this layout set prototype
357            */
358            @Override
359            public java.lang.String getName(java.lang.String languageId) {
360                    return _layoutSetPrototype.getName(languageId);
361            }
362    
363            /**
364            * 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.
365            *
366            * @param languageId the ID of the language
367            * @param useDefault whether to use the default language if no localization exists for the requested language
368            * @return the localized name of this layout set prototype
369            */
370            @Override
371            public java.lang.String getName(java.lang.String languageId,
372                    boolean useDefault) {
373                    return _layoutSetPrototype.getName(languageId, useDefault);
374            }
375    
376            @Override
377            public java.lang.String getNameCurrentLanguageId() {
378                    return _layoutSetPrototype.getNameCurrentLanguageId();
379            }
380    
381            @Override
382            public java.lang.String getNameCurrentValue() {
383                    return _layoutSetPrototype.getNameCurrentValue();
384            }
385    
386            /**
387            * Returns a map of the locales and localized names of this layout set prototype.
388            *
389            * @return the locales and localized names of this layout set prototype
390            */
391            @Override
392            public java.util.Map<java.util.Locale, java.lang.String> getNameMap() {
393                    return _layoutSetPrototype.getNameMap();
394            }
395    
396            /**
397            * Sets the name of this layout set prototype.
398            *
399            * @param name the name of this layout set prototype
400            */
401            @Override
402            public void setName(java.lang.String name) {
403                    _layoutSetPrototype.setName(name);
404            }
405    
406            /**
407            * Sets the localized name of this layout set prototype in the language.
408            *
409            * @param name the localized name of this layout set prototype
410            * @param locale the locale of the language
411            */
412            @Override
413            public void setName(java.lang.String name, java.util.Locale locale) {
414                    _layoutSetPrototype.setName(name, locale);
415            }
416    
417            /**
418            * Sets the localized name of this layout set prototype in the language, and sets the default locale.
419            *
420            * @param name the localized name of this layout set prototype
421            * @param locale the locale of the language
422            * @param defaultLocale the default locale
423            */
424            @Override
425            public void setName(java.lang.String name, java.util.Locale locale,
426                    java.util.Locale defaultLocale) {
427                    _layoutSetPrototype.setName(name, locale, defaultLocale);
428            }
429    
430            @Override
431            public void setNameCurrentLanguageId(java.lang.String languageId) {
432                    _layoutSetPrototype.setNameCurrentLanguageId(languageId);
433            }
434    
435            /**
436            * Sets the localized names of this layout set prototype from the map of locales and localized names.
437            *
438            * @param nameMap the locales and localized names of this layout set prototype
439            */
440            @Override
441            public void setNameMap(
442                    java.util.Map<java.util.Locale, java.lang.String> nameMap) {
443                    _layoutSetPrototype.setNameMap(nameMap);
444            }
445    
446            /**
447            * Sets the localized names of this layout set prototype from the map of locales and localized names, and sets the default locale.
448            *
449            * @param nameMap the locales and localized names of this layout set prototype
450            * @param defaultLocale the default locale
451            */
452            @Override
453            public void setNameMap(
454                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
455                    java.util.Locale defaultLocale) {
456                    _layoutSetPrototype.setNameMap(nameMap, defaultLocale);
457            }
458    
459            /**
460            * Returns the description of this layout set prototype.
461            *
462            * @return the description of this layout set prototype
463            */
464            @Override
465            public java.lang.String getDescription() {
466                    return _layoutSetPrototype.getDescription();
467            }
468    
469            /**
470            * Sets the description of this layout set prototype.
471            *
472            * @param description the description of this layout set prototype
473            */
474            @Override
475            public void setDescription(java.lang.String description) {
476                    _layoutSetPrototype.setDescription(description);
477            }
478    
479            /**
480            * Returns the settings of this layout set prototype.
481            *
482            * @return the settings of this layout set prototype
483            */
484            @Override
485            public java.lang.String getSettings() {
486                    return _layoutSetPrototype.getSettings();
487            }
488    
489            /**
490            * Sets the settings of this layout set prototype.
491            *
492            * @param settings the settings of this layout set prototype
493            */
494            @Override
495            public void setSettings(java.lang.String settings) {
496                    _layoutSetPrototype.setSettings(settings);
497            }
498    
499            /**
500            * Returns the active of this layout set prototype.
501            *
502            * @return the active of this layout set prototype
503            */
504            @Override
505            public boolean getActive() {
506                    return _layoutSetPrototype.getActive();
507            }
508    
509            /**
510            * Returns <code>true</code> if this layout set prototype is active.
511            *
512            * @return <code>true</code> if this layout set prototype is active; <code>false</code> otherwise
513            */
514            @Override
515            public boolean isActive() {
516                    return _layoutSetPrototype.isActive();
517            }
518    
519            /**
520            * Sets whether this layout set prototype is active.
521            *
522            * @param active the active of this layout set prototype
523            */
524            @Override
525            public void setActive(boolean active) {
526                    _layoutSetPrototype.setActive(active);
527            }
528    
529            @Override
530            public boolean isNew() {
531                    return _layoutSetPrototype.isNew();
532            }
533    
534            @Override
535            public void setNew(boolean n) {
536                    _layoutSetPrototype.setNew(n);
537            }
538    
539            @Override
540            public boolean isCachedModel() {
541                    return _layoutSetPrototype.isCachedModel();
542            }
543    
544            @Override
545            public void setCachedModel(boolean cachedModel) {
546                    _layoutSetPrototype.setCachedModel(cachedModel);
547            }
548    
549            @Override
550            public boolean isEscapedModel() {
551                    return _layoutSetPrototype.isEscapedModel();
552            }
553    
554            @Override
555            public java.io.Serializable getPrimaryKeyObj() {
556                    return _layoutSetPrototype.getPrimaryKeyObj();
557            }
558    
559            @Override
560            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
561                    _layoutSetPrototype.setPrimaryKeyObj(primaryKeyObj);
562            }
563    
564            @Override
565            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
566                    return _layoutSetPrototype.getExpandoBridge();
567            }
568    
569            @Override
570            public void setExpandoBridgeAttributes(
571                    com.liferay.portal.model.BaseModel<?> baseModel) {
572                    _layoutSetPrototype.setExpandoBridgeAttributes(baseModel);
573            }
574    
575            @Override
576            public void setExpandoBridgeAttributes(
577                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
578                    _layoutSetPrototype.setExpandoBridgeAttributes(expandoBridge);
579            }
580    
581            @Override
582            public void setExpandoBridgeAttributes(
583                    com.liferay.portal.service.ServiceContext serviceContext) {
584                    _layoutSetPrototype.setExpandoBridgeAttributes(serviceContext);
585            }
586    
587            @Override
588            public java.lang.String[] getAvailableLanguageIds() {
589                    return _layoutSetPrototype.getAvailableLanguageIds();
590            }
591    
592            @Override
593            public java.lang.String getDefaultLanguageId() {
594                    return _layoutSetPrototype.getDefaultLanguageId();
595            }
596    
597            @Override
598            public void prepareLocalizedFieldsForImport()
599                    throws com.liferay.portal.LocaleException {
600                    _layoutSetPrototype.prepareLocalizedFieldsForImport();
601            }
602    
603            @Override
604            public void prepareLocalizedFieldsForImport(
605                    java.util.Locale defaultImportLocale)
606                    throws com.liferay.portal.LocaleException {
607                    _layoutSetPrototype.prepareLocalizedFieldsForImport(defaultImportLocale);
608            }
609    
610            @Override
611            public java.lang.Object clone() {
612                    return new LayoutSetPrototypeWrapper((LayoutSetPrototype)_layoutSetPrototype.clone());
613            }
614    
615            @Override
616            public int compareTo(
617                    com.liferay.portal.model.LayoutSetPrototype layoutSetPrototype) {
618                    return _layoutSetPrototype.compareTo(layoutSetPrototype);
619            }
620    
621            @Override
622            public int hashCode() {
623                    return _layoutSetPrototype.hashCode();
624            }
625    
626            @Override
627            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.LayoutSetPrototype> toCacheModel() {
628                    return _layoutSetPrototype.toCacheModel();
629            }
630    
631            @Override
632            public com.liferay.portal.model.LayoutSetPrototype toEscapedModel() {
633                    return new LayoutSetPrototypeWrapper(_layoutSetPrototype.toEscapedModel());
634            }
635    
636            @Override
637            public com.liferay.portal.model.LayoutSetPrototype toUnescapedModel() {
638                    return new LayoutSetPrototypeWrapper(_layoutSetPrototype.toUnescapedModel());
639            }
640    
641            @Override
642            public java.lang.String toString() {
643                    return _layoutSetPrototype.toString();
644            }
645    
646            @Override
647            public java.lang.String toXmlString() {
648                    return _layoutSetPrototype.toXmlString();
649            }
650    
651            @Override
652            public void persist()
653                    throws com.liferay.portal.kernel.exception.SystemException {
654                    _layoutSetPrototype.persist();
655            }
656    
657            @Override
658            public com.liferay.portal.model.Group getGroup()
659                    throws com.liferay.portal.kernel.exception.PortalException,
660                            com.liferay.portal.kernel.exception.SystemException {
661                    return _layoutSetPrototype.getGroup();
662            }
663    
664            @Override
665            public long getGroupId()
666                    throws com.liferay.portal.kernel.exception.PortalException,
667                            com.liferay.portal.kernel.exception.SystemException {
668                    return _layoutSetPrototype.getGroupId();
669            }
670    
671            @Override
672            public com.liferay.portal.model.LayoutSet getLayoutSet()
673                    throws com.liferay.portal.kernel.exception.PortalException,
674                            com.liferay.portal.kernel.exception.SystemException {
675                    return _layoutSetPrototype.getLayoutSet();
676            }
677    
678            @Override
679            public com.liferay.portal.kernel.util.UnicodeProperties getSettingsProperties() {
680                    return _layoutSetPrototype.getSettingsProperties();
681            }
682    
683            @Override
684            public java.lang.String getSettingsProperty(java.lang.String key) {
685                    return _layoutSetPrototype.getSettingsProperty(key);
686            }
687    
688            @Override
689            public void setSettingsProperties(
690                    com.liferay.portal.kernel.util.UnicodeProperties settingsProperties) {
691                    _layoutSetPrototype.setSettingsProperties(settingsProperties);
692            }
693    
694            @Override
695            public boolean equals(Object obj) {
696                    if (this == obj) {
697                            return true;
698                    }
699    
700                    if (!(obj instanceof LayoutSetPrototypeWrapper)) {
701                            return false;
702                    }
703    
704                    LayoutSetPrototypeWrapper layoutSetPrototypeWrapper = (LayoutSetPrototypeWrapper)obj;
705    
706                    if (Validator.equals(_layoutSetPrototype,
707                                            layoutSetPrototypeWrapper._layoutSetPrototype)) {
708                            return true;
709                    }
710    
711                    return false;
712            }
713    
714            @Override
715            public StagedModelType getStagedModelType() {
716                    return _layoutSetPrototype.getStagedModelType();
717            }
718    
719            /**
720             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
721             */
722            public LayoutSetPrototype getWrappedLayoutSetPrototype() {
723                    return _layoutSetPrototype;
724            }
725    
726            @Override
727            public LayoutSetPrototype getWrappedModel() {
728                    return _layoutSetPrototype;
729            }
730    
731            @Override
732            public void resetOriginalValues() {
733                    _layoutSetPrototype.resetOriginalValues();
734            }
735    
736            private LayoutSetPrototype _layoutSetPrototype;
737    }