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