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.impl;
016    
017    import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
018    import com.liferay.portal.kernel.json.JSON;
019    import com.liferay.portal.kernel.util.GetterUtil;
020    import com.liferay.portal.kernel.util.ProxyUtil;
021    import com.liferay.portal.kernel.util.StringBundler;
022    import com.liferay.portal.kernel.util.StringPool;
023    import com.liferay.portal.model.CacheModel;
024    import com.liferay.portal.model.LayoutSet;
025    import com.liferay.portal.model.LayoutSetModel;
026    import com.liferay.portal.model.LayoutSetSoap;
027    import com.liferay.portal.service.ServiceContext;
028    
029    import com.liferay.portlet.expando.model.ExpandoBridge;
030    import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil;
031    
032    import java.io.Serializable;
033    
034    import java.sql.Types;
035    
036    import java.util.ArrayList;
037    import java.util.Date;
038    import java.util.HashMap;
039    import java.util.List;
040    import java.util.Map;
041    
042    /**
043     * The base model implementation for the LayoutSet service. Represents a row in the "LayoutSet" database table, with each column mapped to a property of this class.
044     *
045     * <p>
046     * This implementation and its corresponding interface {@link com.liferay.portal.model.LayoutSetModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link LayoutSetImpl}.
047     * </p>
048     *
049     * @author Brian Wing Shun Chan
050     * @see LayoutSetImpl
051     * @see com.liferay.portal.model.LayoutSet
052     * @see com.liferay.portal.model.LayoutSetModel
053     * @generated
054     */
055    @JSON(strict = true)
056    public class LayoutSetModelImpl extends BaseModelImpl<LayoutSet>
057            implements LayoutSetModel {
058            /*
059             * NOTE FOR DEVELOPERS:
060             *
061             * Never modify or reference this class directly. All methods that expect a layout set model instance should use the {@link com.liferay.portal.model.LayoutSet} interface instead.
062             */
063            public static final String TABLE_NAME = "LayoutSet";
064            public static final Object[][] TABLE_COLUMNS = {
065                            { "layoutSetId", Types.BIGINT },
066                            { "groupId", Types.BIGINT },
067                            { "companyId", Types.BIGINT },
068                            { "createDate", Types.TIMESTAMP },
069                            { "modifiedDate", Types.TIMESTAMP },
070                            { "privateLayout", Types.BOOLEAN },
071                            { "logo", Types.BOOLEAN },
072                            { "logoId", Types.BIGINT },
073                            { "themeId", Types.VARCHAR },
074                            { "colorSchemeId", Types.VARCHAR },
075                            { "wapThemeId", Types.VARCHAR },
076                            { "wapColorSchemeId", Types.VARCHAR },
077                            { "css", Types.VARCHAR },
078                            { "pageCount", Types.INTEGER },
079                            { "settings_", Types.VARCHAR },
080                            { "layoutSetPrototypeUuid", Types.VARCHAR },
081                            { "layoutSetPrototypeLinkEnabled", Types.BOOLEAN }
082                    };
083            public static final String TABLE_SQL_CREATE = "create table LayoutSet (layoutSetId LONG not null primary key,groupId LONG,companyId LONG,createDate DATE null,modifiedDate DATE null,privateLayout BOOLEAN,logo BOOLEAN,logoId LONG,themeId VARCHAR(75) null,colorSchemeId VARCHAR(75) null,wapThemeId VARCHAR(75) null,wapColorSchemeId VARCHAR(75) null,css STRING null,pageCount INTEGER,settings_ STRING null,layoutSetPrototypeUuid VARCHAR(75) null,layoutSetPrototypeLinkEnabled BOOLEAN)";
084            public static final String TABLE_SQL_DROP = "drop table LayoutSet";
085            public static final String DATA_SOURCE = "liferayDataSource";
086            public static final String SESSION_FACTORY = "liferaySessionFactory";
087            public static final String TX_MANAGER = "liferayTransactionManager";
088            public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
089                                    "value.object.entity.cache.enabled.com.liferay.portal.model.LayoutSet"),
090                            true);
091            public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
092                                    "value.object.finder.cache.enabled.com.liferay.portal.model.LayoutSet"),
093                            true);
094            public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
095                                    "value.object.column.bitmask.enabled.com.liferay.portal.model.LayoutSet"),
096                            true);
097            public static long GROUPID_COLUMN_BITMASK = 1L;
098            public static long LAYOUTSETPROTOTYPEUUID_COLUMN_BITMASK = 2L;
099            public static long PRIVATELAYOUT_COLUMN_BITMASK = 4L;
100    
101            /**
102             * Converts the soap model instance into a normal model instance.
103             *
104             * @param soapModel the soap model instance to convert
105             * @return the normal model instance
106             */
107            public static LayoutSet toModel(LayoutSetSoap soapModel) {
108                    if (soapModel == null) {
109                            return null;
110                    }
111    
112                    LayoutSet model = new LayoutSetImpl();
113    
114                    model.setLayoutSetId(soapModel.getLayoutSetId());
115                    model.setGroupId(soapModel.getGroupId());
116                    model.setCompanyId(soapModel.getCompanyId());
117                    model.setCreateDate(soapModel.getCreateDate());
118                    model.setModifiedDate(soapModel.getModifiedDate());
119                    model.setPrivateLayout(soapModel.getPrivateLayout());
120                    model.setLogo(soapModel.getLogo());
121                    model.setLogoId(soapModel.getLogoId());
122                    model.setThemeId(soapModel.getThemeId());
123                    model.setColorSchemeId(soapModel.getColorSchemeId());
124                    model.setWapThemeId(soapModel.getWapThemeId());
125                    model.setWapColorSchemeId(soapModel.getWapColorSchemeId());
126                    model.setCss(soapModel.getCss());
127                    model.setPageCount(soapModel.getPageCount());
128                    model.setSettings(soapModel.getSettings());
129                    model.setLayoutSetPrototypeUuid(soapModel.getLayoutSetPrototypeUuid());
130                    model.setLayoutSetPrototypeLinkEnabled(soapModel.getLayoutSetPrototypeLinkEnabled());
131    
132                    return model;
133            }
134    
135            /**
136             * Converts the soap model instances into normal model instances.
137             *
138             * @param soapModels the soap model instances to convert
139             * @return the normal model instances
140             */
141            public static List<LayoutSet> toModels(LayoutSetSoap[] soapModels) {
142                    if (soapModels == null) {
143                            return null;
144                    }
145    
146                    List<LayoutSet> models = new ArrayList<LayoutSet>(soapModels.length);
147    
148                    for (LayoutSetSoap soapModel : soapModels) {
149                            models.add(toModel(soapModel));
150                    }
151    
152                    return models;
153            }
154    
155            public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.portal.util.PropsUtil.get(
156                                    "lock.expiration.time.com.liferay.portal.model.LayoutSet"));
157    
158            public LayoutSetModelImpl() {
159            }
160    
161            public long getPrimaryKey() {
162                    return _layoutSetId;
163            }
164    
165            public void setPrimaryKey(long primaryKey) {
166                    setLayoutSetId(primaryKey);
167            }
168    
169            public Serializable getPrimaryKeyObj() {
170                    return new Long(_layoutSetId);
171            }
172    
173            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
174                    setPrimaryKey(((Long)primaryKeyObj).longValue());
175            }
176    
177            public Class<?> getModelClass() {
178                    return LayoutSet.class;
179            }
180    
181            public String getModelClassName() {
182                    return LayoutSet.class.getName();
183            }
184    
185            @Override
186            public Map<String, Object> getModelAttributes() {
187                    Map<String, Object> attributes = new HashMap<String, Object>();
188    
189                    attributes.put("layoutSetId", getLayoutSetId());
190                    attributes.put("groupId", getGroupId());
191                    attributes.put("companyId", getCompanyId());
192                    attributes.put("createDate", getCreateDate());
193                    attributes.put("modifiedDate", getModifiedDate());
194                    attributes.put("privateLayout", getPrivateLayout());
195                    attributes.put("logo", getLogo());
196                    attributes.put("logoId", getLogoId());
197                    attributes.put("themeId", getThemeId());
198                    attributes.put("colorSchemeId", getColorSchemeId());
199                    attributes.put("wapThemeId", getWapThemeId());
200                    attributes.put("wapColorSchemeId", getWapColorSchemeId());
201                    attributes.put("css", getCss());
202                    attributes.put("pageCount", getPageCount());
203                    attributes.put("settings", getSettings());
204                    attributes.put("layoutSetPrototypeUuid", getLayoutSetPrototypeUuid());
205                    attributes.put("layoutSetPrototypeLinkEnabled",
206                            getLayoutSetPrototypeLinkEnabled());
207    
208                    return attributes;
209            }
210    
211            @Override
212            public void setModelAttributes(Map<String, Object> attributes) {
213                    Long layoutSetId = (Long)attributes.get("layoutSetId");
214    
215                    if (layoutSetId != null) {
216                            setLayoutSetId(layoutSetId);
217                    }
218    
219                    Long groupId = (Long)attributes.get("groupId");
220    
221                    if (groupId != null) {
222                            setGroupId(groupId);
223                    }
224    
225                    Long companyId = (Long)attributes.get("companyId");
226    
227                    if (companyId != null) {
228                            setCompanyId(companyId);
229                    }
230    
231                    Date createDate = (Date)attributes.get("createDate");
232    
233                    if (createDate != null) {
234                            setCreateDate(createDate);
235                    }
236    
237                    Date modifiedDate = (Date)attributes.get("modifiedDate");
238    
239                    if (modifiedDate != null) {
240                            setModifiedDate(modifiedDate);
241                    }
242    
243                    Boolean privateLayout = (Boolean)attributes.get("privateLayout");
244    
245                    if (privateLayout != null) {
246                            setPrivateLayout(privateLayout);
247                    }
248    
249                    Boolean logo = (Boolean)attributes.get("logo");
250    
251                    if (logo != null) {
252                            setLogo(logo);
253                    }
254    
255                    Long logoId = (Long)attributes.get("logoId");
256    
257                    if (logoId != null) {
258                            setLogoId(logoId);
259                    }
260    
261                    String themeId = (String)attributes.get("themeId");
262    
263                    if (themeId != null) {
264                            setThemeId(themeId);
265                    }
266    
267                    String colorSchemeId = (String)attributes.get("colorSchemeId");
268    
269                    if (colorSchemeId != null) {
270                            setColorSchemeId(colorSchemeId);
271                    }
272    
273                    String wapThemeId = (String)attributes.get("wapThemeId");
274    
275                    if (wapThemeId != null) {
276                            setWapThemeId(wapThemeId);
277                    }
278    
279                    String wapColorSchemeId = (String)attributes.get("wapColorSchemeId");
280    
281                    if (wapColorSchemeId != null) {
282                            setWapColorSchemeId(wapColorSchemeId);
283                    }
284    
285                    String css = (String)attributes.get("css");
286    
287                    if (css != null) {
288                            setCss(css);
289                    }
290    
291                    Integer pageCount = (Integer)attributes.get("pageCount");
292    
293                    if (pageCount != null) {
294                            setPageCount(pageCount);
295                    }
296    
297                    String settings = (String)attributes.get("settings");
298    
299                    if (settings != null) {
300                            setSettings(settings);
301                    }
302    
303                    String layoutSetPrototypeUuid = (String)attributes.get(
304                                    "layoutSetPrototypeUuid");
305    
306                    if (layoutSetPrototypeUuid != null) {
307                            setLayoutSetPrototypeUuid(layoutSetPrototypeUuid);
308                    }
309    
310                    Boolean layoutSetPrototypeLinkEnabled = (Boolean)attributes.get(
311                                    "layoutSetPrototypeLinkEnabled");
312    
313                    if (layoutSetPrototypeLinkEnabled != null) {
314                            setLayoutSetPrototypeLinkEnabled(layoutSetPrototypeLinkEnabled);
315                    }
316            }
317    
318            @JSON
319            public long getLayoutSetId() {
320                    return _layoutSetId;
321            }
322    
323            public void setLayoutSetId(long layoutSetId) {
324                    _layoutSetId = layoutSetId;
325            }
326    
327            @JSON
328            public long getGroupId() {
329                    return _groupId;
330            }
331    
332            public void setGroupId(long groupId) {
333                    _columnBitmask |= GROUPID_COLUMN_BITMASK;
334    
335                    if (!_setOriginalGroupId) {
336                            _setOriginalGroupId = true;
337    
338                            _originalGroupId = _groupId;
339                    }
340    
341                    _groupId = groupId;
342            }
343    
344            public long getOriginalGroupId() {
345                    return _originalGroupId;
346            }
347    
348            @JSON
349            public long getCompanyId() {
350                    return _companyId;
351            }
352    
353            public void setCompanyId(long companyId) {
354                    _companyId = companyId;
355            }
356    
357            @JSON
358            public Date getCreateDate() {
359                    return _createDate;
360            }
361    
362            public void setCreateDate(Date createDate) {
363                    _createDate = createDate;
364            }
365    
366            @JSON
367            public Date getModifiedDate() {
368                    return _modifiedDate;
369            }
370    
371            public void setModifiedDate(Date modifiedDate) {
372                    _modifiedDate = modifiedDate;
373            }
374    
375            @JSON
376            public boolean getPrivateLayout() {
377                    return _privateLayout;
378            }
379    
380            public boolean isPrivateLayout() {
381                    return _privateLayout;
382            }
383    
384            public void setPrivateLayout(boolean privateLayout) {
385                    _columnBitmask |= PRIVATELAYOUT_COLUMN_BITMASK;
386    
387                    if (!_setOriginalPrivateLayout) {
388                            _setOriginalPrivateLayout = true;
389    
390                            _originalPrivateLayout = _privateLayout;
391                    }
392    
393                    _privateLayout = privateLayout;
394            }
395    
396            public boolean getOriginalPrivateLayout() {
397                    return _originalPrivateLayout;
398            }
399    
400            @JSON
401            public boolean getLogo() {
402                    return _logo;
403            }
404    
405            public boolean isLogo() {
406                    return _logo;
407            }
408    
409            public void setLogo(boolean logo) {
410                    _logo = logo;
411            }
412    
413            @JSON
414            public long getLogoId() {
415                    return _logoId;
416            }
417    
418            public void setLogoId(long logoId) {
419                    _logoId = logoId;
420            }
421    
422            @JSON
423            public String getThemeId() {
424                    if (_themeId == null) {
425                            return StringPool.BLANK;
426                    }
427                    else {
428                            return _themeId;
429                    }
430            }
431    
432            public void setThemeId(String themeId) {
433                    _themeId = themeId;
434            }
435    
436            @JSON
437            public String getColorSchemeId() {
438                    if (_colorSchemeId == null) {
439                            return StringPool.BLANK;
440                    }
441                    else {
442                            return _colorSchemeId;
443                    }
444            }
445    
446            public void setColorSchemeId(String colorSchemeId) {
447                    _colorSchemeId = colorSchemeId;
448            }
449    
450            @JSON
451            public String getWapThemeId() {
452                    if (_wapThemeId == null) {
453                            return StringPool.BLANK;
454                    }
455                    else {
456                            return _wapThemeId;
457                    }
458            }
459    
460            public void setWapThemeId(String wapThemeId) {
461                    _wapThemeId = wapThemeId;
462            }
463    
464            @JSON
465            public String getWapColorSchemeId() {
466                    if (_wapColorSchemeId == null) {
467                            return StringPool.BLANK;
468                    }
469                    else {
470                            return _wapColorSchemeId;
471                    }
472            }
473    
474            public void setWapColorSchemeId(String wapColorSchemeId) {
475                    _wapColorSchemeId = wapColorSchemeId;
476            }
477    
478            @JSON
479            public String getCss() {
480                    if (_css == null) {
481                            return StringPool.BLANK;
482                    }
483                    else {
484                            return _css;
485                    }
486            }
487    
488            public void setCss(String css) {
489                    _css = css;
490            }
491    
492            @JSON
493            public int getPageCount() {
494                    return _pageCount;
495            }
496    
497            public void setPageCount(int pageCount) {
498                    _pageCount = pageCount;
499            }
500    
501            @JSON
502            public String getSettings() {
503                    if (_settings == null) {
504                            return StringPool.BLANK;
505                    }
506                    else {
507                            return _settings;
508                    }
509            }
510    
511            public void setSettings(String settings) {
512                    _settings = settings;
513            }
514    
515            @JSON
516            public String getLayoutSetPrototypeUuid() {
517                    if (_layoutSetPrototypeUuid == null) {
518                            return StringPool.BLANK;
519                    }
520                    else {
521                            return _layoutSetPrototypeUuid;
522                    }
523            }
524    
525            public void setLayoutSetPrototypeUuid(String layoutSetPrototypeUuid) {
526                    _columnBitmask |= LAYOUTSETPROTOTYPEUUID_COLUMN_BITMASK;
527    
528                    if (_originalLayoutSetPrototypeUuid == null) {
529                            _originalLayoutSetPrototypeUuid = _layoutSetPrototypeUuid;
530                    }
531    
532                    _layoutSetPrototypeUuid = layoutSetPrototypeUuid;
533            }
534    
535            public String getOriginalLayoutSetPrototypeUuid() {
536                    return GetterUtil.getString(_originalLayoutSetPrototypeUuid);
537            }
538    
539            @JSON
540            public boolean getLayoutSetPrototypeLinkEnabled() {
541                    return _layoutSetPrototypeLinkEnabled;
542            }
543    
544            public boolean isLayoutSetPrototypeLinkEnabled() {
545                    return _layoutSetPrototypeLinkEnabled;
546            }
547    
548            public void setLayoutSetPrototypeLinkEnabled(
549                    boolean layoutSetPrototypeLinkEnabled) {
550                    _layoutSetPrototypeLinkEnabled = layoutSetPrototypeLinkEnabled;
551            }
552    
553            public long getColumnBitmask() {
554                    return _columnBitmask;
555            }
556    
557            @Override
558            public ExpandoBridge getExpandoBridge() {
559                    return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(),
560                            LayoutSet.class.getName(), getPrimaryKey());
561            }
562    
563            @Override
564            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
565                    ExpandoBridge expandoBridge = getExpandoBridge();
566    
567                    expandoBridge.setAttributes(serviceContext);
568            }
569    
570            @Override
571            public LayoutSet toEscapedModel() {
572                    if (_escapedModel == null) {
573                            _escapedModel = (LayoutSet)ProxyUtil.newProxyInstance(_classLoader,
574                                            _escapedModelInterfaces, new AutoEscapeBeanHandler(this));
575                    }
576    
577                    return _escapedModel;
578            }
579    
580            public LayoutSet toUnescapedModel() {
581                    return (LayoutSet)this;
582            }
583    
584            @Override
585            public Object clone() {
586                    LayoutSetImpl layoutSetImpl = new LayoutSetImpl();
587    
588                    layoutSetImpl.setLayoutSetId(getLayoutSetId());
589                    layoutSetImpl.setGroupId(getGroupId());
590                    layoutSetImpl.setCompanyId(getCompanyId());
591                    layoutSetImpl.setCreateDate(getCreateDate());
592                    layoutSetImpl.setModifiedDate(getModifiedDate());
593                    layoutSetImpl.setPrivateLayout(getPrivateLayout());
594                    layoutSetImpl.setLogo(getLogo());
595                    layoutSetImpl.setLogoId(getLogoId());
596                    layoutSetImpl.setThemeId(getThemeId());
597                    layoutSetImpl.setColorSchemeId(getColorSchemeId());
598                    layoutSetImpl.setWapThemeId(getWapThemeId());
599                    layoutSetImpl.setWapColorSchemeId(getWapColorSchemeId());
600                    layoutSetImpl.setCss(getCss());
601                    layoutSetImpl.setPageCount(getPageCount());
602                    layoutSetImpl.setSettings(getSettings());
603                    layoutSetImpl.setLayoutSetPrototypeUuid(getLayoutSetPrototypeUuid());
604                    layoutSetImpl.setLayoutSetPrototypeLinkEnabled(getLayoutSetPrototypeLinkEnabled());
605    
606                    layoutSetImpl.resetOriginalValues();
607    
608                    return layoutSetImpl;
609            }
610    
611            public int compareTo(LayoutSet layoutSet) {
612                    long primaryKey = layoutSet.getPrimaryKey();
613    
614                    if (getPrimaryKey() < primaryKey) {
615                            return -1;
616                    }
617                    else if (getPrimaryKey() > primaryKey) {
618                            return 1;
619                    }
620                    else {
621                            return 0;
622                    }
623            }
624    
625            @Override
626            public boolean equals(Object obj) {
627                    if (this == obj) {
628                            return true;
629                    }
630    
631                    if (!(obj instanceof LayoutSet)) {
632                            return false;
633                    }
634    
635                    LayoutSet layoutSet = (LayoutSet)obj;
636    
637                    long primaryKey = layoutSet.getPrimaryKey();
638    
639                    if (getPrimaryKey() == primaryKey) {
640                            return true;
641                    }
642                    else {
643                            return false;
644                    }
645            }
646    
647            @Override
648            public int hashCode() {
649                    return (int)getPrimaryKey();
650            }
651    
652            @Override
653            public void resetOriginalValues() {
654                    LayoutSetModelImpl layoutSetModelImpl = this;
655    
656                    layoutSetModelImpl._originalGroupId = layoutSetModelImpl._groupId;
657    
658                    layoutSetModelImpl._setOriginalGroupId = false;
659    
660                    layoutSetModelImpl._originalPrivateLayout = layoutSetModelImpl._privateLayout;
661    
662                    layoutSetModelImpl._setOriginalPrivateLayout = false;
663    
664                    layoutSetModelImpl._originalLayoutSetPrototypeUuid = layoutSetModelImpl._layoutSetPrototypeUuid;
665    
666                    layoutSetModelImpl._columnBitmask = 0;
667            }
668    
669            @Override
670            public CacheModel<LayoutSet> toCacheModel() {
671                    LayoutSetCacheModel layoutSetCacheModel = new LayoutSetCacheModel();
672    
673                    layoutSetCacheModel.layoutSetId = getLayoutSetId();
674    
675                    layoutSetCacheModel.groupId = getGroupId();
676    
677                    layoutSetCacheModel.companyId = getCompanyId();
678    
679                    Date createDate = getCreateDate();
680    
681                    if (createDate != null) {
682                            layoutSetCacheModel.createDate = createDate.getTime();
683                    }
684                    else {
685                            layoutSetCacheModel.createDate = Long.MIN_VALUE;
686                    }
687    
688                    Date modifiedDate = getModifiedDate();
689    
690                    if (modifiedDate != null) {
691                            layoutSetCacheModel.modifiedDate = modifiedDate.getTime();
692                    }
693                    else {
694                            layoutSetCacheModel.modifiedDate = Long.MIN_VALUE;
695                    }
696    
697                    layoutSetCacheModel.privateLayout = getPrivateLayout();
698    
699                    layoutSetCacheModel.logo = getLogo();
700    
701                    layoutSetCacheModel.logoId = getLogoId();
702    
703                    layoutSetCacheModel.themeId = getThemeId();
704    
705                    String themeId = layoutSetCacheModel.themeId;
706    
707                    if ((themeId != null) && (themeId.length() == 0)) {
708                            layoutSetCacheModel.themeId = null;
709                    }
710    
711                    layoutSetCacheModel.colorSchemeId = getColorSchemeId();
712    
713                    String colorSchemeId = layoutSetCacheModel.colorSchemeId;
714    
715                    if ((colorSchemeId != null) && (colorSchemeId.length() == 0)) {
716                            layoutSetCacheModel.colorSchemeId = null;
717                    }
718    
719                    layoutSetCacheModel.wapThemeId = getWapThemeId();
720    
721                    String wapThemeId = layoutSetCacheModel.wapThemeId;
722    
723                    if ((wapThemeId != null) && (wapThemeId.length() == 0)) {
724                            layoutSetCacheModel.wapThemeId = null;
725                    }
726    
727                    layoutSetCacheModel.wapColorSchemeId = getWapColorSchemeId();
728    
729                    String wapColorSchemeId = layoutSetCacheModel.wapColorSchemeId;
730    
731                    if ((wapColorSchemeId != null) && (wapColorSchemeId.length() == 0)) {
732                            layoutSetCacheModel.wapColorSchemeId = null;
733                    }
734    
735                    layoutSetCacheModel.css = getCss();
736    
737                    String css = layoutSetCacheModel.css;
738    
739                    if ((css != null) && (css.length() == 0)) {
740                            layoutSetCacheModel.css = null;
741                    }
742    
743                    layoutSetCacheModel.pageCount = getPageCount();
744    
745                    layoutSetCacheModel.settings = getSettings();
746    
747                    String settings = layoutSetCacheModel.settings;
748    
749                    if ((settings != null) && (settings.length() == 0)) {
750                            layoutSetCacheModel.settings = null;
751                    }
752    
753                    layoutSetCacheModel.layoutSetPrototypeUuid = getLayoutSetPrototypeUuid();
754    
755                    String layoutSetPrototypeUuid = layoutSetCacheModel.layoutSetPrototypeUuid;
756    
757                    if ((layoutSetPrototypeUuid != null) &&
758                                    (layoutSetPrototypeUuid.length() == 0)) {
759                            layoutSetCacheModel.layoutSetPrototypeUuid = null;
760                    }
761    
762                    layoutSetCacheModel.layoutSetPrototypeLinkEnabled = getLayoutSetPrototypeLinkEnabled();
763    
764                    return layoutSetCacheModel;
765            }
766    
767            @Override
768            public String toString() {
769                    StringBundler sb = new StringBundler(35);
770    
771                    sb.append("{layoutSetId=");
772                    sb.append(getLayoutSetId());
773                    sb.append(", groupId=");
774                    sb.append(getGroupId());
775                    sb.append(", companyId=");
776                    sb.append(getCompanyId());
777                    sb.append(", createDate=");
778                    sb.append(getCreateDate());
779                    sb.append(", modifiedDate=");
780                    sb.append(getModifiedDate());
781                    sb.append(", privateLayout=");
782                    sb.append(getPrivateLayout());
783                    sb.append(", logo=");
784                    sb.append(getLogo());
785                    sb.append(", logoId=");
786                    sb.append(getLogoId());
787                    sb.append(", themeId=");
788                    sb.append(getThemeId());
789                    sb.append(", colorSchemeId=");
790                    sb.append(getColorSchemeId());
791                    sb.append(", wapThemeId=");
792                    sb.append(getWapThemeId());
793                    sb.append(", wapColorSchemeId=");
794                    sb.append(getWapColorSchemeId());
795                    sb.append(", css=");
796                    sb.append(getCss());
797                    sb.append(", pageCount=");
798                    sb.append(getPageCount());
799                    sb.append(", settings=");
800                    sb.append(getSettings());
801                    sb.append(", layoutSetPrototypeUuid=");
802                    sb.append(getLayoutSetPrototypeUuid());
803                    sb.append(", layoutSetPrototypeLinkEnabled=");
804                    sb.append(getLayoutSetPrototypeLinkEnabled());
805                    sb.append("}");
806    
807                    return sb.toString();
808            }
809    
810            public String toXmlString() {
811                    StringBundler sb = new StringBundler(55);
812    
813                    sb.append("<model><model-name>");
814                    sb.append("com.liferay.portal.model.LayoutSet");
815                    sb.append("</model-name>");
816    
817                    sb.append(
818                            "<column><column-name>layoutSetId</column-name><column-value><![CDATA[");
819                    sb.append(getLayoutSetId());
820                    sb.append("]]></column-value></column>");
821                    sb.append(
822                            "<column><column-name>groupId</column-name><column-value><![CDATA[");
823                    sb.append(getGroupId());
824                    sb.append("]]></column-value></column>");
825                    sb.append(
826                            "<column><column-name>companyId</column-name><column-value><![CDATA[");
827                    sb.append(getCompanyId());
828                    sb.append("]]></column-value></column>");
829                    sb.append(
830                            "<column><column-name>createDate</column-name><column-value><![CDATA[");
831                    sb.append(getCreateDate());
832                    sb.append("]]></column-value></column>");
833                    sb.append(
834                            "<column><column-name>modifiedDate</column-name><column-value><![CDATA[");
835                    sb.append(getModifiedDate());
836                    sb.append("]]></column-value></column>");
837                    sb.append(
838                            "<column><column-name>privateLayout</column-name><column-value><![CDATA[");
839                    sb.append(getPrivateLayout());
840                    sb.append("]]></column-value></column>");
841                    sb.append(
842                            "<column><column-name>logo</column-name><column-value><![CDATA[");
843                    sb.append(getLogo());
844                    sb.append("]]></column-value></column>");
845                    sb.append(
846                            "<column><column-name>logoId</column-name><column-value><![CDATA[");
847                    sb.append(getLogoId());
848                    sb.append("]]></column-value></column>");
849                    sb.append(
850                            "<column><column-name>themeId</column-name><column-value><![CDATA[");
851                    sb.append(getThemeId());
852                    sb.append("]]></column-value></column>");
853                    sb.append(
854                            "<column><column-name>colorSchemeId</column-name><column-value><![CDATA[");
855                    sb.append(getColorSchemeId());
856                    sb.append("]]></column-value></column>");
857                    sb.append(
858                            "<column><column-name>wapThemeId</column-name><column-value><![CDATA[");
859                    sb.append(getWapThemeId());
860                    sb.append("]]></column-value></column>");
861                    sb.append(
862                            "<column><column-name>wapColorSchemeId</column-name><column-value><![CDATA[");
863                    sb.append(getWapColorSchemeId());
864                    sb.append("]]></column-value></column>");
865                    sb.append(
866                            "<column><column-name>css</column-name><column-value><![CDATA[");
867                    sb.append(getCss());
868                    sb.append("]]></column-value></column>");
869                    sb.append(
870                            "<column><column-name>pageCount</column-name><column-value><![CDATA[");
871                    sb.append(getPageCount());
872                    sb.append("]]></column-value></column>");
873                    sb.append(
874                            "<column><column-name>settings</column-name><column-value><![CDATA[");
875                    sb.append(getSettings());
876                    sb.append("]]></column-value></column>");
877                    sb.append(
878                            "<column><column-name>layoutSetPrototypeUuid</column-name><column-value><![CDATA[");
879                    sb.append(getLayoutSetPrototypeUuid());
880                    sb.append("]]></column-value></column>");
881                    sb.append(
882                            "<column><column-name>layoutSetPrototypeLinkEnabled</column-name><column-value><![CDATA[");
883                    sb.append(getLayoutSetPrototypeLinkEnabled());
884                    sb.append("]]></column-value></column>");
885    
886                    sb.append("</model>");
887    
888                    return sb.toString();
889            }
890    
891            private static ClassLoader _classLoader = LayoutSet.class.getClassLoader();
892            private static Class<?>[] _escapedModelInterfaces = new Class[] {
893                            LayoutSet.class
894                    };
895            private long _layoutSetId;
896            private long _groupId;
897            private long _originalGroupId;
898            private boolean _setOriginalGroupId;
899            private long _companyId;
900            private Date _createDate;
901            private Date _modifiedDate;
902            private boolean _privateLayout;
903            private boolean _originalPrivateLayout;
904            private boolean _setOriginalPrivateLayout;
905            private boolean _logo;
906            private long _logoId;
907            private String _themeId;
908            private String _colorSchemeId;
909            private String _wapThemeId;
910            private String _wapColorSchemeId;
911            private String _css;
912            private int _pageCount;
913            private String _settings;
914            private String _layoutSetPrototypeUuid;
915            private String _originalLayoutSetPrototypeUuid;
916            private boolean _layoutSetPrototypeLinkEnabled;
917            private long _columnBitmask;
918            private LayoutSet _escapedModel;
919    }