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