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 java.util.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 java.util.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 int hashCode() {
495                    return _layoutSet.hashCode();
496            }
497    
498            @Override
499            public boolean isCachedModel() {
500                    return _layoutSet.isCachedModel();
501            }
502    
503            @Override
504            public boolean isEscapedModel() {
505                    return _layoutSet.isEscapedModel();
506            }
507    
508            @Override
509            public boolean isLayoutSetPrototypeLinkActive() {
510                    return _layoutSet.isLayoutSetPrototypeLinkActive();
511            }
512    
513            /**
514            * Returns <code>true</code> if this layout set is layout set prototype link enabled.
515            *
516            * @return <code>true</code> if this layout set is layout set prototype link enabled; <code>false</code> otherwise
517            */
518            @Override
519            public boolean isLayoutSetPrototypeLinkEnabled() {
520                    return _layoutSet.isLayoutSetPrototypeLinkEnabled();
521            }
522    
523            @Override
524            public boolean isLogo() {
525                    return _layoutSet.isLogo();
526            }
527    
528            @Override
529            public boolean isNew() {
530                    return _layoutSet.isNew();
531            }
532    
533            /**
534            * Returns <code>true</code> if this layout set is private layout.
535            *
536            * @return <code>true</code> if this layout set is private layout; <code>false</code> otherwise
537            */
538            @Override
539            public boolean isPrivateLayout() {
540                    return _layoutSet.isPrivateLayout();
541            }
542    
543            @Override
544            public void persist() {
545                    _layoutSet.persist();
546            }
547    
548            @Override
549            public void setCachedModel(boolean cachedModel) {
550                    _layoutSet.setCachedModel(cachedModel);
551            }
552    
553            /**
554            * Sets the color scheme ID of this layout set.
555            *
556            * @param colorSchemeId the color scheme ID of this layout set
557            */
558            @Override
559            public void setColorSchemeId(java.lang.String colorSchemeId) {
560                    _layoutSet.setColorSchemeId(colorSchemeId);
561            }
562    
563            @Override
564            public void setCompanyFallbackVirtualHostname(
565                    java.lang.String companyFallbackVirtualHostname) {
566                    _layoutSet.setCompanyFallbackVirtualHostname(companyFallbackVirtualHostname);
567            }
568    
569            /**
570            * Sets the company ID of this layout set.
571            *
572            * @param companyId the company ID of this layout set
573            */
574            @Override
575            public void setCompanyId(long companyId) {
576                    _layoutSet.setCompanyId(companyId);
577            }
578    
579            /**
580            * Sets the create date of this layout set.
581            *
582            * @param createDate the create date of this layout set
583            */
584            @Override
585            public void setCreateDate(java.util.Date createDate) {
586                    _layoutSet.setCreateDate(createDate);
587            }
588    
589            /**
590            * Sets the css of this layout set.
591            *
592            * @param css the css of this layout set
593            */
594            @Override
595            public void setCss(java.lang.String css) {
596                    _layoutSet.setCss(css);
597            }
598    
599            @Override
600            public void setExpandoBridgeAttributes(
601                    com.liferay.portal.model.BaseModel<?> baseModel) {
602                    _layoutSet.setExpandoBridgeAttributes(baseModel);
603            }
604    
605            @Override
606            public void setExpandoBridgeAttributes(
607                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
608                    _layoutSet.setExpandoBridgeAttributes(expandoBridge);
609            }
610    
611            @Override
612            public void setExpandoBridgeAttributes(
613                    com.liferay.portal.service.ServiceContext serviceContext) {
614                    _layoutSet.setExpandoBridgeAttributes(serviceContext);
615            }
616    
617            /**
618            * Sets the group ID of this layout set.
619            *
620            * @param groupId the group ID of this layout set
621            */
622            @Override
623            public void setGroupId(long groupId) {
624                    _layoutSet.setGroupId(groupId);
625            }
626    
627            /**
628            * Sets the layout set ID of this layout set.
629            *
630            * @param layoutSetId the layout set ID of this layout set
631            */
632            @Override
633            public void setLayoutSetId(long layoutSetId) {
634                    _layoutSet.setLayoutSetId(layoutSetId);
635            }
636    
637            /**
638            * Sets whether this layout set is layout set prototype link enabled.
639            *
640            * @param layoutSetPrototypeLinkEnabled the layout set prototype link enabled of this layout set
641            */
642            @Override
643            public void setLayoutSetPrototypeLinkEnabled(
644                    boolean layoutSetPrototypeLinkEnabled) {
645                    _layoutSet.setLayoutSetPrototypeLinkEnabled(layoutSetPrototypeLinkEnabled);
646            }
647    
648            /**
649            * Sets the layout set prototype uuid of this layout set.
650            *
651            * @param layoutSetPrototypeUuid the layout set prototype uuid of this layout set
652            */
653            @Override
654            public void setLayoutSetPrototypeUuid(
655                    java.lang.String layoutSetPrototypeUuid) {
656                    _layoutSet.setLayoutSetPrototypeUuid(layoutSetPrototypeUuid);
657            }
658    
659            /**
660            * Sets the logo ID of this layout set.
661            *
662            * @param logoId the logo ID of this layout set
663            */
664            @Override
665            public void setLogoId(long logoId) {
666                    _layoutSet.setLogoId(logoId);
667            }
668    
669            /**
670            * Sets the modified date of this layout set.
671            *
672            * @param modifiedDate the modified date of this layout set
673            */
674            @Override
675            public void setModifiedDate(java.util.Date modifiedDate) {
676                    _layoutSet.setModifiedDate(modifiedDate);
677            }
678    
679            /**
680            * Sets the mvcc version of this layout set.
681            *
682            * @param mvccVersion the mvcc version of this layout set
683            */
684            @Override
685            public void setMvccVersion(long mvccVersion) {
686                    _layoutSet.setMvccVersion(mvccVersion);
687            }
688    
689            @Override
690            public void setNew(boolean n) {
691                    _layoutSet.setNew(n);
692            }
693    
694            /**
695            * Sets the page count of this layout set.
696            *
697            * @param pageCount the page count of this layout set
698            */
699            @Override
700            public void setPageCount(int pageCount) {
701                    _layoutSet.setPageCount(pageCount);
702            }
703    
704            /**
705            * Sets the primary key of this layout set.
706            *
707            * @param primaryKey the primary key of this layout set
708            */
709            @Override
710            public void setPrimaryKey(long primaryKey) {
711                    _layoutSet.setPrimaryKey(primaryKey);
712            }
713    
714            @Override
715            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
716                    _layoutSet.setPrimaryKeyObj(primaryKeyObj);
717            }
718    
719            /**
720            * Sets whether this layout set is private layout.
721            *
722            * @param privateLayout the private layout of this layout set
723            */
724            @Override
725            public void setPrivateLayout(boolean privateLayout) {
726                    _layoutSet.setPrivateLayout(privateLayout);
727            }
728    
729            /**
730            * Sets the settings of this layout set.
731            *
732            * @param settings the settings of this layout set
733            */
734            @Override
735            public void setSettings(java.lang.String settings) {
736                    _layoutSet.setSettings(settings);
737            }
738    
739            @Override
740            public void setSettingsProperties(
741                    com.liferay.portal.kernel.util.UnicodeProperties settingsProperties) {
742                    _layoutSet.setSettingsProperties(settingsProperties);
743            }
744    
745            /**
746            * Sets the theme ID of this layout set.
747            *
748            * @param themeId the theme ID of this layout set
749            */
750            @Override
751            public void setThemeId(java.lang.String themeId) {
752                    _layoutSet.setThemeId(themeId);
753            }
754    
755            /**
756            * Sets the name of the layout set's virtual host.
757            *
758            * @param virtualHostname the name of the layout set's virtual host
759            * @see #getVirtualHostname()
760            */
761            @Override
762            public void setVirtualHostname(java.lang.String virtualHostname) {
763                    _layoutSet.setVirtualHostname(virtualHostname);
764            }
765    
766            /**
767            * Sets the wap color scheme ID of this layout set.
768            *
769            * @param wapColorSchemeId the wap color scheme ID of this layout set
770            */
771            @Override
772            public void setWapColorSchemeId(java.lang.String wapColorSchemeId) {
773                    _layoutSet.setWapColorSchemeId(wapColorSchemeId);
774            }
775    
776            /**
777            * Sets the wap theme ID of this layout set.
778            *
779            * @param wapThemeId the wap theme ID of this layout set
780            */
781            @Override
782            public void setWapThemeId(java.lang.String wapThemeId) {
783                    _layoutSet.setWapThemeId(wapThemeId);
784            }
785    
786            @Override
787            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.LayoutSet> toCacheModel() {
788                    return _layoutSet.toCacheModel();
789            }
790    
791            @Override
792            public com.liferay.portal.model.LayoutSet toEscapedModel() {
793                    return new LayoutSetWrapper(_layoutSet.toEscapedModel());
794            }
795    
796            @Override
797            public java.lang.String toString() {
798                    return _layoutSet.toString();
799            }
800    
801            @Override
802            public com.liferay.portal.model.LayoutSet toUnescapedModel() {
803                    return new LayoutSetWrapper(_layoutSet.toUnescapedModel());
804            }
805    
806            @Override
807            public java.lang.String toXmlString() {
808                    return _layoutSet.toXmlString();
809            }
810    
811            @Override
812            public boolean equals(Object obj) {
813                    if (this == obj) {
814                            return true;
815                    }
816    
817                    if (!(obj instanceof LayoutSetWrapper)) {
818                            return false;
819                    }
820    
821                    LayoutSetWrapper layoutSetWrapper = (LayoutSetWrapper)obj;
822    
823                    if (Validator.equals(_layoutSet, layoutSetWrapper._layoutSet)) {
824                            return true;
825                    }
826    
827                    return false;
828            }
829    
830            /**
831             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
832             */
833            @Deprecated
834            public LayoutSet getWrappedLayoutSet() {
835                    return _layoutSet;
836            }
837    
838            @Override
839            public LayoutSet getWrappedModel() {
840                    return _layoutSet;
841            }
842    
843            @Override
844            public boolean isEntityCacheEnabled() {
845                    return _layoutSet.isEntityCacheEnabled();
846            }
847    
848            @Override
849            public boolean isFinderCacheEnabled() {
850                    return _layoutSet.isFinderCacheEnabled();
851            }
852    
853            @Override
854            public void resetOriginalValues() {
855                    _layoutSet.resetOriginalValues();
856            }
857    
858            private final LayoutSet _layoutSet;
859    }