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