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