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.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            public long getPrimaryKey() {
107                    return _recordVersionId;
108            }
109    
110            public void setPrimaryKey(long primaryKey) {
111                    setRecordVersionId(primaryKey);
112            }
113    
114            public Serializable getPrimaryKeyObj() {
115                    return _recordVersionId;
116            }
117    
118            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
119                    setPrimaryKey(((Long)primaryKeyObj).longValue());
120            }
121    
122            public Class<?> getModelClass() {
123                    return DDLRecordVersion.class;
124            }
125    
126            public String getModelClassName() {
127                    return DDLRecordVersion.class.getName();
128            }
129    
130            @Override
131            public Map<String, Object> getModelAttributes() {
132                    Map<String, Object> attributes = new HashMap<String, Object>();
133    
134                    attributes.put("recordVersionId", getRecordVersionId());
135                    attributes.put("groupId", getGroupId());
136                    attributes.put("companyId", getCompanyId());
137                    attributes.put("userId", getUserId());
138                    attributes.put("userName", getUserName());
139                    attributes.put("createDate", getCreateDate());
140                    attributes.put("DDMStorageId", getDDMStorageId());
141                    attributes.put("recordSetId", getRecordSetId());
142                    attributes.put("recordId", getRecordId());
143                    attributes.put("version", getVersion());
144                    attributes.put("displayIndex", getDisplayIndex());
145                    attributes.put("status", getStatus());
146                    attributes.put("statusByUserId", getStatusByUserId());
147                    attributes.put("statusByUserName", getStatusByUserName());
148                    attributes.put("statusDate", getStatusDate());
149    
150                    return attributes;
151            }
152    
153            @Override
154            public void setModelAttributes(Map<String, Object> attributes) {
155                    Long recordVersionId = (Long)attributes.get("recordVersionId");
156    
157                    if (recordVersionId != null) {
158                            setRecordVersionId(recordVersionId);
159                    }
160    
161                    Long groupId = (Long)attributes.get("groupId");
162    
163                    if (groupId != null) {
164                            setGroupId(groupId);
165                    }
166    
167                    Long companyId = (Long)attributes.get("companyId");
168    
169                    if (companyId != null) {
170                            setCompanyId(companyId);
171                    }
172    
173                    Long userId = (Long)attributes.get("userId");
174    
175                    if (userId != null) {
176                            setUserId(userId);
177                    }
178    
179                    String userName = (String)attributes.get("userName");
180    
181                    if (userName != null) {
182                            setUserName(userName);
183                    }
184    
185                    Date createDate = (Date)attributes.get("createDate");
186    
187                    if (createDate != null) {
188                            setCreateDate(createDate);
189                    }
190    
191                    Long DDMStorageId = (Long)attributes.get("DDMStorageId");
192    
193                    if (DDMStorageId != null) {
194                            setDDMStorageId(DDMStorageId);
195                    }
196    
197                    Long recordSetId = (Long)attributes.get("recordSetId");
198    
199                    if (recordSetId != null) {
200                            setRecordSetId(recordSetId);
201                    }
202    
203                    Long recordId = (Long)attributes.get("recordId");
204    
205                    if (recordId != null) {
206                            setRecordId(recordId);
207                    }
208    
209                    String version = (String)attributes.get("version");
210    
211                    if (version != null) {
212                            setVersion(version);
213                    }
214    
215                    Integer displayIndex = (Integer)attributes.get("displayIndex");
216    
217                    if (displayIndex != null) {
218                            setDisplayIndex(displayIndex);
219                    }
220    
221                    Integer status = (Integer)attributes.get("status");
222    
223                    if (status != null) {
224                            setStatus(status);
225                    }
226    
227                    Long statusByUserId = (Long)attributes.get("statusByUserId");
228    
229                    if (statusByUserId != null) {
230                            setStatusByUserId(statusByUserId);
231                    }
232    
233                    String statusByUserName = (String)attributes.get("statusByUserName");
234    
235                    if (statusByUserName != null) {
236                            setStatusByUserName(statusByUserName);
237                    }
238    
239                    Date statusDate = (Date)attributes.get("statusDate");
240    
241                    if (statusDate != null) {
242                            setStatusDate(statusDate);
243                    }
244            }
245    
246            public long getRecordVersionId() {
247                    return _recordVersionId;
248            }
249    
250            public void setRecordVersionId(long recordVersionId) {
251                    _recordVersionId = recordVersionId;
252            }
253    
254            public long getGroupId() {
255                    return _groupId;
256            }
257    
258            public void setGroupId(long groupId) {
259                    _groupId = groupId;
260            }
261    
262            public long getCompanyId() {
263                    return _companyId;
264            }
265    
266            public void setCompanyId(long companyId) {
267                    _companyId = companyId;
268            }
269    
270            public long getUserId() {
271                    return _userId;
272            }
273    
274            public void setUserId(long userId) {
275                    _userId = userId;
276            }
277    
278            public String getUserUuid() throws SystemException {
279                    return PortalUtil.getUserValue(getUserId(), "uuid", _userUuid);
280            }
281    
282            public void setUserUuid(String userUuid) {
283                    _userUuid = userUuid;
284            }
285    
286            public String getUserName() {
287                    if (_userName == null) {
288                            return StringPool.BLANK;
289                    }
290                    else {
291                            return _userName;
292                    }
293            }
294    
295            public void setUserName(String userName) {
296                    _userName = userName;
297            }
298    
299            public Date getCreateDate() {
300                    return _createDate;
301            }
302    
303            public void setCreateDate(Date createDate) {
304                    _createDate = createDate;
305            }
306    
307            public long getDDMStorageId() {
308                    return _DDMStorageId;
309            }
310    
311            public void setDDMStorageId(long DDMStorageId) {
312                    _DDMStorageId = DDMStorageId;
313            }
314    
315            public long getRecordSetId() {
316                    return _recordSetId;
317            }
318    
319            public void setRecordSetId(long recordSetId) {
320                    _recordSetId = recordSetId;
321            }
322    
323            public long getRecordId() {
324                    return _recordId;
325            }
326    
327            public void setRecordId(long recordId) {
328                    _columnBitmask |= RECORDID_COLUMN_BITMASK;
329    
330                    if (!_setOriginalRecordId) {
331                            _setOriginalRecordId = true;
332    
333                            _originalRecordId = _recordId;
334                    }
335    
336                    _recordId = recordId;
337            }
338    
339            public long getOriginalRecordId() {
340                    return _originalRecordId;
341            }
342    
343            public String getVersion() {
344                    if (_version == null) {
345                            return StringPool.BLANK;
346                    }
347                    else {
348                            return _version;
349                    }
350            }
351    
352            public void setVersion(String version) {
353                    _columnBitmask |= VERSION_COLUMN_BITMASK;
354    
355                    if (_originalVersion == null) {
356                            _originalVersion = _version;
357                    }
358    
359                    _version = version;
360            }
361    
362            public String getOriginalVersion() {
363                    return GetterUtil.getString(_originalVersion);
364            }
365    
366            public int getDisplayIndex() {
367                    return _displayIndex;
368            }
369    
370            public void setDisplayIndex(int displayIndex) {
371                    _displayIndex = displayIndex;
372            }
373    
374            public int getStatus() {
375                    return _status;
376            }
377    
378            public void setStatus(int status) {
379                    _columnBitmask |= STATUS_COLUMN_BITMASK;
380    
381                    if (!_setOriginalStatus) {
382                            _setOriginalStatus = true;
383    
384                            _originalStatus = _status;
385                    }
386    
387                    _status = status;
388            }
389    
390            public int getOriginalStatus() {
391                    return _originalStatus;
392            }
393    
394            public long getStatusByUserId() {
395                    return _statusByUserId;
396            }
397    
398            public void setStatusByUserId(long statusByUserId) {
399                    _statusByUserId = statusByUserId;
400            }
401    
402            public String getStatusByUserUuid() throws SystemException {
403                    return PortalUtil.getUserValue(getStatusByUserId(), "uuid",
404                            _statusByUserUuid);
405            }
406    
407            public void setStatusByUserUuid(String statusByUserUuid) {
408                    _statusByUserUuid = statusByUserUuid;
409            }
410    
411            public String getStatusByUserName() {
412                    if (_statusByUserName == null) {
413                            return StringPool.BLANK;
414                    }
415                    else {
416                            return _statusByUserName;
417                    }
418            }
419    
420            public void setStatusByUserName(String statusByUserName) {
421                    _statusByUserName = statusByUserName;
422            }
423    
424            public Date getStatusDate() {
425                    return _statusDate;
426            }
427    
428            public void setStatusDate(Date statusDate) {
429                    _statusDate = statusDate;
430            }
431    
432            /**
433             * @deprecated {@link #isApproved}
434             */
435            public boolean getApproved() {
436                    return isApproved();
437            }
438    
439            public boolean isApproved() {
440                    if (getStatus() == WorkflowConstants.STATUS_APPROVED) {
441                            return true;
442                    }
443                    else {
444                            return false;
445                    }
446            }
447    
448            public boolean isDenied() {
449                    if (getStatus() == WorkflowConstants.STATUS_DENIED) {
450                            return true;
451                    }
452                    else {
453                            return false;
454                    }
455            }
456    
457            public boolean isDraft() {
458                    if (getStatus() == WorkflowConstants.STATUS_DRAFT) {
459                            return true;
460                    }
461                    else {
462                            return false;
463                    }
464            }
465    
466            public boolean isExpired() {
467                    if (getStatus() == WorkflowConstants.STATUS_EXPIRED) {
468                            return true;
469                    }
470                    else {
471                            return false;
472                    }
473            }
474    
475            public boolean isInactive() {
476                    if (getStatus() == WorkflowConstants.STATUS_INACTIVE) {
477                            return true;
478                    }
479                    else {
480                            return false;
481                    }
482            }
483    
484            public boolean isIncomplete() {
485                    if (getStatus() == WorkflowConstants.STATUS_INCOMPLETE) {
486                            return true;
487                    }
488                    else {
489                            return false;
490                    }
491            }
492    
493            public boolean isInTrash() {
494                    if (getStatus() == WorkflowConstants.STATUS_IN_TRASH) {
495                            return true;
496                    }
497                    else {
498                            return false;
499                    }
500            }
501    
502            public boolean isPending() {
503                    if (getStatus() == WorkflowConstants.STATUS_PENDING) {
504                            return true;
505                    }
506                    else {
507                            return false;
508                    }
509            }
510    
511            public boolean isScheduled() {
512                    if (getStatus() == WorkflowConstants.STATUS_SCHEDULED) {
513                            return true;
514                    }
515                    else {
516                            return false;
517                    }
518            }
519    
520            public long getColumnBitmask() {
521                    return _columnBitmask;
522            }
523    
524            @Override
525            public ExpandoBridge getExpandoBridge() {
526                    return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(),
527                            DDLRecordVersion.class.getName(), getPrimaryKey());
528            }
529    
530            @Override
531            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
532                    ExpandoBridge expandoBridge = getExpandoBridge();
533    
534                    expandoBridge.setAttributes(serviceContext);
535            }
536    
537            @Override
538            public DDLRecordVersion toEscapedModel() {
539                    if (_escapedModel == null) {
540                            _escapedModel = (DDLRecordVersion)ProxyUtil.newProxyInstance(_classLoader,
541                                            _escapedModelInterfaces, new AutoEscapeBeanHandler(this));
542                    }
543    
544                    return _escapedModel;
545            }
546    
547            @Override
548            public Object clone() {
549                    DDLRecordVersionImpl ddlRecordVersionImpl = new DDLRecordVersionImpl();
550    
551                    ddlRecordVersionImpl.setRecordVersionId(getRecordVersionId());
552                    ddlRecordVersionImpl.setGroupId(getGroupId());
553                    ddlRecordVersionImpl.setCompanyId(getCompanyId());
554                    ddlRecordVersionImpl.setUserId(getUserId());
555                    ddlRecordVersionImpl.setUserName(getUserName());
556                    ddlRecordVersionImpl.setCreateDate(getCreateDate());
557                    ddlRecordVersionImpl.setDDMStorageId(getDDMStorageId());
558                    ddlRecordVersionImpl.setRecordSetId(getRecordSetId());
559                    ddlRecordVersionImpl.setRecordId(getRecordId());
560                    ddlRecordVersionImpl.setVersion(getVersion());
561                    ddlRecordVersionImpl.setDisplayIndex(getDisplayIndex());
562                    ddlRecordVersionImpl.setStatus(getStatus());
563                    ddlRecordVersionImpl.setStatusByUserId(getStatusByUserId());
564                    ddlRecordVersionImpl.setStatusByUserName(getStatusByUserName());
565                    ddlRecordVersionImpl.setStatusDate(getStatusDate());
566    
567                    ddlRecordVersionImpl.resetOriginalValues();
568    
569                    return ddlRecordVersionImpl;
570            }
571    
572            public int compareTo(DDLRecordVersion ddlRecordVersion) {
573                    long primaryKey = ddlRecordVersion.getPrimaryKey();
574    
575                    if (getPrimaryKey() < primaryKey) {
576                            return -1;
577                    }
578                    else if (getPrimaryKey() > primaryKey) {
579                            return 1;
580                    }
581                    else {
582                            return 0;
583                    }
584            }
585    
586            @Override
587            public boolean equals(Object obj) {
588                    if (obj == null) {
589                            return false;
590                    }
591    
592                    DDLRecordVersion ddlRecordVersion = null;
593    
594                    try {
595                            ddlRecordVersion = (DDLRecordVersion)obj;
596                    }
597                    catch (ClassCastException cce) {
598                            return false;
599                    }
600    
601                    long primaryKey = ddlRecordVersion.getPrimaryKey();
602    
603                    if (getPrimaryKey() == primaryKey) {
604                            return true;
605                    }
606                    else {
607                            return false;
608                    }
609            }
610    
611            @Override
612            public int hashCode() {
613                    return (int)getPrimaryKey();
614            }
615    
616            @Override
617            public void resetOriginalValues() {
618                    DDLRecordVersionModelImpl ddlRecordVersionModelImpl = this;
619    
620                    ddlRecordVersionModelImpl._originalRecordId = ddlRecordVersionModelImpl._recordId;
621    
622                    ddlRecordVersionModelImpl._setOriginalRecordId = false;
623    
624                    ddlRecordVersionModelImpl._originalVersion = ddlRecordVersionModelImpl._version;
625    
626                    ddlRecordVersionModelImpl._originalStatus = ddlRecordVersionModelImpl._status;
627    
628                    ddlRecordVersionModelImpl._setOriginalStatus = false;
629    
630                    ddlRecordVersionModelImpl._columnBitmask = 0;
631            }
632    
633            @Override
634            public CacheModel<DDLRecordVersion> toCacheModel() {
635                    DDLRecordVersionCacheModel ddlRecordVersionCacheModel = new DDLRecordVersionCacheModel();
636    
637                    ddlRecordVersionCacheModel.recordVersionId = getRecordVersionId();
638    
639                    ddlRecordVersionCacheModel.groupId = getGroupId();
640    
641                    ddlRecordVersionCacheModel.companyId = getCompanyId();
642    
643                    ddlRecordVersionCacheModel.userId = getUserId();
644    
645                    ddlRecordVersionCacheModel.userName = getUserName();
646    
647                    String userName = ddlRecordVersionCacheModel.userName;
648    
649                    if ((userName != null) && (userName.length() == 0)) {
650                            ddlRecordVersionCacheModel.userName = null;
651                    }
652    
653                    Date createDate = getCreateDate();
654    
655                    if (createDate != null) {
656                            ddlRecordVersionCacheModel.createDate = createDate.getTime();
657                    }
658                    else {
659                            ddlRecordVersionCacheModel.createDate = Long.MIN_VALUE;
660                    }
661    
662                    ddlRecordVersionCacheModel.DDMStorageId = getDDMStorageId();
663    
664                    ddlRecordVersionCacheModel.recordSetId = getRecordSetId();
665    
666                    ddlRecordVersionCacheModel.recordId = getRecordId();
667    
668                    ddlRecordVersionCacheModel.version = getVersion();
669    
670                    String version = ddlRecordVersionCacheModel.version;
671    
672                    if ((version != null) && (version.length() == 0)) {
673                            ddlRecordVersionCacheModel.version = null;
674                    }
675    
676                    ddlRecordVersionCacheModel.displayIndex = getDisplayIndex();
677    
678                    ddlRecordVersionCacheModel.status = getStatus();
679    
680                    ddlRecordVersionCacheModel.statusByUserId = getStatusByUserId();
681    
682                    ddlRecordVersionCacheModel.statusByUserName = getStatusByUserName();
683    
684                    String statusByUserName = ddlRecordVersionCacheModel.statusByUserName;
685    
686                    if ((statusByUserName != null) && (statusByUserName.length() == 0)) {
687                            ddlRecordVersionCacheModel.statusByUserName = null;
688                    }
689    
690                    Date statusDate = getStatusDate();
691    
692                    if (statusDate != null) {
693                            ddlRecordVersionCacheModel.statusDate = statusDate.getTime();
694                    }
695                    else {
696                            ddlRecordVersionCacheModel.statusDate = Long.MIN_VALUE;
697                    }
698    
699                    return ddlRecordVersionCacheModel;
700            }
701    
702            @Override
703            public String toString() {
704                    StringBundler sb = new StringBundler(31);
705    
706                    sb.append("{recordVersionId=");
707                    sb.append(getRecordVersionId());
708                    sb.append(", groupId=");
709                    sb.append(getGroupId());
710                    sb.append(", companyId=");
711                    sb.append(getCompanyId());
712                    sb.append(", userId=");
713                    sb.append(getUserId());
714                    sb.append(", userName=");
715                    sb.append(getUserName());
716                    sb.append(", createDate=");
717                    sb.append(getCreateDate());
718                    sb.append(", DDMStorageId=");
719                    sb.append(getDDMStorageId());
720                    sb.append(", recordSetId=");
721                    sb.append(getRecordSetId());
722                    sb.append(", recordId=");
723                    sb.append(getRecordId());
724                    sb.append(", version=");
725                    sb.append(getVersion());
726                    sb.append(", displayIndex=");
727                    sb.append(getDisplayIndex());
728                    sb.append(", status=");
729                    sb.append(getStatus());
730                    sb.append(", statusByUserId=");
731                    sb.append(getStatusByUserId());
732                    sb.append(", statusByUserName=");
733                    sb.append(getStatusByUserName());
734                    sb.append(", statusDate=");
735                    sb.append(getStatusDate());
736                    sb.append("}");
737    
738                    return sb.toString();
739            }
740    
741            public String toXmlString() {
742                    StringBundler sb = new StringBundler(49);
743    
744                    sb.append("<model><model-name>");
745                    sb.append("com.liferay.portlet.dynamicdatalists.model.DDLRecordVersion");
746                    sb.append("</model-name>");
747    
748                    sb.append(
749                            "<column><column-name>recordVersionId</column-name><column-value><![CDATA[");
750                    sb.append(getRecordVersionId());
751                    sb.append("]]></column-value></column>");
752                    sb.append(
753                            "<column><column-name>groupId</column-name><column-value><![CDATA[");
754                    sb.append(getGroupId());
755                    sb.append("]]></column-value></column>");
756                    sb.append(
757                            "<column><column-name>companyId</column-name><column-value><![CDATA[");
758                    sb.append(getCompanyId());
759                    sb.append("]]></column-value></column>");
760                    sb.append(
761                            "<column><column-name>userId</column-name><column-value><![CDATA[");
762                    sb.append(getUserId());
763                    sb.append("]]></column-value></column>");
764                    sb.append(
765                            "<column><column-name>userName</column-name><column-value><![CDATA[");
766                    sb.append(getUserName());
767                    sb.append("]]></column-value></column>");
768                    sb.append(
769                            "<column><column-name>createDate</column-name><column-value><![CDATA[");
770                    sb.append(getCreateDate());
771                    sb.append("]]></column-value></column>");
772                    sb.append(
773                            "<column><column-name>DDMStorageId</column-name><column-value><![CDATA[");
774                    sb.append(getDDMStorageId());
775                    sb.append("]]></column-value></column>");
776                    sb.append(
777                            "<column><column-name>recordSetId</column-name><column-value><![CDATA[");
778                    sb.append(getRecordSetId());
779                    sb.append("]]></column-value></column>");
780                    sb.append(
781                            "<column><column-name>recordId</column-name><column-value><![CDATA[");
782                    sb.append(getRecordId());
783                    sb.append("]]></column-value></column>");
784                    sb.append(
785                            "<column><column-name>version</column-name><column-value><![CDATA[");
786                    sb.append(getVersion());
787                    sb.append("]]></column-value></column>");
788                    sb.append(
789                            "<column><column-name>displayIndex</column-name><column-value><![CDATA[");
790                    sb.append(getDisplayIndex());
791                    sb.append("]]></column-value></column>");
792                    sb.append(
793                            "<column><column-name>status</column-name><column-value><![CDATA[");
794                    sb.append(getStatus());
795                    sb.append("]]></column-value></column>");
796                    sb.append(
797                            "<column><column-name>statusByUserId</column-name><column-value><![CDATA[");
798                    sb.append(getStatusByUserId());
799                    sb.append("]]></column-value></column>");
800                    sb.append(
801                            "<column><column-name>statusByUserName</column-name><column-value><![CDATA[");
802                    sb.append(getStatusByUserName());
803                    sb.append("]]></column-value></column>");
804                    sb.append(
805                            "<column><column-name>statusDate</column-name><column-value><![CDATA[");
806                    sb.append(getStatusDate());
807                    sb.append("]]></column-value></column>");
808    
809                    sb.append("</model>");
810    
811                    return sb.toString();
812            }
813    
814            private static ClassLoader _classLoader = DDLRecordVersion.class.getClassLoader();
815            private static Class<?>[] _escapedModelInterfaces = new Class[] {
816                            DDLRecordVersion.class
817                    };
818            private long _recordVersionId;
819            private long _groupId;
820            private long _companyId;
821            private long _userId;
822            private String _userUuid;
823            private String _userName;
824            private Date _createDate;
825            private long _DDMStorageId;
826            private long _recordSetId;
827            private long _recordId;
828            private long _originalRecordId;
829            private boolean _setOriginalRecordId;
830            private String _version;
831            private String _originalVersion;
832            private int _displayIndex;
833            private int _status;
834            private int _originalStatus;
835            private boolean _setOriginalStatus;
836            private long _statusByUserId;
837            private String _statusByUserUuid;
838            private String _statusByUserName;
839            private Date _statusDate;
840            private long _columnBitmask;
841            private DDLRecordVersion _escapedModel;
842    }