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