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            */
204            @Override
205            public com.liferay.portal.model.ColorScheme getColorScheme() {
206                    return _layoutSet.getColorScheme();
207            }
208    
209            /**
210            * Returns the color scheme ID of this layout set.
211            *
212            * @return the color scheme ID of this layout set
213            */
214            @Override
215            public java.lang.String getColorSchemeId() {
216                    return _layoutSet.getColorSchemeId();
217            }
218    
219            @Override
220            public java.lang.String getCompanyFallbackVirtualHostname() {
221                    return _layoutSet.getCompanyFallbackVirtualHostname();
222            }
223    
224            /**
225            * Returns the company ID of this layout set.
226            *
227            * @return the company ID of this layout set
228            */
229            @Override
230            public long getCompanyId() {
231                    return _layoutSet.getCompanyId();
232            }
233    
234            /**
235            * Returns the create date of this layout set.
236            *
237            * @return the create date of this layout set
238            */
239            @Override
240            public Date getCreateDate() {
241                    return _layoutSet.getCreateDate();
242            }
243    
244            /**
245            * Returns the css of this layout set.
246            *
247            * @return the css of this layout set
248            */
249            @Override
250            public java.lang.String getCss() {
251                    return _layoutSet.getCss();
252            }
253    
254            @Override
255            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
256                    return _layoutSet.getExpandoBridge();
257            }
258    
259            /**
260            * Returns the layout set's group.
261            *
262            * @return the layout set's group
263            * @throws PortalException if a group with the primary key could not be
264            found
265            */
266            @Override
267            public com.liferay.portal.model.Group getGroup()
268                    throws com.liferay.portal.kernel.exception.PortalException {
269                    return _layoutSet.getGroup();
270            }
271    
272            /**
273            * Returns the group ID of this layout set.
274            *
275            * @return the group ID of this layout set
276            */
277            @Override
278            public long getGroupId() {
279                    return _layoutSet.getGroupId();
280            }
281    
282            /**
283            * Returns the layout set ID of this layout set.
284            *
285            * @return the layout set ID of this layout set
286            */
287            @Override
288            public long getLayoutSetId() {
289                    return _layoutSet.getLayoutSetId();
290            }
291    
292            /**
293            * Returns the layout set prototype's ID, or <code>0</code> if it has no
294            * layout set prototype.
295            *
296            * <p>
297            * Prototype is Liferay's technical name for a site template.
298            * </p>
299            *
300            * @return the layout set prototype's ID, or <code>0</code> if it has no
301            layout set prototype
302            * @throws PortalException if a matching layout set prototype could not be
303            found
304            */
305            @Override
306            public long getLayoutSetPrototypeId()
307                    throws com.liferay.portal.kernel.exception.PortalException {
308                    return _layoutSet.getLayoutSetPrototypeId();
309            }
310    
311            /**
312            * Returns the layout set prototype link enabled of this layout set.
313            *
314            * @return the layout set prototype link enabled of this layout set
315            */
316            @Override
317            public boolean getLayoutSetPrototypeLinkEnabled() {
318                    return _layoutSet.getLayoutSetPrototypeLinkEnabled();
319            }
320    
321            /**
322            * Returns the layout set prototype uuid of this layout set.
323            *
324            * @return the layout set prototype uuid of this layout set
325            */
326            @Override
327            public java.lang.String getLayoutSetPrototypeUuid() {
328                    return _layoutSet.getLayoutSetPrototypeUuid();
329            }
330    
331            @Override
332            public long getLiveLogoId() {
333                    return _layoutSet.getLiveLogoId();
334            }
335    
336            @Override
337            public boolean getLogo() {
338                    return _layoutSet.getLogo();
339            }
340    
341            /**
342            * Returns the logo ID of this layout set.
343            *
344            * @return the logo ID of this layout set
345            */
346            @Override
347            public long getLogoId() {
348                    return _layoutSet.getLogoId();
349            }
350    
351            /**
352            * Returns the modified date of this layout set.
353            *
354            * @return the modified date of this layout set
355            */
356            @Override
357            public Date getModifiedDate() {
358                    return _layoutSet.getModifiedDate();
359            }
360    
361            /**
362            * Returns the mvcc version of this layout set.
363            *
364            * @return the mvcc version of this layout set
365            */
366            @Override
367            public long getMvccVersion() {
368                    return _layoutSet.getMvccVersion();
369            }
370    
371            /**
372            * Returns the page count of this layout set.
373            *
374            * @return the page count of this layout set
375            */
376            @Override
377            public int getPageCount() {
378                    return _layoutSet.getPageCount();
379            }
380    
381            /**
382            * Returns the primary key of this layout set.
383            *
384            * @return the primary key of this layout set
385            */
386            @Override
387            public long getPrimaryKey() {
388                    return _layoutSet.getPrimaryKey();
389            }
390    
391            @Override
392            public java.io.Serializable getPrimaryKeyObj() {
393                    return _layoutSet.getPrimaryKeyObj();
394            }
395    
396            /**
397            * Returns the private layout of this layout set.
398            *
399            * @return the private layout of this layout set
400            */
401            @Override
402            public boolean getPrivateLayout() {
403                    return _layoutSet.getPrivateLayout();
404            }
405    
406            /**
407            * Returns the settings of this layout set.
408            *
409            * @return the settings of this layout set
410            */
411            @Override
412            public java.lang.String getSettings() {
413                    return _layoutSet.getSettings();
414            }
415    
416            @Override
417            public com.liferay.portal.kernel.util.UnicodeProperties getSettingsProperties() {
418                    return _layoutSet.getSettingsProperties();
419            }
420    
421            @Override
422            public java.lang.String getSettingsProperty(java.lang.String key) {
423                    return _layoutSet.getSettingsProperty(key);
424            }
425    
426            @Override
427            public com.liferay.portal.model.Theme getTheme() {
428                    return _layoutSet.getTheme();
429            }
430    
431            /**
432            * Returns the theme ID of this layout set.
433            *
434            * @return the theme ID of this layout set
435            */
436            @Override
437            public java.lang.String getThemeId() {
438                    return _layoutSet.getThemeId();
439            }
440    
441            @Override
442            public java.lang.String getThemeSetting(java.lang.String key,
443                    java.lang.String device) {
444                    return _layoutSet.getThemeSetting(key, device);
445            }
446    
447            /**
448            * Returns the name of the layout set's virtual host.
449            *
450            * <p>
451            * When accessing a layout set that has a the virtual host, the URL elements
452            * "/web/sitename" or "/group/sitename" can be omitted.
453            * </p>
454            *
455            * @return the layout set's virtual host name, or an empty string if the
456            layout set has no virtual host configured
457            */
458            @Override
459            public java.lang.String getVirtualHostname() {
460                    return _layoutSet.getVirtualHostname();
461            }
462    
463            @Override
464            public com.liferay.portal.model.ColorScheme getWapColorScheme() {
465                    return _layoutSet.getWapColorScheme();
466            }
467    
468            /**
469            * Returns the wap color scheme ID of this layout set.
470            *
471            * @return the wap color scheme ID of this layout set
472            */
473            @Override
474            public java.lang.String getWapColorSchemeId() {
475                    return _layoutSet.getWapColorSchemeId();
476            }
477    
478            @Override
479            public com.liferay.portal.model.Theme getWapTheme() {
480                    return _layoutSet.getWapTheme();
481            }
482    
483            /**
484            * Returns the wap theme ID of this layout set.
485            *
486            * @return the wap theme ID of this layout set
487            */
488            @Override
489            public java.lang.String getWapThemeId() {
490                    return _layoutSet.getWapThemeId();
491            }
492    
493            @Override
494            public boolean hasSetModifiedDate() {
495                    return _layoutSet.hasSetModifiedDate();
496            }
497    
498            @Override
499            public int hashCode() {
500                    return _layoutSet.hashCode();
501            }
502    
503            @Override
504            public boolean isCachedModel() {
505                    return _layoutSet.isCachedModel();
506            }
507    
508            @Override
509            public boolean isEscapedModel() {
510                    return _layoutSet.isEscapedModel();
511            }
512    
513            @Override
514            public boolean isLayoutSetPrototypeLinkActive() {
515                    return _layoutSet.isLayoutSetPrototypeLinkActive();
516            }
517    
518            /**
519            * Returns <code>true</code> if this layout set is layout set prototype link enabled.
520            *
521            * @return <code>true</code> if this layout set is layout set prototype link enabled; <code>false</code> otherwise
522            */
523            @Override
524            public boolean isLayoutSetPrototypeLinkEnabled() {
525                    return _layoutSet.isLayoutSetPrototypeLinkEnabled();
526            }
527    
528            @Override
529            public boolean isLogo() {
530                    return _layoutSet.isLogo();
531            }
532    
533            @Override
534            public boolean isNew() {
535                    return _layoutSet.isNew();
536            }
537    
538            /**
539            * Returns <code>true</code> if this layout set is private layout.
540            *
541            * @return <code>true</code> if this layout set is private layout; <code>false</code> otherwise
542            */
543            @Override
544            public boolean isPrivateLayout() {
545                    return _layoutSet.isPrivateLayout();
546            }
547    
548            @Override
549            public void persist() {
550                    _layoutSet.persist();
551            }
552    
553            @Override
554            public void setCachedModel(boolean cachedModel) {
555                    _layoutSet.setCachedModel(cachedModel);
556            }
557    
558            /**
559            * Sets the color scheme ID of this layout set.
560            *
561            * @param colorSchemeId the color scheme ID of this layout set
562            */
563            @Override
564            public void setColorSchemeId(java.lang.String colorSchemeId) {
565                    _layoutSet.setColorSchemeId(colorSchemeId);
566            }
567    
568            @Override
569            public void setCompanyFallbackVirtualHostname(
570                    java.lang.String companyFallbackVirtualHostname) {
571                    _layoutSet.setCompanyFallbackVirtualHostname(companyFallbackVirtualHostname);
572            }
573    
574            /**
575            * Sets the company ID of this layout set.
576            *
577            * @param companyId the company ID of this layout set
578            */
579            @Override
580            public void setCompanyId(long companyId) {
581                    _layoutSet.setCompanyId(companyId);
582            }
583    
584            /**
585            * Sets the create date of this layout set.
586            *
587            * @param createDate the create date of this layout set
588            */
589            @Override
590            public void setCreateDate(Date createDate) {
591                    _layoutSet.setCreateDate(createDate);
592            }
593    
594            /**
595            * Sets the css of this layout set.
596            *
597            * @param css the css of this layout set
598            */
599            @Override
600            public void setCss(java.lang.String css) {
601                    _layoutSet.setCss(css);
602            }
603    
604            @Override
605            public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
606                    _layoutSet.setExpandoBridgeAttributes(baseModel);
607            }
608    
609            @Override
610            public void setExpandoBridgeAttributes(
611                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
612                    _layoutSet.setExpandoBridgeAttributes(expandoBridge);
613            }
614    
615            @Override
616            public void setExpandoBridgeAttributes(
617                    com.liferay.portal.service.ServiceContext serviceContext) {
618                    _layoutSet.setExpandoBridgeAttributes(serviceContext);
619            }
620    
621            /**
622            * Sets the group ID of this layout set.
623            *
624            * @param groupId the group ID of this layout set
625            */
626            @Override
627            public void setGroupId(long groupId) {
628                    _layoutSet.setGroupId(groupId);
629            }
630    
631            /**
632            * Sets the layout set ID of this layout set.
633            *
634            * @param layoutSetId the layout set ID of this layout set
635            */
636            @Override
637            public void setLayoutSetId(long layoutSetId) {
638                    _layoutSet.setLayoutSetId(layoutSetId);
639            }
640    
641            /**
642            * Sets whether this layout set is layout set prototype link enabled.
643            *
644            * @param layoutSetPrototypeLinkEnabled the layout set prototype link enabled of this layout set
645            */
646            @Override
647            public void setLayoutSetPrototypeLinkEnabled(
648                    boolean layoutSetPrototypeLinkEnabled) {
649                    _layoutSet.setLayoutSetPrototypeLinkEnabled(layoutSetPrototypeLinkEnabled);
650            }
651    
652            /**
653            * Sets the layout set prototype uuid of this layout set.
654            *
655            * @param layoutSetPrototypeUuid the layout set prototype uuid of this layout set
656            */
657            @Override
658            public void setLayoutSetPrototypeUuid(
659                    java.lang.String layoutSetPrototypeUuid) {
660                    _layoutSet.setLayoutSetPrototypeUuid(layoutSetPrototypeUuid);
661            }
662    
663            /**
664            * Sets the logo ID of this layout set.
665            *
666            * @param logoId the logo ID of this layout set
667            */
668            @Override
669            public void setLogoId(long logoId) {
670                    _layoutSet.setLogoId(logoId);
671            }
672    
673            /**
674            * Sets the modified date of this layout set.
675            *
676            * @param modifiedDate the modified date of this layout set
677            */
678            @Override
679            public void setModifiedDate(Date modifiedDate) {
680                    _layoutSet.setModifiedDate(modifiedDate);
681            }
682    
683            /**
684            * Sets the mvcc version of this layout set.
685            *
686            * @param mvccVersion the mvcc version of this layout set
687            */
688            @Override
689            public void setMvccVersion(long mvccVersion) {
690                    _layoutSet.setMvccVersion(mvccVersion);
691            }
692    
693            @Override
694            public void setNew(boolean n) {
695                    _layoutSet.setNew(n);
696            }
697    
698            /**
699            * Sets the page count of this layout set.
700            *
701            * @param pageCount the page count of this layout set
702            */
703            @Override
704            public void setPageCount(int pageCount) {
705                    _layoutSet.setPageCount(pageCount);
706            }
707    
708            /**
709            * Sets the primary key of this layout set.
710            *
711            * @param primaryKey the primary key of this layout set
712            */
713            @Override
714            public void setPrimaryKey(long primaryKey) {
715                    _layoutSet.setPrimaryKey(primaryKey);
716            }
717    
718            @Override
719            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
720                    _layoutSet.setPrimaryKeyObj(primaryKeyObj);
721            }
722    
723            /**
724            * Sets whether this layout set is private layout.
725            *
726            * @param privateLayout the private layout of this layout set
727            */
728            @Override
729            public void setPrivateLayout(boolean privateLayout) {
730                    _layoutSet.setPrivateLayout(privateLayout);
731            }
732    
733            /**
734            * Sets the settings of this layout set.
735            *
736            * @param settings the settings of this layout set
737            */
738            @Override
739            public void setSettings(java.lang.String settings) {
740                    _layoutSet.setSettings(settings);
741            }
742    
743            @Override
744            public void setSettingsProperties(
745                    com.liferay.portal.kernel.util.UnicodeProperties settingsProperties) {
746                    _layoutSet.setSettingsProperties(settingsProperties);
747            }
748    
749            /**
750            * Sets the theme ID of this layout set.
751            *
752            * @param themeId the theme ID of this layout set
753            */
754            @Override
755            public void setThemeId(java.lang.String themeId) {
756                    _layoutSet.setThemeId(themeId);
757            }
758    
759            /**
760            * Sets the name of the layout set's virtual host.
761            *
762            * @param virtualHostname the name of the layout set's virtual host
763            * @see #getVirtualHostname()
764            */
765            @Override
766            public void setVirtualHostname(java.lang.String virtualHostname) {
767                    _layoutSet.setVirtualHostname(virtualHostname);
768            }
769    
770            /**
771            * Sets the wap color scheme ID of this layout set.
772            *
773            * @param wapColorSchemeId the wap color scheme ID of this layout set
774            */
775            @Override
776            public void setWapColorSchemeId(java.lang.String wapColorSchemeId) {
777                    _layoutSet.setWapColorSchemeId(wapColorSchemeId);
778            }
779    
780            /**
781            * Sets the wap theme ID of this layout set.
782            *
783            * @param wapThemeId the wap theme ID of this layout set
784            */
785            @Override
786            public void setWapThemeId(java.lang.String wapThemeId) {
787                    _layoutSet.setWapThemeId(wapThemeId);
788            }
789    
790            @Override
791            public CacheModel<com.liferay.portal.model.LayoutSet> toCacheModel() {
792                    return _layoutSet.toCacheModel();
793            }
794    
795            @Override
796            public com.liferay.portal.model.LayoutSet toEscapedModel() {
797                    return new LayoutSetWrapper(_layoutSet.toEscapedModel());
798            }
799    
800            @Override
801            public java.lang.String toString() {
802                    return _layoutSet.toString();
803            }
804    
805            @Override
806            public com.liferay.portal.model.LayoutSet toUnescapedModel() {
807                    return new LayoutSetWrapper(_layoutSet.toUnescapedModel());
808            }
809    
810            @Override
811            public java.lang.String toXmlString() {
812                    return _layoutSet.toXmlString();
813            }
814    
815            @Override
816            public boolean equals(Object obj) {
817                    if (this == obj) {
818                            return true;
819                    }
820    
821                    if (!(obj instanceof LayoutSetWrapper)) {
822                            return false;
823                    }
824    
825                    LayoutSetWrapper layoutSetWrapper = (LayoutSetWrapper)obj;
826    
827                    if (Validator.equals(_layoutSet, layoutSetWrapper._layoutSet)) {
828                            return true;
829                    }
830    
831                    return false;
832            }
833    
834            /**
835             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
836             */
837            @Deprecated
838            public LayoutSet getWrappedLayoutSet() {
839                    return _layoutSet;
840            }
841    
842            @Override
843            public LayoutSet getWrappedModel() {
844                    return _layoutSet;
845            }
846    
847            @Override
848            public boolean isEntityCacheEnabled() {
849                    return _layoutSet.isEntityCacheEnabled();
850            }
851    
852            @Override
853            public boolean isFinderCacheEnabled() {
854                    return _layoutSet.isFinderCacheEnabled();
855            }
856    
857            @Override
858            public void resetOriginalValues() {
859                    _layoutSet.resetOriginalValues();
860            }
861    
862            private final LayoutSet _layoutSet;
863    }