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