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.LocaleException;
018    import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.json.JSON;
021    import com.liferay.portal.kernel.util.GetterUtil;
022    import com.liferay.portal.kernel.util.LocaleUtil;
023    import com.liferay.portal.kernel.util.LocalizationUtil;
024    import com.liferay.portal.kernel.util.ProxyUtil;
025    import com.liferay.portal.kernel.util.StringBundler;
026    import com.liferay.portal.kernel.util.StringPool;
027    import com.liferay.portal.kernel.util.Validator;
028    import com.liferay.portal.model.CacheModel;
029    import com.liferay.portal.model.LayoutSetPrototype;
030    import com.liferay.portal.model.LayoutSetPrototypeModel;
031    import com.liferay.portal.model.LayoutSetPrototypeSoap;
032    import com.liferay.portal.service.ServiceContext;
033    import com.liferay.portal.util.PortalUtil;
034    
035    import com.liferay.portlet.expando.model.ExpandoBridge;
036    import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil;
037    
038    import java.io.Serializable;
039    
040    import java.sql.Types;
041    
042    import java.util.ArrayList;
043    import java.util.Date;
044    import java.util.HashMap;
045    import java.util.List;
046    import java.util.Locale;
047    import java.util.Map;
048    
049    /**
050     * The base model implementation for the LayoutSetPrototype service. Represents a row in the "LayoutSetPrototype" database table, with each column mapped to a property of this class.
051     *
052     * <p>
053     * This implementation and its corresponding interface {@link com.liferay.portal.model.LayoutSetPrototypeModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link LayoutSetPrototypeImpl}.
054     * </p>
055     *
056     * @author Brian Wing Shun Chan
057     * @see LayoutSetPrototypeImpl
058     * @see com.liferay.portal.model.LayoutSetPrototype
059     * @see com.liferay.portal.model.LayoutSetPrototypeModel
060     * @generated
061     */
062    @JSON(strict = true)
063    public class LayoutSetPrototypeModelImpl extends BaseModelImpl<LayoutSetPrototype>
064            implements LayoutSetPrototypeModel {
065            /*
066             * NOTE FOR DEVELOPERS:
067             *
068             * Never modify or reference this class directly. All methods that expect a layout set prototype model instance should use the {@link com.liferay.portal.model.LayoutSetPrototype} interface instead.
069             */
070            public static final String TABLE_NAME = "LayoutSetPrototype";
071            public static final Object[][] TABLE_COLUMNS = {
072                            { "uuid_", Types.VARCHAR },
073                            { "layoutSetPrototypeId", Types.BIGINT },
074                            { "companyId", Types.BIGINT },
075                            { "userId", Types.BIGINT },
076                            { "userName", Types.VARCHAR },
077                            { "createDate", Types.TIMESTAMP },
078                            { "modifiedDate", Types.TIMESTAMP },
079                            { "name", Types.VARCHAR },
080                            { "description", Types.VARCHAR },
081                            { "settings_", Types.VARCHAR },
082                            { "active_", Types.BOOLEAN }
083                    };
084            public static final String TABLE_SQL_CREATE = "create table LayoutSetPrototype (uuid_ VARCHAR(75) null,layoutSetPrototypeId LONG not null primary key,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,name STRING null,description STRING null,settings_ STRING null,active_ BOOLEAN)";
085            public static final String TABLE_SQL_DROP = "drop table LayoutSetPrototype";
086            public static final String ORDER_BY_JPQL = " ORDER BY layoutSetPrototype.layoutSetPrototypeId ASC";
087            public static final String ORDER_BY_SQL = " ORDER BY LayoutSetPrototype.layoutSetPrototypeId ASC";
088            public static final String DATA_SOURCE = "liferayDataSource";
089            public static final String SESSION_FACTORY = "liferaySessionFactory";
090            public static final String TX_MANAGER = "liferayTransactionManager";
091            public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
092                                    "value.object.entity.cache.enabled.com.liferay.portal.model.LayoutSetPrototype"),
093                            true);
094            public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
095                                    "value.object.finder.cache.enabled.com.liferay.portal.model.LayoutSetPrototype"),
096                            true);
097            public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
098                                    "value.object.column.bitmask.enabled.com.liferay.portal.model.LayoutSetPrototype"),
099                            true);
100            public static long ACTIVE_COLUMN_BITMASK = 1L;
101            public static long COMPANYID_COLUMN_BITMASK = 2L;
102            public static long UUID_COLUMN_BITMASK = 4L;
103            public static long LAYOUTSETPROTOTYPEID_COLUMN_BITMASK = 8L;
104    
105            /**
106             * Converts the soap model instance into a normal model instance.
107             *
108             * @param soapModel the soap model instance to convert
109             * @return the normal model instance
110             */
111            public static LayoutSetPrototype toModel(LayoutSetPrototypeSoap soapModel) {
112                    if (soapModel == null) {
113                            return null;
114                    }
115    
116                    LayoutSetPrototype model = new LayoutSetPrototypeImpl();
117    
118                    model.setUuid(soapModel.getUuid());
119                    model.setLayoutSetPrototypeId(soapModel.getLayoutSetPrototypeId());
120                    model.setCompanyId(soapModel.getCompanyId());
121                    model.setUserId(soapModel.getUserId());
122                    model.setUserName(soapModel.getUserName());
123                    model.setCreateDate(soapModel.getCreateDate());
124                    model.setModifiedDate(soapModel.getModifiedDate());
125                    model.setName(soapModel.getName());
126                    model.setDescription(soapModel.getDescription());
127                    model.setSettings(soapModel.getSettings());
128                    model.setActive(soapModel.getActive());
129    
130                    return model;
131            }
132    
133            /**
134             * Converts the soap model instances into normal model instances.
135             *
136             * @param soapModels the soap model instances to convert
137             * @return the normal model instances
138             */
139            public static List<LayoutSetPrototype> toModels(
140                    LayoutSetPrototypeSoap[] soapModels) {
141                    if (soapModels == null) {
142                            return null;
143                    }
144    
145                    List<LayoutSetPrototype> models = new ArrayList<LayoutSetPrototype>(soapModels.length);
146    
147                    for (LayoutSetPrototypeSoap soapModel : soapModels) {
148                            models.add(toModel(soapModel));
149                    }
150    
151                    return models;
152            }
153    
154            public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.portal.util.PropsUtil.get(
155                                    "lock.expiration.time.com.liferay.portal.model.LayoutSetPrototype"));
156    
157            public LayoutSetPrototypeModelImpl() {
158            }
159    
160            public long getPrimaryKey() {
161                    return _layoutSetPrototypeId;
162            }
163    
164            public void setPrimaryKey(long primaryKey) {
165                    setLayoutSetPrototypeId(primaryKey);
166            }
167    
168            public Serializable getPrimaryKeyObj() {
169                    return _layoutSetPrototypeId;
170            }
171    
172            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
173                    setPrimaryKey(((Long)primaryKeyObj).longValue());
174            }
175    
176            public Class<?> getModelClass() {
177                    return LayoutSetPrototype.class;
178            }
179    
180            public String getModelClassName() {
181                    return LayoutSetPrototype.class.getName();
182            }
183    
184            @Override
185            public Map<String, Object> getModelAttributes() {
186                    Map<String, Object> attributes = new HashMap<String, Object>();
187    
188                    attributes.put("uuid", getUuid());
189                    attributes.put("layoutSetPrototypeId", getLayoutSetPrototypeId());
190                    attributes.put("companyId", getCompanyId());
191                    attributes.put("userId", getUserId());
192                    attributes.put("userName", getUserName());
193                    attributes.put("createDate", getCreateDate());
194                    attributes.put("modifiedDate", getModifiedDate());
195                    attributes.put("name", getName());
196                    attributes.put("description", getDescription());
197                    attributes.put("settings", getSettings());
198                    attributes.put("active", getActive());
199    
200                    return attributes;
201            }
202    
203            @Override
204            public void setModelAttributes(Map<String, Object> attributes) {
205                    String uuid = (String)attributes.get("uuid");
206    
207                    if (uuid != null) {
208                            setUuid(uuid);
209                    }
210    
211                    Long layoutSetPrototypeId = (Long)attributes.get("layoutSetPrototypeId");
212    
213                    if (layoutSetPrototypeId != null) {
214                            setLayoutSetPrototypeId(layoutSetPrototypeId);
215                    }
216    
217                    Long companyId = (Long)attributes.get("companyId");
218    
219                    if (companyId != null) {
220                            setCompanyId(companyId);
221                    }
222    
223                    Long userId = (Long)attributes.get("userId");
224    
225                    if (userId != null) {
226                            setUserId(userId);
227                    }
228    
229                    String userName = (String)attributes.get("userName");
230    
231                    if (userName != null) {
232                            setUserName(userName);
233                    }
234    
235                    Date createDate = (Date)attributes.get("createDate");
236    
237                    if (createDate != null) {
238                            setCreateDate(createDate);
239                    }
240    
241                    Date modifiedDate = (Date)attributes.get("modifiedDate");
242    
243                    if (modifiedDate != null) {
244                            setModifiedDate(modifiedDate);
245                    }
246    
247                    String name = (String)attributes.get("name");
248    
249                    if (name != null) {
250                            setName(name);
251                    }
252    
253                    String description = (String)attributes.get("description");
254    
255                    if (description != null) {
256                            setDescription(description);
257                    }
258    
259                    String settings = (String)attributes.get("settings");
260    
261                    if (settings != null) {
262                            setSettings(settings);
263                    }
264    
265                    Boolean active = (Boolean)attributes.get("active");
266    
267                    if (active != null) {
268                            setActive(active);
269                    }
270            }
271    
272            @JSON
273            public String getUuid() {
274                    if (_uuid == null) {
275                            return StringPool.BLANK;
276                    }
277                    else {
278                            return _uuid;
279                    }
280            }
281    
282            public void setUuid(String uuid) {
283                    if (_originalUuid == null) {
284                            _originalUuid = _uuid;
285                    }
286    
287                    _uuid = uuid;
288            }
289    
290            public String getOriginalUuid() {
291                    return GetterUtil.getString(_originalUuid);
292            }
293    
294            @JSON
295            public long getLayoutSetPrototypeId() {
296                    return _layoutSetPrototypeId;
297            }
298    
299            public void setLayoutSetPrototypeId(long layoutSetPrototypeId) {
300                    _layoutSetPrototypeId = layoutSetPrototypeId;
301            }
302    
303            @JSON
304            public long getCompanyId() {
305                    return _companyId;
306            }
307    
308            public void setCompanyId(long companyId) {
309                    _columnBitmask |= COMPANYID_COLUMN_BITMASK;
310    
311                    if (!_setOriginalCompanyId) {
312                            _setOriginalCompanyId = true;
313    
314                            _originalCompanyId = _companyId;
315                    }
316    
317                    _companyId = companyId;
318            }
319    
320            public long getOriginalCompanyId() {
321                    return _originalCompanyId;
322            }
323    
324            @JSON
325            public long getUserId() {
326                    return _userId;
327            }
328    
329            public void setUserId(long userId) {
330                    _userId = userId;
331            }
332    
333            public String getUserUuid() throws SystemException {
334                    return PortalUtil.getUserValue(getUserId(), "uuid", _userUuid);
335            }
336    
337            public void setUserUuid(String userUuid) {
338                    _userUuid = userUuid;
339            }
340    
341            @JSON
342            public String getUserName() {
343                    if (_userName == null) {
344                            return StringPool.BLANK;
345                    }
346                    else {
347                            return _userName;
348                    }
349            }
350    
351            public void setUserName(String userName) {
352                    _userName = userName;
353            }
354    
355            @JSON
356            public Date getCreateDate() {
357                    return _createDate;
358            }
359    
360            public void setCreateDate(Date createDate) {
361                    _createDate = createDate;
362            }
363    
364            @JSON
365            public Date getModifiedDate() {
366                    return _modifiedDate;
367            }
368    
369            public void setModifiedDate(Date modifiedDate) {
370                    _modifiedDate = modifiedDate;
371            }
372    
373            @JSON
374            public String getName() {
375                    if (_name == null) {
376                            return StringPool.BLANK;
377                    }
378                    else {
379                            return _name;
380                    }
381            }
382    
383            public String getName(Locale locale) {
384                    String languageId = LocaleUtil.toLanguageId(locale);
385    
386                    return getName(languageId);
387            }
388    
389            public String getName(Locale locale, boolean useDefault) {
390                    String languageId = LocaleUtil.toLanguageId(locale);
391    
392                    return getName(languageId, useDefault);
393            }
394    
395            public String getName(String languageId) {
396                    return LocalizationUtil.getLocalization(getName(), languageId);
397            }
398    
399            public String getName(String languageId, boolean useDefault) {
400                    return LocalizationUtil.getLocalization(getName(), languageId,
401                            useDefault);
402            }
403    
404            public String getNameCurrentLanguageId() {
405                    return _nameCurrentLanguageId;
406            }
407    
408            @JSON
409            public String getNameCurrentValue() {
410                    Locale locale = getLocale(_nameCurrentLanguageId);
411    
412                    return getName(locale);
413            }
414    
415            public Map<Locale, String> getNameMap() {
416                    return LocalizationUtil.getLocalizationMap(getName());
417            }
418    
419            public void setName(String name) {
420                    _name = name;
421            }
422    
423            public void setName(String name, Locale locale) {
424                    setName(name, locale, LocaleUtil.getDefault());
425            }
426    
427            public void setName(String name, Locale locale, Locale defaultLocale) {
428                    String languageId = LocaleUtil.toLanguageId(locale);
429                    String defaultLanguageId = LocaleUtil.toLanguageId(defaultLocale);
430    
431                    if (Validator.isNotNull(name)) {
432                            setName(LocalizationUtil.updateLocalization(getName(), "Name",
433                                            name, languageId, defaultLanguageId));
434                    }
435                    else {
436                            setName(LocalizationUtil.removeLocalization(getName(), "Name",
437                                            languageId));
438                    }
439            }
440    
441            public void setNameCurrentLanguageId(String languageId) {
442                    _nameCurrentLanguageId = languageId;
443            }
444    
445            public void setNameMap(Map<Locale, String> nameMap) {
446                    setNameMap(nameMap, LocaleUtil.getDefault());
447            }
448    
449            public void setNameMap(Map<Locale, String> nameMap, Locale defaultLocale) {
450                    if (nameMap == null) {
451                            return;
452                    }
453    
454                    setName(LocalizationUtil.updateLocalization(nameMap, getName(), "Name",
455                                    LocaleUtil.toLanguageId(defaultLocale)));
456            }
457    
458            @JSON
459            public String getDescription() {
460                    if (_description == null) {
461                            return StringPool.BLANK;
462                    }
463                    else {
464                            return _description;
465                    }
466            }
467    
468            public void setDescription(String description) {
469                    _description = description;
470            }
471    
472            @JSON
473            public String getSettings() {
474                    if (_settings == null) {
475                            return StringPool.BLANK;
476                    }
477                    else {
478                            return _settings;
479                    }
480            }
481    
482            public void setSettings(String settings) {
483                    _settings = settings;
484            }
485    
486            @JSON
487            public boolean getActive() {
488                    return _active;
489            }
490    
491            public boolean isActive() {
492                    return _active;
493            }
494    
495            public void setActive(boolean active) {
496                    _columnBitmask |= ACTIVE_COLUMN_BITMASK;
497    
498                    if (!_setOriginalActive) {
499                            _setOriginalActive = true;
500    
501                            _originalActive = _active;
502                    }
503    
504                    _active = active;
505            }
506    
507            public boolean getOriginalActive() {
508                    return _originalActive;
509            }
510    
511            public long getColumnBitmask() {
512                    return _columnBitmask;
513            }
514    
515            @Override
516            public ExpandoBridge getExpandoBridge() {
517                    return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(),
518                            LayoutSetPrototype.class.getName(), getPrimaryKey());
519            }
520    
521            @Override
522            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
523                    ExpandoBridge expandoBridge = getExpandoBridge();
524    
525                    expandoBridge.setAttributes(serviceContext);
526            }
527    
528            @SuppressWarnings("unused")
529            public void prepareLocalizedFieldsForImport(Locale defaultImportLocale)
530                    throws LocaleException {
531                    setName(getName(defaultImportLocale), defaultImportLocale,
532                            defaultImportLocale);
533            }
534    
535            @Override
536            public LayoutSetPrototype toEscapedModel() {
537                    if (_escapedModel == null) {
538                            _escapedModel = (LayoutSetPrototype)ProxyUtil.newProxyInstance(_classLoader,
539                                            _escapedModelInterfaces, new AutoEscapeBeanHandler(this));
540                    }
541    
542                    return _escapedModel;
543            }
544    
545            @Override
546            public Object clone() {
547                    LayoutSetPrototypeImpl layoutSetPrototypeImpl = new LayoutSetPrototypeImpl();
548    
549                    layoutSetPrototypeImpl.setUuid(getUuid());
550                    layoutSetPrototypeImpl.setLayoutSetPrototypeId(getLayoutSetPrototypeId());
551                    layoutSetPrototypeImpl.setCompanyId(getCompanyId());
552                    layoutSetPrototypeImpl.setUserId(getUserId());
553                    layoutSetPrototypeImpl.setUserName(getUserName());
554                    layoutSetPrototypeImpl.setCreateDate(getCreateDate());
555                    layoutSetPrototypeImpl.setModifiedDate(getModifiedDate());
556                    layoutSetPrototypeImpl.setName(getName());
557                    layoutSetPrototypeImpl.setDescription(getDescription());
558                    layoutSetPrototypeImpl.setSettings(getSettings());
559                    layoutSetPrototypeImpl.setActive(getActive());
560    
561                    layoutSetPrototypeImpl.resetOriginalValues();
562    
563                    return layoutSetPrototypeImpl;
564            }
565    
566            public int compareTo(LayoutSetPrototype layoutSetPrototype) {
567                    long primaryKey = layoutSetPrototype.getPrimaryKey();
568    
569                    if (getPrimaryKey() < primaryKey) {
570                            return -1;
571                    }
572                    else if (getPrimaryKey() > primaryKey) {
573                            return 1;
574                    }
575                    else {
576                            return 0;
577                    }
578            }
579    
580            @Override
581            public boolean equals(Object obj) {
582                    if (obj == null) {
583                            return false;
584                    }
585    
586                    LayoutSetPrototype layoutSetPrototype = null;
587    
588                    try {
589                            layoutSetPrototype = (LayoutSetPrototype)obj;
590                    }
591                    catch (ClassCastException cce) {
592                            return false;
593                    }
594    
595                    long primaryKey = layoutSetPrototype.getPrimaryKey();
596    
597                    if (getPrimaryKey() == primaryKey) {
598                            return true;
599                    }
600                    else {
601                            return false;
602                    }
603            }
604    
605            @Override
606            public int hashCode() {
607                    return (int)getPrimaryKey();
608            }
609    
610            @Override
611            public void resetOriginalValues() {
612                    LayoutSetPrototypeModelImpl layoutSetPrototypeModelImpl = this;
613    
614                    layoutSetPrototypeModelImpl._originalUuid = layoutSetPrototypeModelImpl._uuid;
615    
616                    layoutSetPrototypeModelImpl._originalCompanyId = layoutSetPrototypeModelImpl._companyId;
617    
618                    layoutSetPrototypeModelImpl._setOriginalCompanyId = false;
619    
620                    layoutSetPrototypeModelImpl._originalActive = layoutSetPrototypeModelImpl._active;
621    
622                    layoutSetPrototypeModelImpl._setOriginalActive = false;
623    
624                    layoutSetPrototypeModelImpl._columnBitmask = 0;
625            }
626    
627            @Override
628            public CacheModel<LayoutSetPrototype> toCacheModel() {
629                    LayoutSetPrototypeCacheModel layoutSetPrototypeCacheModel = new LayoutSetPrototypeCacheModel();
630    
631                    layoutSetPrototypeCacheModel.uuid = getUuid();
632    
633                    String uuid = layoutSetPrototypeCacheModel.uuid;
634    
635                    if ((uuid != null) && (uuid.length() == 0)) {
636                            layoutSetPrototypeCacheModel.uuid = null;
637                    }
638    
639                    layoutSetPrototypeCacheModel.layoutSetPrototypeId = getLayoutSetPrototypeId();
640    
641                    layoutSetPrototypeCacheModel.companyId = getCompanyId();
642    
643                    layoutSetPrototypeCacheModel.userId = getUserId();
644    
645                    layoutSetPrototypeCacheModel.userName = getUserName();
646    
647                    String userName = layoutSetPrototypeCacheModel.userName;
648    
649                    if ((userName != null) && (userName.length() == 0)) {
650                            layoutSetPrototypeCacheModel.userName = null;
651                    }
652    
653                    Date createDate = getCreateDate();
654    
655                    if (createDate != null) {
656                            layoutSetPrototypeCacheModel.createDate = createDate.getTime();
657                    }
658                    else {
659                            layoutSetPrototypeCacheModel.createDate = Long.MIN_VALUE;
660                    }
661    
662                    Date modifiedDate = getModifiedDate();
663    
664                    if (modifiedDate != null) {
665                            layoutSetPrototypeCacheModel.modifiedDate = modifiedDate.getTime();
666                    }
667                    else {
668                            layoutSetPrototypeCacheModel.modifiedDate = Long.MIN_VALUE;
669                    }
670    
671                    layoutSetPrototypeCacheModel.name = getName();
672    
673                    String name = layoutSetPrototypeCacheModel.name;
674    
675                    if ((name != null) && (name.length() == 0)) {
676                            layoutSetPrototypeCacheModel.name = null;
677                    }
678    
679                    layoutSetPrototypeCacheModel.description = getDescription();
680    
681                    String description = layoutSetPrototypeCacheModel.description;
682    
683                    if ((description != null) && (description.length() == 0)) {
684                            layoutSetPrototypeCacheModel.description = null;
685                    }
686    
687                    layoutSetPrototypeCacheModel.settings = getSettings();
688    
689                    String settings = layoutSetPrototypeCacheModel.settings;
690    
691                    if ((settings != null) && (settings.length() == 0)) {
692                            layoutSetPrototypeCacheModel.settings = null;
693                    }
694    
695                    layoutSetPrototypeCacheModel.active = getActive();
696    
697                    return layoutSetPrototypeCacheModel;
698            }
699    
700            @Override
701            public String toString() {
702                    StringBundler sb = new StringBundler(23);
703    
704                    sb.append("{uuid=");
705                    sb.append(getUuid());
706                    sb.append(", layoutSetPrototypeId=");
707                    sb.append(getLayoutSetPrototypeId());
708                    sb.append(", companyId=");
709                    sb.append(getCompanyId());
710                    sb.append(", userId=");
711                    sb.append(getUserId());
712                    sb.append(", userName=");
713                    sb.append(getUserName());
714                    sb.append(", createDate=");
715                    sb.append(getCreateDate());
716                    sb.append(", modifiedDate=");
717                    sb.append(getModifiedDate());
718                    sb.append(", name=");
719                    sb.append(getName());
720                    sb.append(", description=");
721                    sb.append(getDescription());
722                    sb.append(", settings=");
723                    sb.append(getSettings());
724                    sb.append(", active=");
725                    sb.append(getActive());
726                    sb.append("}");
727    
728                    return sb.toString();
729            }
730    
731            public String toXmlString() {
732                    StringBundler sb = new StringBundler(37);
733    
734                    sb.append("<model><model-name>");
735                    sb.append("com.liferay.portal.model.LayoutSetPrototype");
736                    sb.append("</model-name>");
737    
738                    sb.append(
739                            "<column><column-name>uuid</column-name><column-value><![CDATA[");
740                    sb.append(getUuid());
741                    sb.append("]]></column-value></column>");
742                    sb.append(
743                            "<column><column-name>layoutSetPrototypeId</column-name><column-value><![CDATA[");
744                    sb.append(getLayoutSetPrototypeId());
745                    sb.append("]]></column-value></column>");
746                    sb.append(
747                            "<column><column-name>companyId</column-name><column-value><![CDATA[");
748                    sb.append(getCompanyId());
749                    sb.append("]]></column-value></column>");
750                    sb.append(
751                            "<column><column-name>userId</column-name><column-value><![CDATA[");
752                    sb.append(getUserId());
753                    sb.append("]]></column-value></column>");
754                    sb.append(
755                            "<column><column-name>userName</column-name><column-value><![CDATA[");
756                    sb.append(getUserName());
757                    sb.append("]]></column-value></column>");
758                    sb.append(
759                            "<column><column-name>createDate</column-name><column-value><![CDATA[");
760                    sb.append(getCreateDate());
761                    sb.append("]]></column-value></column>");
762                    sb.append(
763                            "<column><column-name>modifiedDate</column-name><column-value><![CDATA[");
764                    sb.append(getModifiedDate());
765                    sb.append("]]></column-value></column>");
766                    sb.append(
767                            "<column><column-name>name</column-name><column-value><![CDATA[");
768                    sb.append(getName());
769                    sb.append("]]></column-value></column>");
770                    sb.append(
771                            "<column><column-name>description</column-name><column-value><![CDATA[");
772                    sb.append(getDescription());
773                    sb.append("]]></column-value></column>");
774                    sb.append(
775                            "<column><column-name>settings</column-name><column-value><![CDATA[");
776                    sb.append(getSettings());
777                    sb.append("]]></column-value></column>");
778                    sb.append(
779                            "<column><column-name>active</column-name><column-value><![CDATA[");
780                    sb.append(getActive());
781                    sb.append("]]></column-value></column>");
782    
783                    sb.append("</model>");
784    
785                    return sb.toString();
786            }
787    
788            private static ClassLoader _classLoader = LayoutSetPrototype.class.getClassLoader();
789            private static Class<?>[] _escapedModelInterfaces = new Class[] {
790                            LayoutSetPrototype.class
791                    };
792            private String _uuid;
793            private String _originalUuid;
794            private long _layoutSetPrototypeId;
795            private long _companyId;
796            private long _originalCompanyId;
797            private boolean _setOriginalCompanyId;
798            private long _userId;
799            private String _userUuid;
800            private String _userName;
801            private Date _createDate;
802            private Date _modifiedDate;
803            private String _name;
804            private String _nameCurrentLanguageId;
805            private String _description;
806            private String _settings;
807            private boolean _active;
808            private boolean _originalActive;
809            private boolean _setOriginalActive;
810            private long _columnBitmask;
811            private LayoutSetPrototype _escapedModel;
812    }