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