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