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