001    /**
002     * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.util.Validator;
020    
021    import java.util.Date;
022    import java.util.HashMap;
023    import java.util.Map;
024    
025    /**
026     * <p>
027     * This class is a wrapper for {@link LayoutSet}.
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see LayoutSet
032     * @generated
033     */
034    @ProviderType
035    public class LayoutSetWrapper implements LayoutSet, ModelWrapper<LayoutSet> {
036            public LayoutSetWrapper(LayoutSet layoutSet) {
037                    _layoutSet = layoutSet;
038            }
039    
040            @Override
041            public Class<?> getModelClass() {
042                    return LayoutSet.class;
043            }
044    
045            @Override
046            public String getModelClassName() {
047                    return LayoutSet.class.getName();
048            }
049    
050            @Override
051            public Map<String, Object> getModelAttributes() {
052                    Map<String, Object> attributes = new HashMap<String, Object>();
053    
054                    attributes.put("mvccVersion", getMvccVersion());
055                    attributes.put("layoutSetId", getLayoutSetId());
056                    attributes.put("groupId", getGroupId());
057                    attributes.put("companyId", getCompanyId());
058                    attributes.put("createDate", getCreateDate());
059                    attributes.put("modifiedDate", getModifiedDate());
060                    attributes.put("privateLayout", getPrivateLayout());
061                    attributes.put("logoId", getLogoId());
062                    attributes.put("themeId", getThemeId());
063                    attributes.put("colorSchemeId", getColorSchemeId());
064                    attributes.put("wapThemeId", getWapThemeId());
065                    attributes.put("wapColorSchemeId", getWapColorSchemeId());
066                    attributes.put("css", getCss());
067                    attributes.put("pageCount", getPageCount());
068                    attributes.put("settings", getSettings());
069                    attributes.put("layoutSetPrototypeUuid", getLayoutSetPrototypeUuid());
070                    attributes.put("layoutSetPrototypeLinkEnabled",
071                            getLayoutSetPrototypeLinkEnabled());
072    
073                    return attributes;
074            }
075    
076            @Override
077            public void setModelAttributes(Map<String, Object> attributes) {
078                    Long mvccVersion = (Long)attributes.get("mvccVersion");
079    
080                    if (mvccVersion != null) {
081                            setMvccVersion(mvccVersion);
082                    }
083    
084                    Long layoutSetId = (Long)attributes.get("layoutSetId");
085    
086                    if (layoutSetId != null) {
087                            setLayoutSetId(layoutSetId);
088                    }
089    
090                    Long groupId = (Long)attributes.get("groupId");
091    
092                    if (groupId != null) {
093                            setGroupId(groupId);
094                    }
095    
096                    Long companyId = (Long)attributes.get("companyId");
097    
098                    if (companyId != null) {
099                            setCompanyId(companyId);
100                    }
101    
102                    Date createDate = (Date)attributes.get("createDate");
103    
104                    if (createDate != null) {
105                            setCreateDate(createDate);
106                    }
107    
108                    Date modifiedDate = (Date)attributes.get("modifiedDate");
109    
110                    if (modifiedDate != null) {
111                            setModifiedDate(modifiedDate);
112                    }
113    
114                    Boolean privateLayout = (Boolean)attributes.get("privateLayout");
115    
116                    if (privateLayout != null) {
117                            setPrivateLayout(privateLayout);
118                    }
119    
120                    Long logoId = (Long)attributes.get("logoId");
121    
122                    if (logoId != null) {
123                            setLogoId(logoId);
124                    }
125    
126                    String themeId = (String)attributes.get("themeId");
127    
128                    if (themeId != null) {
129                            setThemeId(themeId);
130                    }
131    
132                    String colorSchemeId = (String)attributes.get("colorSchemeId");
133    
134                    if (colorSchemeId != null) {
135                            setColorSchemeId(colorSchemeId);
136                    }
137    
138                    String wapThemeId = (String)attributes.get("wapThemeId");
139    
140                    if (wapThemeId != null) {
141                            setWapThemeId(wapThemeId);
142                    }
143    
144                    String wapColorSchemeId = (String)attributes.get("wapColorSchemeId");
145    
146                    if (wapColorSchemeId != null) {
147                            setWapColorSchemeId(wapColorSchemeId);
148                    }
149    
150                    String css = (String)attributes.get("css");
151    
152                    if (css != null) {
153                            setCss(css);
154                    }
155    
156                    Integer pageCount = (Integer)attributes.get("pageCount");
157    
158                    if (pageCount != null) {
159                            setPageCount(pageCount);
160                    }
161    
162                    String settings = (String)attributes.get("settings");
163    
164                    if (settings != null) {
165                            setSettings(settings);
166                    }
167    
168                    String layoutSetPrototypeUuid = (String)attributes.get(
169                                    "layoutSetPrototypeUuid");
170    
171                    if (layoutSetPrototypeUuid != null) {
172                            setLayoutSetPrototypeUuid(layoutSetPrototypeUuid);
173                    }
174    
175                    Boolean layoutSetPrototypeLinkEnabled = (Boolean)attributes.get(
176                                    "layoutSetPrototypeLinkEnabled");
177    
178                    if (layoutSetPrototypeLinkEnabled != null) {
179                            setLayoutSetPrototypeLinkEnabled(layoutSetPrototypeLinkEnabled);
180                    }
181            }
182    
183            @Override
184            public java.lang.Object clone() {
185                    return new LayoutSetWrapper((LayoutSet)_layoutSet.clone());
186            }
187    
188            @Override
189            public int compareTo(com.liferay.portal.model.LayoutSet layoutSet) {
190                    return _layoutSet.compareTo(layoutSet);
191            }
192    
193            /**
194            * Returns the layout set's color scheme.
195            *
196            * <p>
197            * Just like themes, color schemes can be configured on the layout set
198            * level. The layout set's color scheme can be overridden on the layout
199            * level.
200            * </p>
201            *
202            * @return the layout set's color scheme
203            * @throws SystemException if a system exception occurred
204            */
205            @Override
206            public com.liferay.portal.model.ColorScheme getColorScheme() {
207                    return _layoutSet.getColorScheme();
208            }
209    
210            /**
211            * Returns the color scheme ID of this layout set.
212            *
213            * @return the color scheme ID of this layout set
214            */
215            @Override
216            public java.lang.String getColorSchemeId() {
217                    return _layoutSet.getColorSchemeId();
218            }
219    
220            /**
221            * Returns the company ID of this layout set.
222            *
223            * @return the company ID of this layout set
224            */
225            @Override
226            public long getCompanyId() {
227                    return _layoutSet.getCompanyId();
228            }
229    
230            /**
231            * Returns the create date of this layout set.
232            *
233            * @return the create date of this layout set
234            */
235            @Override
236            public java.util.Date getCreateDate() {
237                    return _layoutSet.getCreateDate();
238            }
239    
240            /**
241            * Returns the css of this layout set.
242            *
243            * @return the css of this layout set
244            */
245            @Override
246            public java.lang.String getCss() {
247                    return _layoutSet.getCss();
248            }
249    
250            @Override
251            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
252                    return _layoutSet.getExpandoBridge();
253            }
254    
255            /**
256            * Returns the layout set's group.
257            *
258            * @return the layout set's group
259            * @throws PortalException if a group with the primary key could not be
260            found
261            * @throws SystemException if a system exception occurred
262            */
263            @Override
264            public com.liferay.portal.model.Group getGroup()
265                    throws com.liferay.portal.kernel.exception.PortalException {
266                    return _layoutSet.getGroup();
267            }
268    
269            /**
270            * Returns the group ID of this layout set.
271            *
272            * @return the group ID of this layout set
273            */
274            @Override
275            public long getGroupId() {
276                    return _layoutSet.getGroupId();
277            }
278    
279            /**
280            * Returns the layout set ID of this layout set.
281            *
282            * @return the layout set ID of this layout set
283            */
284            @Override
285            public long getLayoutSetId() {
286                    return _layoutSet.getLayoutSetId();
287            }
288    
289            /**
290            * Returns the layout set prototype's ID, or <code>0</code> if it has no layout
291            * set prototype.
292            *
293            * <p>
294            * Prototype is Liferay's technical name for a site template.
295            * </p>
296            *
297            * @return the layout set prototype's ID, or <code>0</code> if it has no layout
298            set prototype
299            * @throws PortalException if a matching layout set prototype could not be
300            found
301            * @throws SystemException if a system exception occurred
302            */
303            @Override
304            public long getLayoutSetPrototypeId()
305                    throws com.liferay.portal.kernel.exception.PortalException {
306                    return _layoutSet.getLayoutSetPrototypeId();
307            }
308    
309            /**
310            * Returns the layout set prototype link enabled of this layout set.
311            *
312            * @return the layout set prototype link enabled of this layout set
313            */
314            @Override
315            public boolean getLayoutSetPrototypeLinkEnabled() {
316                    return _layoutSet.getLayoutSetPrototypeLinkEnabled();
317            }
318    
319            /**
320            * Returns the layout set prototype uuid of this layout set.
321            *
322            * @return the layout set prototype uuid of this layout set
323            */
324            @Override
325            public java.lang.String getLayoutSetPrototypeUuid() {
326                    return _layoutSet.getLayoutSetPrototypeUuid();
327            }
328    
329            @Override
330            public long getLiveLogoId() {
331                    return _layoutSet.getLiveLogoId();
332            }
333    
334            @Override
335            public boolean getLogo() {
336                    return _layoutSet.getLogo();
337            }
338    
339            /**
340            * Returns the logo ID of this layout set.
341            *
342            * @return the logo ID of this layout set
343            */
344            @Override
345            public long getLogoId() {
346                    return _layoutSet.getLogoId();
347            }
348    
349            /**
350            * Returns the modified date of this layout set.
351            *
352            * @return the modified date of this layout set
353            */
354            @Override
355            public java.util.Date getModifiedDate() {
356                    return _layoutSet.getModifiedDate();
357            }
358    
359            /**
360            * Returns the mvcc version of this layout set.
361            *
362            * @return the mvcc version of this layout set
363            */
364            @Override
365            public long getMvccVersion() {
366                    return _layoutSet.getMvccVersion();
367            }
368    
369            /**
370            * Returns the page count of this layout set.
371            *
372            * @return the page count of this layout set
373            */
374            @Override
375            public int getPageCount() {
376                    return _layoutSet.getPageCount();
377            }
378    
379            /**
380            * Returns the primary key of this layout set.
381            *
382            * @return the primary key of this layout set
383            */
384            @Override
385            public long getPrimaryKey() {
386                    return _layoutSet.getPrimaryKey();
387            }
388    
389            @Override
390            public java.io.Serializable getPrimaryKeyObj() {
391                    return _layoutSet.getPrimaryKeyObj();
392            }
393    
394            /**
395            * Returns the private layout of this layout set.
396            *
397            * @return the private layout of this layout set
398            */
399            @Override
400            public boolean getPrivateLayout() {
401                    return _layoutSet.getPrivateLayout();
402            }
403    
404            /**
405            * Returns the settings of this layout set.
406            *
407            * @return the settings of this layout set
408            */
409            @Override
410            public java.lang.String getSettings() {
411                    return _layoutSet.getSettings();
412            }
413    
414            @Override
415            public com.liferay.portal.kernel.util.UnicodeProperties getSettingsProperties() {
416                    return _layoutSet.getSettingsProperties();
417            }
418    
419            @Override
420            public java.lang.String getSettingsProperty(java.lang.String key) {
421                    return _layoutSet.getSettingsProperty(key);
422            }
423    
424            @Override
425            public com.liferay.portal.model.Theme getTheme() {
426                    return _layoutSet.getTheme();
427            }
428    
429            /**
430            * Returns the theme ID of this layout set.
431            *
432            * @return the theme ID of this layout set
433            */
434            @Override
435            public java.lang.String getThemeId() {
436                    return _layoutSet.getThemeId();
437            }
438    
439            @Override
440            public java.lang.String getThemeSetting(java.lang.String key,
441                    java.lang.String device) {
442                    return _layoutSet.getThemeSetting(key, device);
443            }
444    
445            /**
446            * Returns the name of the layout set's virtual host.
447            *
448            * <p>
449            * When accessing a layout set that has a the virtual host, the URL elements
450            * "/web/sitename" or "/group/sitename" can be omitted.
451            * </p>
452            *
453            * @return the layout set's virtual host name, or an empty string if the layout
454            set has no virtual host configured
455            */
456            @Override
457            public java.lang.String getVirtualHostname() {
458                    return _layoutSet.getVirtualHostname();
459            }
460    
461            @Override
462            public com.liferay.portal.model.ColorScheme getWapColorScheme() {
463                    return _layoutSet.getWapColorScheme();
464            }
465    
466            /**
467            * Returns the wap color scheme ID of this layout set.
468            *
469            * @return the wap color scheme ID of this layout set
470            */
471            @Override
472            public java.lang.String getWapColorSchemeId() {
473                    return _layoutSet.getWapColorSchemeId();
474            }
475    
476            @Override
477            public com.liferay.portal.model.Theme getWapTheme() {
478                    return _layoutSet.getWapTheme();
479            }
480    
481            /**
482            * Returns the wap theme ID of this layout set.
483            *
484            * @return the wap theme ID of this layout set
485            */
486            @Override
487            public java.lang.String getWapThemeId() {
488                    return _layoutSet.getWapThemeId();
489            }
490    
491            @Override
492            public int hashCode() {
493                    return _layoutSet.hashCode();
494            }
495    
496            @Override
497            public boolean isCachedModel() {
498                    return _layoutSet.isCachedModel();
499            }
500    
501            @Override
502            public boolean isEscapedModel() {
503                    return _layoutSet.isEscapedModel();
504            }
505    
506            @Override
507            public boolean isLayoutSetPrototypeLinkActive() {
508                    return _layoutSet.isLayoutSetPrototypeLinkActive();
509            }
510    
511            /**
512            * Returns <code>true</code> if this layout set is layout set prototype link enabled.
513            *
514            * @return <code>true</code> if this layout set is layout set prototype link enabled; <code>false</code> otherwise
515            */
516            @Override
517            public boolean isLayoutSetPrototypeLinkEnabled() {
518                    return _layoutSet.isLayoutSetPrototypeLinkEnabled();
519            }
520    
521            @Override
522            public boolean isLogo() {
523                    return _layoutSet.isLogo();
524            }
525    
526            @Override
527            public boolean isNew() {
528                    return _layoutSet.isNew();
529            }
530    
531            /**
532            * Returns <code>true</code> if this layout set is private layout.
533            *
534            * @return <code>true</code> if this layout set is private layout; <code>false</code> otherwise
535            */
536            @Override
537            public boolean isPrivateLayout() {
538                    return _layoutSet.isPrivateLayout();
539            }
540    
541            @Override
542            public void persist() {
543                    _layoutSet.persist();
544            }
545    
546            @Override
547            public void setCachedModel(boolean cachedModel) {
548                    _layoutSet.setCachedModel(cachedModel);
549            }
550    
551            /**
552            * Sets the color scheme ID of this layout set.
553            *
554            * @param colorSchemeId the color scheme ID of this layout set
555            */
556            @Override
557            public void setColorSchemeId(java.lang.String colorSchemeId) {
558                    _layoutSet.setColorSchemeId(colorSchemeId);
559            }
560    
561            /**
562            * Sets the company ID of this layout set.
563            *
564            * @param companyId the company ID of this layout set
565            */
566            @Override
567            public void setCompanyId(long companyId) {
568                    _layoutSet.setCompanyId(companyId);
569            }
570    
571            /**
572            * Sets the create date of this layout set.
573            *
574            * @param createDate the create date of this layout set
575            */
576            @Override
577            public void setCreateDate(java.util.Date createDate) {
578                    _layoutSet.setCreateDate(createDate);
579            }
580    
581            /**
582            * Sets the css of this layout set.
583            *
584            * @param css the css of this layout set
585            */
586            @Override
587            public void setCss(java.lang.String css) {
588                    _layoutSet.setCss(css);
589            }
590    
591            @Override
592            public void setExpandoBridgeAttributes(
593                    com.liferay.portal.model.BaseModel<?> baseModel) {
594                    _layoutSet.setExpandoBridgeAttributes(baseModel);
595            }
596    
597            @Override
598            public void setExpandoBridgeAttributes(
599                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
600                    _layoutSet.setExpandoBridgeAttributes(expandoBridge);
601            }
602    
603            @Override
604            public void setExpandoBridgeAttributes(
605                    com.liferay.portal.service.ServiceContext serviceContext) {
606                    _layoutSet.setExpandoBridgeAttributes(serviceContext);
607            }
608    
609            /**
610            * Sets the group ID of this layout set.
611            *
612            * @param groupId the group ID of this layout set
613            */
614            @Override
615            public void setGroupId(long groupId) {
616                    _layoutSet.setGroupId(groupId);
617            }
618    
619            /**
620            * Sets the layout set ID of this layout set.
621            *
622            * @param layoutSetId the layout set ID of this layout set
623            */
624            @Override
625            public void setLayoutSetId(long layoutSetId) {
626                    _layoutSet.setLayoutSetId(layoutSetId);
627            }
628    
629            /**
630            * Sets whether this layout set is layout set prototype link enabled.
631            *
632            * @param layoutSetPrototypeLinkEnabled the layout set prototype link enabled of this layout set
633            */
634            @Override
635            public void setLayoutSetPrototypeLinkEnabled(
636                    boolean layoutSetPrototypeLinkEnabled) {
637                    _layoutSet.setLayoutSetPrototypeLinkEnabled(layoutSetPrototypeLinkEnabled);
638            }
639    
640            /**
641            * Sets the layout set prototype uuid of this layout set.
642            *
643            * @param layoutSetPrototypeUuid the layout set prototype uuid of this layout set
644            */
645            @Override
646            public void setLayoutSetPrototypeUuid(
647                    java.lang.String layoutSetPrototypeUuid) {
648                    _layoutSet.setLayoutSetPrototypeUuid(layoutSetPrototypeUuid);
649            }
650    
651            /**
652            * Sets the logo ID of this layout set.
653            *
654            * @param logoId the logo ID of this layout set
655            */
656            @Override
657            public void setLogoId(long logoId) {
658                    _layoutSet.setLogoId(logoId);
659            }
660    
661            /**
662            * Sets the modified date of this layout set.
663            *
664            * @param modifiedDate the modified date of this layout set
665            */
666            @Override
667            public void setModifiedDate(java.util.Date modifiedDate) {
668                    _layoutSet.setModifiedDate(modifiedDate);
669            }
670    
671            /**
672            * Sets the mvcc version of this layout set.
673            *
674            * @param mvccVersion the mvcc version of this layout set
675            */
676            @Override
677            public void setMvccVersion(long mvccVersion) {
678                    _layoutSet.setMvccVersion(mvccVersion);
679            }
680    
681            @Override
682            public void setNew(boolean n) {
683                    _layoutSet.setNew(n);
684            }
685    
686            /**
687            * Sets the page count of this layout set.
688            *
689            * @param pageCount the page count of this layout set
690            */
691            @Override
692            public void setPageCount(int pageCount) {
693                    _layoutSet.setPageCount(pageCount);
694            }
695    
696            /**
697            * Sets the primary key of this layout set.
698            *
699            * @param primaryKey the primary key of this layout set
700            */
701            @Override
702            public void setPrimaryKey(long primaryKey) {
703                    _layoutSet.setPrimaryKey(primaryKey);
704            }
705    
706            @Override
707            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
708                    _layoutSet.setPrimaryKeyObj(primaryKeyObj);
709            }
710    
711            /**
712            * Sets whether this layout set is private layout.
713            *
714            * @param privateLayout the private layout of this layout set
715            */
716            @Override
717            public void setPrivateLayout(boolean privateLayout) {
718                    _layoutSet.setPrivateLayout(privateLayout);
719            }
720    
721            /**
722            * Sets the settings of this layout set.
723            *
724            * @param settings the settings of this layout set
725            */
726            @Override
727            public void setSettings(java.lang.String settings) {
728                    _layoutSet.setSettings(settings);
729            }
730    
731            @Override
732            public void setSettingsProperties(
733                    com.liferay.portal.kernel.util.UnicodeProperties settingsProperties) {
734                    _layoutSet.setSettingsProperties(settingsProperties);
735            }
736    
737            /**
738            * Sets the theme ID of this layout set.
739            *
740            * @param themeId the theme ID of this layout set
741            */
742            @Override
743            public void setThemeId(java.lang.String themeId) {
744                    _layoutSet.setThemeId(themeId);
745            }
746    
747            /**
748            * Sets the name of the layout set's virtual host.
749            *
750            * @param virtualHostname the name of the layout set's virtual host
751            * @see #getVirtualHostname()
752            */
753            @Override
754            public void setVirtualHostname(java.lang.String virtualHostname) {
755                    _layoutSet.setVirtualHostname(virtualHostname);
756            }
757    
758            /**
759            * Sets the wap color scheme ID of this layout set.
760            *
761            * @param wapColorSchemeId the wap color scheme ID of this layout set
762            */
763            @Override
764            public void setWapColorSchemeId(java.lang.String wapColorSchemeId) {
765                    _layoutSet.setWapColorSchemeId(wapColorSchemeId);
766            }
767    
768            /**
769            * Sets the wap theme ID of this layout set.
770            *
771            * @param wapThemeId the wap theme ID of this layout set
772            */
773            @Override
774            public void setWapThemeId(java.lang.String wapThemeId) {
775                    _layoutSet.setWapThemeId(wapThemeId);
776            }
777    
778            @Override
779            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.LayoutSet> toCacheModel() {
780                    return _layoutSet.toCacheModel();
781            }
782    
783            @Override
784            public com.liferay.portal.model.LayoutSet toEscapedModel() {
785                    return new LayoutSetWrapper(_layoutSet.toEscapedModel());
786            }
787    
788            @Override
789            public java.lang.String toString() {
790                    return _layoutSet.toString();
791            }
792    
793            @Override
794            public com.liferay.portal.model.LayoutSet toUnescapedModel() {
795                    return new LayoutSetWrapper(_layoutSet.toUnescapedModel());
796            }
797    
798            @Override
799            public java.lang.String toXmlString() {
800                    return _layoutSet.toXmlString();
801            }
802    
803            @Override
804            public boolean equals(Object obj) {
805                    if (this == obj) {
806                            return true;
807                    }
808    
809                    if (!(obj instanceof LayoutSetWrapper)) {
810                            return false;
811                    }
812    
813                    LayoutSetWrapper layoutSetWrapper = (LayoutSetWrapper)obj;
814    
815                    if (Validator.equals(_layoutSet, layoutSetWrapper._layoutSet)) {
816                            return true;
817                    }
818    
819                    return false;
820            }
821    
822            /**
823             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
824             */
825            @Deprecated
826            public LayoutSet getWrappedLayoutSet() {
827                    return _layoutSet;
828            }
829    
830            @Override
831            public LayoutSet getWrappedModel() {
832                    return _layoutSet;
833            }
834    
835            @Override
836            public boolean isEntityCacheEnabled() {
837                    return _layoutSet.isEntityCacheEnabled();
838            }
839    
840            @Override
841            public boolean isFinderCacheEnabled() {
842                    return _layoutSet.isFinderCacheEnabled();
843            }
844    
845            @Override
846            public void resetOriginalValues() {
847                    _layoutSet.resetOriginalValues();
848            }
849    
850            private final LayoutSet _layoutSet;
851    }