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            */
264            @Override
265            public com.liferay.portal.model.Group getGroup()
266                    throws com.liferay.portal.kernel.exception.PortalException {
267                    return _layoutSet.getGroup();
268            }
269    
270            /**
271            * Returns the group ID of this layout set.
272            *
273            * @return the group ID of this layout set
274            */
275            @Override
276            public long getGroupId() {
277                    return _layoutSet.getGroupId();
278            }
279    
280            /**
281            * Returns the layout set ID of this layout set.
282            *
283            * @return the layout set ID of this layout set
284            */
285            @Override
286            public long getLayoutSetId() {
287                    return _layoutSet.getLayoutSetId();
288            }
289    
290            /**
291            * Returns the layout set prototype's ID, or <code>0</code> if it has no
292            * layout set prototype.
293            *
294            * <p>
295            * Prototype is Liferay's technical name for a site template.
296            * </p>
297            *
298            * @return the layout set prototype's ID, or <code>0</code> if it has no
299            layout set prototype
300            */
301            @Override
302            public long getLayoutSetPrototypeId()
303                    throws com.liferay.portal.kernel.exception.PortalException {
304                    return _layoutSet.getLayoutSetPrototypeId();
305            }
306    
307            /**
308            * Returns the layout set prototype link enabled of this layout set.
309            *
310            * @return the layout set prototype link enabled of this layout set
311            */
312            @Override
313            public boolean getLayoutSetPrototypeLinkEnabled() {
314                    return _layoutSet.getLayoutSetPrototypeLinkEnabled();
315            }
316    
317            /**
318            * Returns the layout set prototype uuid of this layout set.
319            *
320            * @return the layout set prototype uuid of this layout set
321            */
322            @Override
323            public java.lang.String getLayoutSetPrototypeUuid() {
324                    return _layoutSet.getLayoutSetPrototypeUuid();
325            }
326    
327            @Override
328            public long getLiveLogoId() {
329                    return _layoutSet.getLiveLogoId();
330            }
331    
332            @Override
333            public boolean getLogo() {
334                    return _layoutSet.getLogo();
335            }
336    
337            /**
338            * Returns the logo ID of this layout set.
339            *
340            * @return the logo ID of this layout set
341            */
342            @Override
343            public long getLogoId() {
344                    return _layoutSet.getLogoId();
345            }
346    
347            /**
348            * Returns the modified date of this layout set.
349            *
350            * @return the modified date of this layout set
351            */
352            @Override
353            public Date getModifiedDate() {
354                    return _layoutSet.getModifiedDate();
355            }
356    
357            /**
358            * Returns the mvcc version of this layout set.
359            *
360            * @return the mvcc version of this layout set
361            */
362            @Override
363            public long getMvccVersion() {
364                    return _layoutSet.getMvccVersion();
365            }
366    
367            /**
368            * Returns the page count of this layout set.
369            *
370            * @return the page count of this layout set
371            */
372            @Override
373            public int getPageCount() {
374                    return _layoutSet.getPageCount();
375            }
376    
377            /**
378            * Returns the primary key of this layout set.
379            *
380            * @return the primary key of this layout set
381            */
382            @Override
383            public long getPrimaryKey() {
384                    return _layoutSet.getPrimaryKey();
385            }
386    
387            @Override
388            public java.io.Serializable getPrimaryKeyObj() {
389                    return _layoutSet.getPrimaryKeyObj();
390            }
391    
392            /**
393            * Returns the private layout of this layout set.
394            *
395            * @return the private layout of this layout set
396            */
397            @Override
398            public boolean getPrivateLayout() {
399                    return _layoutSet.getPrivateLayout();
400            }
401    
402            /**
403            * Returns the settings of this layout set.
404            *
405            * @return the settings of this layout set
406            */
407            @Override
408            public java.lang.String getSettings() {
409                    return _layoutSet.getSettings();
410            }
411    
412            @Override
413            public com.liferay.portal.kernel.util.UnicodeProperties getSettingsProperties() {
414                    return _layoutSet.getSettingsProperties();
415            }
416    
417            @Override
418            public java.lang.String getSettingsProperty(java.lang.String key) {
419                    return _layoutSet.getSettingsProperty(key);
420            }
421    
422            @Override
423            public com.liferay.portal.model.Theme getTheme() {
424                    return _layoutSet.getTheme();
425            }
426    
427            /**
428            * Returns the theme ID of this layout set.
429            *
430            * @return the theme ID of this layout set
431            */
432            @Override
433            public java.lang.String getThemeId() {
434                    return _layoutSet.getThemeId();
435            }
436    
437            @Override
438            public java.lang.String getThemeSetting(java.lang.String key,
439                    java.lang.String device) {
440                    return _layoutSet.getThemeSetting(key, device);
441            }
442    
443            /**
444            * Returns the name of the layout set's virtual host.
445            *
446            * <p>
447            * When accessing a layout set that has a the virtual host, the URL elements
448            * "/web/sitename" or "/group/sitename" can be omitted.
449            * </p>
450            *
451            * @return the layout set's virtual host name, or an empty string if the
452            layout set has no virtual host configured
453            */
454            @Override
455            public java.lang.String getVirtualHostname() {
456                    return _layoutSet.getVirtualHostname();
457            }
458    
459            @Override
460            public com.liferay.portal.model.ColorScheme getWapColorScheme() {
461                    return _layoutSet.getWapColorScheme();
462            }
463    
464            /**
465            * Returns the wap color scheme ID of this layout set.
466            *
467            * @return the wap color scheme ID of this layout set
468            */
469            @Override
470            public java.lang.String getWapColorSchemeId() {
471                    return _layoutSet.getWapColorSchemeId();
472            }
473    
474            @Override
475            public com.liferay.portal.model.Theme getWapTheme() {
476                    return _layoutSet.getWapTheme();
477            }
478    
479            /**
480            * Returns the wap theme ID of this layout set.
481            *
482            * @return the wap theme ID of this layout set
483            */
484            @Override
485            public java.lang.String getWapThemeId() {
486                    return _layoutSet.getWapThemeId();
487            }
488    
489            @Override
490            public boolean hasSetModifiedDate() {
491                    return _layoutSet.hasSetModifiedDate();
492            }
493    
494            @Override
495            public int hashCode() {
496                    return _layoutSet.hashCode();
497            }
498    
499            @Override
500            public boolean isCachedModel() {
501                    return _layoutSet.isCachedModel();
502            }
503    
504            @Override
505            public boolean isEscapedModel() {
506                    return _layoutSet.isEscapedModel();
507            }
508    
509            @Override
510            public boolean isLayoutSetPrototypeLinkActive() {
511                    return _layoutSet.isLayoutSetPrototypeLinkActive();
512            }
513    
514            /**
515            * Returns <code>true</code> if this layout set is layout set prototype link enabled.
516            *
517            * @return <code>true</code> if this layout set is layout set prototype link enabled; <code>false</code> otherwise
518            */
519            @Override
520            public boolean isLayoutSetPrototypeLinkEnabled() {
521                    return _layoutSet.isLayoutSetPrototypeLinkEnabled();
522            }
523    
524            @Override
525            public boolean isLogo() {
526                    return _layoutSet.isLogo();
527            }
528    
529            @Override
530            public boolean isNew() {
531                    return _layoutSet.isNew();
532            }
533    
534            /**
535            * Returns <code>true</code> if this layout set is private layout.
536            *
537            * @return <code>true</code> if this layout set is private layout; <code>false</code> otherwise
538            */
539            @Override
540            public boolean isPrivateLayout() {
541                    return _layoutSet.isPrivateLayout();
542            }
543    
544            @Override
545            public void persist() {
546                    _layoutSet.persist();
547            }
548    
549            @Override
550            public void setCachedModel(boolean cachedModel) {
551                    _layoutSet.setCachedModel(cachedModel);
552            }
553    
554            /**
555            * Sets the color scheme ID of this layout set.
556            *
557            * @param colorSchemeId the color scheme ID of this layout set
558            */
559            @Override
560            public void setColorSchemeId(java.lang.String colorSchemeId) {
561                    _layoutSet.setColorSchemeId(colorSchemeId);
562            }
563    
564            @Override
565            public void setCompanyFallbackVirtualHostname(
566                    java.lang.String companyFallbackVirtualHostname) {
567                    _layoutSet.setCompanyFallbackVirtualHostname(companyFallbackVirtualHostname);
568            }
569    
570            /**
571            * Sets the company ID of this layout set.
572            *
573            * @param companyId the company ID of this layout set
574            */
575            @Override
576            public void setCompanyId(long companyId) {
577                    _layoutSet.setCompanyId(companyId);
578            }
579    
580            /**
581            * Sets the create date of this layout set.
582            *
583            * @param createDate the create date of this layout set
584            */
585            @Override
586            public void setCreateDate(Date createDate) {
587                    _layoutSet.setCreateDate(createDate);
588            }
589    
590            /**
591            * Sets the css of this layout set.
592            *
593            * @param css the css of this layout set
594            */
595            @Override
596            public void setCss(java.lang.String css) {
597                    _layoutSet.setCss(css);
598            }
599    
600            @Override
601            public void setExpandoBridgeAttributes(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(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 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            @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    }