001    /**
002     * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.NoSuchModelException;
020    import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
021    import com.liferay.portal.kernel.exception.PortalException;
022    import com.liferay.portal.kernel.json.JSON;
023    import com.liferay.portal.kernel.lar.StagedModelType;
024    import com.liferay.portal.kernel.trash.TrashHandler;
025    import com.liferay.portal.kernel.trash.TrashHandlerRegistryUtil;
026    import com.liferay.portal.kernel.util.GetterUtil;
027    import com.liferay.portal.kernel.util.ProxyUtil;
028    import com.liferay.portal.kernel.util.StringBundler;
029    import com.liferay.portal.kernel.util.StringPool;
030    import com.liferay.portal.kernel.util.Validator;
031    import com.liferay.portal.kernel.workflow.WorkflowConstants;
032    import com.liferay.portal.model.CacheModel;
033    import com.liferay.portal.model.ContainerModel;
034    import com.liferay.portal.model.TrashedModel;
035    import com.liferay.portal.model.User;
036    import com.liferay.portal.model.impl.BaseModelImpl;
037    import com.liferay.portal.service.ServiceContext;
038    import com.liferay.portal.service.UserLocalServiceUtil;
039    import com.liferay.portal.util.PortalUtil;
040    
041    import com.liferay.portlet.documentlibrary.model.DLFolder;
042    import com.liferay.portlet.documentlibrary.model.DLFolderModel;
043    import com.liferay.portlet.documentlibrary.model.DLFolderSoap;
044    import com.liferay.portlet.expando.model.ExpandoBridge;
045    import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil;
046    import com.liferay.portlet.trash.model.TrashEntry;
047    import com.liferay.portlet.trash.service.TrashEntryLocalServiceUtil;
048    
049    import java.io.Serializable;
050    
051    import java.sql.Types;
052    
053    import java.util.ArrayList;
054    import java.util.Date;
055    import java.util.HashMap;
056    import java.util.List;
057    import java.util.Map;
058    
059    /**
060     * 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.
061     *
062     * <p>
063     * 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}.
064     * </p>
065     *
066     * @author Brian Wing Shun Chan
067     * @see DLFolderImpl
068     * @see com.liferay.portlet.documentlibrary.model.DLFolder
069     * @see com.liferay.portlet.documentlibrary.model.DLFolderModel
070     * @generated
071     */
072    @JSON(strict = true)
073    @ProviderType
074    public class DLFolderModelImpl extends BaseModelImpl<DLFolder>
075            implements DLFolderModel {
076            /*
077             * NOTE FOR DEVELOPERS:
078             *
079             * 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.
080             */
081            public static final String TABLE_NAME = "DLFolder";
082            public static final Object[][] TABLE_COLUMNS = {
083                            { "uuid_", Types.VARCHAR },
084                            { "folderId", Types.BIGINT },
085                            { "groupId", Types.BIGINT },
086                            { "companyId", Types.BIGINT },
087                            { "userId", Types.BIGINT },
088                            { "userName", Types.VARCHAR },
089                            { "createDate", Types.TIMESTAMP },
090                            { "modifiedDate", Types.TIMESTAMP },
091                            { "repositoryId", Types.BIGINT },
092                            { "mountPoint", Types.BOOLEAN },
093                            { "parentFolderId", Types.BIGINT },
094                            { "treePath", Types.VARCHAR },
095                            { "name", Types.VARCHAR },
096                            { "description", Types.VARCHAR },
097                            { "lastPostDate", Types.TIMESTAMP },
098                            { "defaultFileEntryTypeId", Types.BIGINT },
099                            { "hidden_", Types.BOOLEAN },
100                            { "overrideFileEntryTypes", Types.BOOLEAN },
101                            { "status", Types.INTEGER },
102                            { "statusByUserId", Types.BIGINT },
103                            { "statusByUserName", Types.VARCHAR },
104                            { "statusDate", Types.TIMESTAMP }
105                    };
106            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,treePath STRING null,name VARCHAR(100) null,description STRING null,lastPostDate DATE null,defaultFileEntryTypeId LONG,hidden_ BOOLEAN,overrideFileEntryTypes BOOLEAN,status INTEGER,statusByUserId LONG,statusByUserName VARCHAR(75) null,statusDate DATE null)";
107            public static final String TABLE_SQL_DROP = "drop table DLFolder";
108            public static final String ORDER_BY_JPQL = " ORDER BY dlFolder.parentFolderId ASC, dlFolder.name ASC";
109            public static final String ORDER_BY_SQL = " ORDER BY DLFolder.parentFolderId ASC, DLFolder.name ASC";
110            public static final String DATA_SOURCE = "liferayDataSource";
111            public static final String SESSION_FACTORY = "liferaySessionFactory";
112            public static final String TX_MANAGER = "liferayTransactionManager";
113            public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
114                                    "value.object.entity.cache.enabled.com.liferay.portlet.documentlibrary.model.DLFolder"),
115                            true);
116            public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
117                                    "value.object.finder.cache.enabled.com.liferay.portlet.documentlibrary.model.DLFolder"),
118                            true);
119            public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
120                                    "value.object.column.bitmask.enabled.com.liferay.portlet.documentlibrary.model.DLFolder"),
121                            true);
122            public static final long COMPANYID_COLUMN_BITMASK = 1L;
123            public static final long FOLDERID_COLUMN_BITMASK = 2L;
124            public static final long GROUPID_COLUMN_BITMASK = 4L;
125            public static final long HIDDEN_COLUMN_BITMASK = 8L;
126            public static final long MOUNTPOINT_COLUMN_BITMASK = 16L;
127            public static final long NAME_COLUMN_BITMASK = 32L;
128            public static final long PARENTFOLDERID_COLUMN_BITMASK = 64L;
129            public static final long REPOSITORYID_COLUMN_BITMASK = 128L;
130            public static final long STATUS_COLUMN_BITMASK = 256L;
131            public static final long UUID_COLUMN_BITMASK = 512L;
132    
133            /**
134             * Converts the soap model instance into a normal model instance.
135             *
136             * @param soapModel the soap model instance to convert
137             * @return the normal model instance
138             */
139            public static DLFolder toModel(DLFolderSoap soapModel) {
140                    if (soapModel == null) {
141                            return null;
142                    }
143    
144                    DLFolder model = new DLFolderImpl();
145    
146                    model.setUuid(soapModel.getUuid());
147                    model.setFolderId(soapModel.getFolderId());
148                    model.setGroupId(soapModel.getGroupId());
149                    model.setCompanyId(soapModel.getCompanyId());
150                    model.setUserId(soapModel.getUserId());
151                    model.setUserName(soapModel.getUserName());
152                    model.setCreateDate(soapModel.getCreateDate());
153                    model.setModifiedDate(soapModel.getModifiedDate());
154                    model.setRepositoryId(soapModel.getRepositoryId());
155                    model.setMountPoint(soapModel.getMountPoint());
156                    model.setParentFolderId(soapModel.getParentFolderId());
157                    model.setTreePath(soapModel.getTreePath());
158                    model.setName(soapModel.getName());
159                    model.setDescription(soapModel.getDescription());
160                    model.setLastPostDate(soapModel.getLastPostDate());
161                    model.setDefaultFileEntryTypeId(soapModel.getDefaultFileEntryTypeId());
162                    model.setHidden(soapModel.getHidden());
163                    model.setOverrideFileEntryTypes(soapModel.getOverrideFileEntryTypes());
164                    model.setStatus(soapModel.getStatus());
165                    model.setStatusByUserId(soapModel.getStatusByUserId());
166                    model.setStatusByUserName(soapModel.getStatusByUserName());
167                    model.setStatusDate(soapModel.getStatusDate());
168    
169                    return model;
170            }
171    
172            /**
173             * Converts the soap model instances into normal model instances.
174             *
175             * @param soapModels the soap model instances to convert
176             * @return the normal model instances
177             */
178            public static List<DLFolder> toModels(DLFolderSoap[] soapModels) {
179                    if (soapModels == null) {
180                            return null;
181                    }
182    
183                    List<DLFolder> models = new ArrayList<DLFolder>(soapModels.length);
184    
185                    for (DLFolderSoap soapModel : soapModels) {
186                            models.add(toModel(soapModel));
187                    }
188    
189                    return models;
190            }
191    
192            public static final String MAPPING_TABLE_DLFILEENTRYTYPES_DLFOLDERS_NAME = "DLFileEntryTypes_DLFolders";
193            public static final Object[][] MAPPING_TABLE_DLFILEENTRYTYPES_DLFOLDERS_COLUMNS =
194                    {
195                            { "fileEntryTypeId", Types.BIGINT },
196                            { "folderId", Types.BIGINT }
197                    };
198            public static final String MAPPING_TABLE_DLFILEENTRYTYPES_DLFOLDERS_SQL_CREATE =
199                    "create table DLFileEntryTypes_DLFolders (fileEntryTypeId LONG not null,folderId LONG not null,primary key (fileEntryTypeId, folderId))";
200            public static final boolean FINDER_CACHE_ENABLED_DLFILEENTRYTYPES_DLFOLDERS = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
201                                    "value.object.finder.cache.enabled.DLFileEntryTypes_DLFolders"),
202                            true);
203            public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.portal.util.PropsUtil.get(
204                                    "lock.expiration.time.com.liferay.portlet.documentlibrary.model.DLFolder"));
205    
206            public DLFolderModelImpl() {
207            }
208    
209            @Override
210            public long getPrimaryKey() {
211                    return _folderId;
212            }
213    
214            @Override
215            public void setPrimaryKey(long primaryKey) {
216                    setFolderId(primaryKey);
217            }
218    
219            @Override
220            public Serializable getPrimaryKeyObj() {
221                    return _folderId;
222            }
223    
224            @Override
225            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
226                    setPrimaryKey(((Long)primaryKeyObj).longValue());
227            }
228    
229            @Override
230            public Class<?> getModelClass() {
231                    return DLFolder.class;
232            }
233    
234            @Override
235            public String getModelClassName() {
236                    return DLFolder.class.getName();
237            }
238    
239            @Override
240            public Map<String, Object> getModelAttributes() {
241                    Map<String, Object> attributes = new HashMap<String, Object>();
242    
243                    attributes.put("uuid", getUuid());
244                    attributes.put("folderId", getFolderId());
245                    attributes.put("groupId", getGroupId());
246                    attributes.put("companyId", getCompanyId());
247                    attributes.put("userId", getUserId());
248                    attributes.put("userName", getUserName());
249                    attributes.put("createDate", getCreateDate());
250                    attributes.put("modifiedDate", getModifiedDate());
251                    attributes.put("repositoryId", getRepositoryId());
252                    attributes.put("mountPoint", getMountPoint());
253                    attributes.put("parentFolderId", getParentFolderId());
254                    attributes.put("treePath", getTreePath());
255                    attributes.put("name", getName());
256                    attributes.put("description", getDescription());
257                    attributes.put("lastPostDate", getLastPostDate());
258                    attributes.put("defaultFileEntryTypeId", getDefaultFileEntryTypeId());
259                    attributes.put("hidden", getHidden());
260                    attributes.put("overrideFileEntryTypes", getOverrideFileEntryTypes());
261                    attributes.put("status", getStatus());
262                    attributes.put("statusByUserId", getStatusByUserId());
263                    attributes.put("statusByUserName", getStatusByUserName());
264                    attributes.put("statusDate", getStatusDate());
265    
266                    attributes.put("entityCacheEnabled", isEntityCacheEnabled());
267                    attributes.put("finderCacheEnabled", isFinderCacheEnabled());
268    
269                    return attributes;
270            }
271    
272            @Override
273            public void setModelAttributes(Map<String, Object> attributes) {
274                    String uuid = (String)attributes.get("uuid");
275    
276                    if (uuid != null) {
277                            setUuid(uuid);
278                    }
279    
280                    Long folderId = (Long)attributes.get("folderId");
281    
282                    if (folderId != null) {
283                            setFolderId(folderId);
284                    }
285    
286                    Long groupId = (Long)attributes.get("groupId");
287    
288                    if (groupId != null) {
289                            setGroupId(groupId);
290                    }
291    
292                    Long companyId = (Long)attributes.get("companyId");
293    
294                    if (companyId != null) {
295                            setCompanyId(companyId);
296                    }
297    
298                    Long userId = (Long)attributes.get("userId");
299    
300                    if (userId != null) {
301                            setUserId(userId);
302                    }
303    
304                    String userName = (String)attributes.get("userName");
305    
306                    if (userName != null) {
307                            setUserName(userName);
308                    }
309    
310                    Date createDate = (Date)attributes.get("createDate");
311    
312                    if (createDate != null) {
313                            setCreateDate(createDate);
314                    }
315    
316                    Date modifiedDate = (Date)attributes.get("modifiedDate");
317    
318                    if (modifiedDate != null) {
319                            setModifiedDate(modifiedDate);
320                    }
321    
322                    Long repositoryId = (Long)attributes.get("repositoryId");
323    
324                    if (repositoryId != null) {
325                            setRepositoryId(repositoryId);
326                    }
327    
328                    Boolean mountPoint = (Boolean)attributes.get("mountPoint");
329    
330                    if (mountPoint != null) {
331                            setMountPoint(mountPoint);
332                    }
333    
334                    Long parentFolderId = (Long)attributes.get("parentFolderId");
335    
336                    if (parentFolderId != null) {
337                            setParentFolderId(parentFolderId);
338                    }
339    
340                    String treePath = (String)attributes.get("treePath");
341    
342                    if (treePath != null) {
343                            setTreePath(treePath);
344                    }
345    
346                    String name = (String)attributes.get("name");
347    
348                    if (name != null) {
349                            setName(name);
350                    }
351    
352                    String description = (String)attributes.get("description");
353    
354                    if (description != null) {
355                            setDescription(description);
356                    }
357    
358                    Date lastPostDate = (Date)attributes.get("lastPostDate");
359    
360                    if (lastPostDate != null) {
361                            setLastPostDate(lastPostDate);
362                    }
363    
364                    Long defaultFileEntryTypeId = (Long)attributes.get(
365                                    "defaultFileEntryTypeId");
366    
367                    if (defaultFileEntryTypeId != null) {
368                            setDefaultFileEntryTypeId(defaultFileEntryTypeId);
369                    }
370    
371                    Boolean hidden = (Boolean)attributes.get("hidden");
372    
373                    if (hidden != null) {
374                            setHidden(hidden);
375                    }
376    
377                    Boolean overrideFileEntryTypes = (Boolean)attributes.get(
378                                    "overrideFileEntryTypes");
379    
380                    if (overrideFileEntryTypes != null) {
381                            setOverrideFileEntryTypes(overrideFileEntryTypes);
382                    }
383    
384                    Integer status = (Integer)attributes.get("status");
385    
386                    if (status != null) {
387                            setStatus(status);
388                    }
389    
390                    Long statusByUserId = (Long)attributes.get("statusByUserId");
391    
392                    if (statusByUserId != null) {
393                            setStatusByUserId(statusByUserId);
394                    }
395    
396                    String statusByUserName = (String)attributes.get("statusByUserName");
397    
398                    if (statusByUserName != null) {
399                            setStatusByUserName(statusByUserName);
400                    }
401    
402                    Date statusDate = (Date)attributes.get("statusDate");
403    
404                    if (statusDate != null) {
405                            setStatusDate(statusDate);
406                    }
407            }
408    
409            @JSON
410            @Override
411            public String getUuid() {
412                    if (_uuid == null) {
413                            return StringPool.BLANK;
414                    }
415                    else {
416                            return _uuid;
417                    }
418            }
419    
420            @Override
421            public void setUuid(String uuid) {
422                    if (_originalUuid == null) {
423                            _originalUuid = _uuid;
424                    }
425    
426                    _uuid = uuid;
427            }
428    
429            public String getOriginalUuid() {
430                    return GetterUtil.getString(_originalUuid);
431            }
432    
433            @JSON
434            @Override
435            public long getFolderId() {
436                    return _folderId;
437            }
438    
439            @Override
440            public void setFolderId(long folderId) {
441                    _columnBitmask |= FOLDERID_COLUMN_BITMASK;
442    
443                    if (!_setOriginalFolderId) {
444                            _setOriginalFolderId = true;
445    
446                            _originalFolderId = _folderId;
447                    }
448    
449                    _folderId = folderId;
450            }
451    
452            public long getOriginalFolderId() {
453                    return _originalFolderId;
454            }
455    
456            @JSON
457            @Override
458            public long getGroupId() {
459                    return _groupId;
460            }
461    
462            @Override
463            public void setGroupId(long groupId) {
464                    _columnBitmask |= GROUPID_COLUMN_BITMASK;
465    
466                    if (!_setOriginalGroupId) {
467                            _setOriginalGroupId = true;
468    
469                            _originalGroupId = _groupId;
470                    }
471    
472                    _groupId = groupId;
473            }
474    
475            public long getOriginalGroupId() {
476                    return _originalGroupId;
477            }
478    
479            @JSON
480            @Override
481            public long getCompanyId() {
482                    return _companyId;
483            }
484    
485            @Override
486            public void setCompanyId(long companyId) {
487                    _columnBitmask |= COMPANYID_COLUMN_BITMASK;
488    
489                    if (!_setOriginalCompanyId) {
490                            _setOriginalCompanyId = true;
491    
492                            _originalCompanyId = _companyId;
493                    }
494    
495                    _companyId = companyId;
496            }
497    
498            public long getOriginalCompanyId() {
499                    return _originalCompanyId;
500            }
501    
502            @JSON
503            @Override
504            public long getUserId() {
505                    return _userId;
506            }
507    
508            @Override
509            public void setUserId(long userId) {
510                    _userId = userId;
511            }
512    
513            @Override
514            public String getUserUuid() {
515                    try {
516                            User user = UserLocalServiceUtil.getUserById(getUserId());
517    
518                            return user.getUuid();
519                    }
520                    catch (PortalException pe) {
521                            return StringPool.BLANK;
522                    }
523            }
524    
525            @Override
526            public void setUserUuid(String userUuid) {
527            }
528    
529            @JSON
530            @Override
531            public String getUserName() {
532                    if (_userName == null) {
533                            return StringPool.BLANK;
534                    }
535                    else {
536                            return _userName;
537                    }
538            }
539    
540            @Override
541            public void setUserName(String userName) {
542                    _userName = userName;
543            }
544    
545            @JSON
546            @Override
547            public Date getCreateDate() {
548                    return _createDate;
549            }
550    
551            @Override
552            public void setCreateDate(Date createDate) {
553                    _createDate = createDate;
554            }
555    
556            @JSON
557            @Override
558            public Date getModifiedDate() {
559                    return _modifiedDate;
560            }
561    
562            @Override
563            public void setModifiedDate(Date modifiedDate) {
564                    _modifiedDate = modifiedDate;
565            }
566    
567            @JSON
568            @Override
569            public long getRepositoryId() {
570                    return _repositoryId;
571            }
572    
573            @Override
574            public void setRepositoryId(long repositoryId) {
575                    _columnBitmask |= REPOSITORYID_COLUMN_BITMASK;
576    
577                    if (!_setOriginalRepositoryId) {
578                            _setOriginalRepositoryId = true;
579    
580                            _originalRepositoryId = _repositoryId;
581                    }
582    
583                    _repositoryId = repositoryId;
584            }
585    
586            public long getOriginalRepositoryId() {
587                    return _originalRepositoryId;
588            }
589    
590            @JSON
591            @Override
592            public boolean getMountPoint() {
593                    return _mountPoint;
594            }
595    
596            @Override
597            public boolean isMountPoint() {
598                    return _mountPoint;
599            }
600    
601            @Override
602            public void setMountPoint(boolean mountPoint) {
603                    _columnBitmask |= MOUNTPOINT_COLUMN_BITMASK;
604    
605                    if (!_setOriginalMountPoint) {
606                            _setOriginalMountPoint = true;
607    
608                            _originalMountPoint = _mountPoint;
609                    }
610    
611                    _mountPoint = mountPoint;
612            }
613    
614            public boolean getOriginalMountPoint() {
615                    return _originalMountPoint;
616            }
617    
618            @JSON
619            @Override
620            public long getParentFolderId() {
621                    return _parentFolderId;
622            }
623    
624            @Override
625            public void setParentFolderId(long parentFolderId) {
626                    _columnBitmask = -1L;
627    
628                    if (!_setOriginalParentFolderId) {
629                            _setOriginalParentFolderId = true;
630    
631                            _originalParentFolderId = _parentFolderId;
632                    }
633    
634                    _parentFolderId = parentFolderId;
635            }
636    
637            public long getOriginalParentFolderId() {
638                    return _originalParentFolderId;
639            }
640    
641            @JSON
642            @Override
643            public String getTreePath() {
644                    if (_treePath == null) {
645                            return StringPool.BLANK;
646                    }
647                    else {
648                            return _treePath;
649                    }
650            }
651    
652            @Override
653            public void setTreePath(String treePath) {
654                    _treePath = treePath;
655            }
656    
657            @JSON
658            @Override
659            public String getName() {
660                    if (_name == null) {
661                            return StringPool.BLANK;
662                    }
663                    else {
664                            return _name;
665                    }
666            }
667    
668            @Override
669            public void setName(String name) {
670                    _columnBitmask = -1L;
671    
672                    if (_originalName == null) {
673                            _originalName = _name;
674                    }
675    
676                    _name = name;
677            }
678    
679            public String getOriginalName() {
680                    return GetterUtil.getString(_originalName);
681            }
682    
683            @JSON
684            @Override
685            public String getDescription() {
686                    if (_description == null) {
687                            return StringPool.BLANK;
688                    }
689                    else {
690                            return _description;
691                    }
692            }
693    
694            @Override
695            public void setDescription(String description) {
696                    _description = description;
697            }
698    
699            @JSON
700            @Override
701            public Date getLastPostDate() {
702                    return _lastPostDate;
703            }
704    
705            @Override
706            public void setLastPostDate(Date lastPostDate) {
707                    _lastPostDate = lastPostDate;
708            }
709    
710            @JSON
711            @Override
712            public long getDefaultFileEntryTypeId() {
713                    return _defaultFileEntryTypeId;
714            }
715    
716            @Override
717            public void setDefaultFileEntryTypeId(long defaultFileEntryTypeId) {
718                    _defaultFileEntryTypeId = defaultFileEntryTypeId;
719            }
720    
721            @JSON
722            @Override
723            public boolean getHidden() {
724                    return _hidden;
725            }
726    
727            @Override
728            public boolean isHidden() {
729                    return _hidden;
730            }
731    
732            @Override
733            public void setHidden(boolean hidden) {
734                    _columnBitmask |= HIDDEN_COLUMN_BITMASK;
735    
736                    if (!_setOriginalHidden) {
737                            _setOriginalHidden = true;
738    
739                            _originalHidden = _hidden;
740                    }
741    
742                    _hidden = hidden;
743            }
744    
745            public boolean getOriginalHidden() {
746                    return _originalHidden;
747            }
748    
749            @JSON
750            @Override
751            public boolean getOverrideFileEntryTypes() {
752                    return _overrideFileEntryTypes;
753            }
754    
755            @Override
756            public boolean isOverrideFileEntryTypes() {
757                    return _overrideFileEntryTypes;
758            }
759    
760            @Override
761            public void setOverrideFileEntryTypes(boolean overrideFileEntryTypes) {
762                    _overrideFileEntryTypes = overrideFileEntryTypes;
763            }
764    
765            @JSON
766            @Override
767            public int getStatus() {
768                    return _status;
769            }
770    
771            @Override
772            public void setStatus(int status) {
773                    _columnBitmask |= STATUS_COLUMN_BITMASK;
774    
775                    if (!_setOriginalStatus) {
776                            _setOriginalStatus = true;
777    
778                            _originalStatus = _status;
779                    }
780    
781                    _status = status;
782            }
783    
784            public int getOriginalStatus() {
785                    return _originalStatus;
786            }
787    
788            @JSON
789            @Override
790            public long getStatusByUserId() {
791                    return _statusByUserId;
792            }
793    
794            @Override
795            public void setStatusByUserId(long statusByUserId) {
796                    _statusByUserId = statusByUserId;
797            }
798    
799            @Override
800            public String getStatusByUserUuid() {
801                    try {
802                            User user = UserLocalServiceUtil.getUserById(getStatusByUserId());
803    
804                            return user.getUuid();
805                    }
806                    catch (PortalException pe) {
807                            return StringPool.BLANK;
808                    }
809            }
810    
811            @Override
812            public void setStatusByUserUuid(String statusByUserUuid) {
813            }
814    
815            @JSON
816            @Override
817            public String getStatusByUserName() {
818                    if (_statusByUserName == null) {
819                            return StringPool.BLANK;
820                    }
821                    else {
822                            return _statusByUserName;
823                    }
824            }
825    
826            @Override
827            public void setStatusByUserName(String statusByUserName) {
828                    _statusByUserName = statusByUserName;
829            }
830    
831            @JSON
832            @Override
833            public Date getStatusDate() {
834                    return _statusDate;
835            }
836    
837            @Override
838            public void setStatusDate(Date statusDate) {
839                    _statusDate = statusDate;
840            }
841    
842            @Override
843            public long getContainerModelId() {
844                    return getFolderId();
845            }
846    
847            @Override
848            public void setContainerModelId(long containerModelId) {
849                    _folderId = containerModelId;
850            }
851    
852            @Override
853            public long getParentContainerModelId() {
854                    return getParentFolderId();
855            }
856    
857            @Override
858            public void setParentContainerModelId(long parentContainerModelId) {
859                    _parentFolderId = parentContainerModelId;
860            }
861    
862            @Override
863            public String getContainerModelName() {
864                    return String.valueOf(getName());
865            }
866    
867            @Override
868            public StagedModelType getStagedModelType() {
869                    return new StagedModelType(PortalUtil.getClassNameId(
870                                    DLFolder.class.getName()));
871            }
872    
873            @Override
874            public TrashEntry getTrashEntry() throws PortalException {
875                    if (!isInTrash()) {
876                            return null;
877                    }
878    
879                    TrashEntry trashEntry = TrashEntryLocalServiceUtil.fetchEntry(getModelClassName(),
880                                    getTrashEntryClassPK());
881    
882                    if (trashEntry != null) {
883                            return trashEntry;
884                    }
885    
886                    TrashHandler trashHandler = getTrashHandler();
887    
888                    if (!Validator.isNull(trashHandler.getContainerModelClassName(
889                                                    getPrimaryKey()))) {
890                            ContainerModel containerModel = null;
891    
892                            try {
893                                    containerModel = trashHandler.getParentContainerModel(this);
894                            }
895                            catch (NoSuchModelException nsme) {
896                                    return null;
897                            }
898    
899                            while (containerModel != null) {
900                                    if (containerModel instanceof TrashedModel) {
901                                            TrashedModel trashedModel = (TrashedModel)containerModel;
902    
903                                            return trashedModel.getTrashEntry();
904                                    }
905    
906                                    trashHandler = TrashHandlerRegistryUtil.getTrashHandler(trashHandler.getContainerModelClassName(
907                                                            containerModel.getContainerModelId()));
908    
909                                    if (trashHandler == null) {
910                                            return null;
911                                    }
912    
913                                    containerModel = trashHandler.getContainerModel(containerModel.getParentContainerModelId());
914                            }
915                    }
916    
917                    return null;
918            }
919    
920            @Override
921            public long getTrashEntryClassPK() {
922                    return getPrimaryKey();
923            }
924    
925            @Override
926            public TrashHandler getTrashHandler() {
927                    return TrashHandlerRegistryUtil.getTrashHandler(getModelClassName());
928            }
929    
930            @Override
931            public boolean isInTrash() {
932                    if (getStatus() == WorkflowConstants.STATUS_IN_TRASH) {
933                            return true;
934                    }
935                    else {
936                            return false;
937                    }
938            }
939    
940            @Override
941            public boolean isInTrashContainer() {
942                    TrashHandler trashHandler = getTrashHandler();
943    
944                    if ((trashHandler == null) ||
945                                    Validator.isNull(trashHandler.getContainerModelClassName(
946                                                    getPrimaryKey()))) {
947                            return false;
948                    }
949    
950                    try {
951                            ContainerModel containerModel = trashHandler.getParentContainerModel(this);
952    
953                            if (containerModel == null) {
954                                    return false;
955                            }
956    
957                            if (containerModel instanceof TrashedModel) {
958                                    return ((TrashedModel)containerModel).isInTrash();
959                            }
960                    }
961                    catch (Exception e) {
962                    }
963    
964                    return false;
965            }
966    
967            @Override
968            public boolean isInTrashExplicitly() {
969                    if (!isInTrash()) {
970                            return false;
971                    }
972    
973                    TrashEntry trashEntry = TrashEntryLocalServiceUtil.fetchEntry(getModelClassName(),
974                                    getTrashEntryClassPK());
975    
976                    if (trashEntry != null) {
977                            return true;
978                    }
979    
980                    return false;
981            }
982    
983            @Override
984            public boolean isInTrashImplicitly() {
985                    if (!isInTrash()) {
986                            return false;
987                    }
988    
989                    TrashEntry trashEntry = TrashEntryLocalServiceUtil.fetchEntry(getModelClassName(),
990                                    getTrashEntryClassPK());
991    
992                    if (trashEntry != null) {
993                            return false;
994                    }
995    
996                    return true;
997            }
998    
999            /**
1000             * @deprecated As of 6.1.0, replaced by {@link #isApproved}
1001             */
1002            @Deprecated
1003            @Override
1004            public boolean getApproved() {
1005                    return isApproved();
1006            }
1007    
1008            @Override
1009            public boolean isApproved() {
1010                    if (getStatus() == WorkflowConstants.STATUS_APPROVED) {
1011                            return true;
1012                    }
1013                    else {
1014                            return false;
1015                    }
1016            }
1017    
1018            @Override
1019            public boolean isDenied() {
1020                    if (getStatus() == WorkflowConstants.STATUS_DENIED) {
1021                            return true;
1022                    }
1023                    else {
1024                            return false;
1025                    }
1026            }
1027    
1028            @Override
1029            public boolean isDraft() {
1030                    if (getStatus() == WorkflowConstants.STATUS_DRAFT) {
1031                            return true;
1032                    }
1033                    else {
1034                            return false;
1035                    }
1036            }
1037    
1038            @Override
1039            public boolean isExpired() {
1040                    if (getStatus() == WorkflowConstants.STATUS_EXPIRED) {
1041                            return true;
1042                    }
1043                    else {
1044                            return false;
1045                    }
1046            }
1047    
1048            @Override
1049            public boolean isInactive() {
1050                    if (getStatus() == WorkflowConstants.STATUS_INACTIVE) {
1051                            return true;
1052                    }
1053                    else {
1054                            return false;
1055                    }
1056            }
1057    
1058            @Override
1059            public boolean isIncomplete() {
1060                    if (getStatus() == WorkflowConstants.STATUS_INCOMPLETE) {
1061                            return true;
1062                    }
1063                    else {
1064                            return false;
1065                    }
1066            }
1067    
1068            @Override
1069            public boolean isPending() {
1070                    if (getStatus() == WorkflowConstants.STATUS_PENDING) {
1071                            return true;
1072                    }
1073                    else {
1074                            return false;
1075                    }
1076            }
1077    
1078            @Override
1079            public boolean isScheduled() {
1080                    if (getStatus() == WorkflowConstants.STATUS_SCHEDULED) {
1081                            return true;
1082                    }
1083                    else {
1084                            return false;
1085                    }
1086            }
1087    
1088            public long getColumnBitmask() {
1089                    return _columnBitmask;
1090            }
1091    
1092            @Override
1093            public ExpandoBridge getExpandoBridge() {
1094                    return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(),
1095                            DLFolder.class.getName(), getPrimaryKey());
1096            }
1097    
1098            @Override
1099            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
1100                    ExpandoBridge expandoBridge = getExpandoBridge();
1101    
1102                    expandoBridge.setAttributes(serviceContext);
1103            }
1104    
1105            @Override
1106            public DLFolder toEscapedModel() {
1107                    if (_escapedModel == null) {
1108                            _escapedModel = (DLFolder)ProxyUtil.newProxyInstance(_classLoader,
1109                                            _escapedModelInterfaces, new AutoEscapeBeanHandler(this));
1110                    }
1111    
1112                    return _escapedModel;
1113            }
1114    
1115            @Override
1116            public Object clone() {
1117                    DLFolderImpl dlFolderImpl = new DLFolderImpl();
1118    
1119                    dlFolderImpl.setUuid(getUuid());
1120                    dlFolderImpl.setFolderId(getFolderId());
1121                    dlFolderImpl.setGroupId(getGroupId());
1122                    dlFolderImpl.setCompanyId(getCompanyId());
1123                    dlFolderImpl.setUserId(getUserId());
1124                    dlFolderImpl.setUserName(getUserName());
1125                    dlFolderImpl.setCreateDate(getCreateDate());
1126                    dlFolderImpl.setModifiedDate(getModifiedDate());
1127                    dlFolderImpl.setRepositoryId(getRepositoryId());
1128                    dlFolderImpl.setMountPoint(getMountPoint());
1129                    dlFolderImpl.setParentFolderId(getParentFolderId());
1130                    dlFolderImpl.setTreePath(getTreePath());
1131                    dlFolderImpl.setName(getName());
1132                    dlFolderImpl.setDescription(getDescription());
1133                    dlFolderImpl.setLastPostDate(getLastPostDate());
1134                    dlFolderImpl.setDefaultFileEntryTypeId(getDefaultFileEntryTypeId());
1135                    dlFolderImpl.setHidden(getHidden());
1136                    dlFolderImpl.setOverrideFileEntryTypes(getOverrideFileEntryTypes());
1137                    dlFolderImpl.setStatus(getStatus());
1138                    dlFolderImpl.setStatusByUserId(getStatusByUserId());
1139                    dlFolderImpl.setStatusByUserName(getStatusByUserName());
1140                    dlFolderImpl.setStatusDate(getStatusDate());
1141    
1142                    dlFolderImpl.resetOriginalValues();
1143    
1144                    return dlFolderImpl;
1145            }
1146    
1147            @Override
1148            public int compareTo(DLFolder dlFolder) {
1149                    int value = 0;
1150    
1151                    if (getParentFolderId() < dlFolder.getParentFolderId()) {
1152                            value = -1;
1153                    }
1154                    else if (getParentFolderId() > dlFolder.getParentFolderId()) {
1155                            value = 1;
1156                    }
1157                    else {
1158                            value = 0;
1159                    }
1160    
1161                    if (value != 0) {
1162                            return value;
1163                    }
1164    
1165                    value = getName().compareToIgnoreCase(dlFolder.getName());
1166    
1167                    if (value != 0) {
1168                            return value;
1169                    }
1170    
1171                    return 0;
1172            }
1173    
1174            @Override
1175            public boolean equals(Object obj) {
1176                    if (this == obj) {
1177                            return true;
1178                    }
1179    
1180                    if (!(obj instanceof DLFolder)) {
1181                            return false;
1182                    }
1183    
1184                    DLFolder dlFolder = (DLFolder)obj;
1185    
1186                    long primaryKey = dlFolder.getPrimaryKey();
1187    
1188                    if (getPrimaryKey() == primaryKey) {
1189                            return true;
1190                    }
1191                    else {
1192                            return false;
1193                    }
1194            }
1195    
1196            @Override
1197            public int hashCode() {
1198                    return (int)getPrimaryKey();
1199            }
1200    
1201            @Override
1202            public boolean isEntityCacheEnabled() {
1203                    return ENTITY_CACHE_ENABLED;
1204            }
1205    
1206            @Override
1207            public boolean isFinderCacheEnabled() {
1208                    return FINDER_CACHE_ENABLED;
1209            }
1210    
1211            @Override
1212            public void resetOriginalValues() {
1213                    DLFolderModelImpl dlFolderModelImpl = this;
1214    
1215                    dlFolderModelImpl._originalUuid = dlFolderModelImpl._uuid;
1216    
1217                    dlFolderModelImpl._originalFolderId = dlFolderModelImpl._folderId;
1218    
1219                    dlFolderModelImpl._setOriginalFolderId = false;
1220    
1221                    dlFolderModelImpl._originalGroupId = dlFolderModelImpl._groupId;
1222    
1223                    dlFolderModelImpl._setOriginalGroupId = false;
1224    
1225                    dlFolderModelImpl._originalCompanyId = dlFolderModelImpl._companyId;
1226    
1227                    dlFolderModelImpl._setOriginalCompanyId = false;
1228    
1229                    dlFolderModelImpl._originalRepositoryId = dlFolderModelImpl._repositoryId;
1230    
1231                    dlFolderModelImpl._setOriginalRepositoryId = false;
1232    
1233                    dlFolderModelImpl._originalMountPoint = dlFolderModelImpl._mountPoint;
1234    
1235                    dlFolderModelImpl._setOriginalMountPoint = false;
1236    
1237                    dlFolderModelImpl._originalParentFolderId = dlFolderModelImpl._parentFolderId;
1238    
1239                    dlFolderModelImpl._setOriginalParentFolderId = false;
1240    
1241                    dlFolderModelImpl._originalName = dlFolderModelImpl._name;
1242    
1243                    dlFolderModelImpl._originalHidden = dlFolderModelImpl._hidden;
1244    
1245                    dlFolderModelImpl._setOriginalHidden = false;
1246    
1247                    dlFolderModelImpl._originalStatus = dlFolderModelImpl._status;
1248    
1249                    dlFolderModelImpl._setOriginalStatus = false;
1250    
1251                    dlFolderModelImpl._columnBitmask = 0;
1252            }
1253    
1254            @Override
1255            public CacheModel<DLFolder> toCacheModel() {
1256                    DLFolderCacheModel dlFolderCacheModel = new DLFolderCacheModel();
1257    
1258                    dlFolderCacheModel.uuid = getUuid();
1259    
1260                    String uuid = dlFolderCacheModel.uuid;
1261    
1262                    if ((uuid != null) && (uuid.length() == 0)) {
1263                            dlFolderCacheModel.uuid = null;
1264                    }
1265    
1266                    dlFolderCacheModel.folderId = getFolderId();
1267    
1268                    dlFolderCacheModel.groupId = getGroupId();
1269    
1270                    dlFolderCacheModel.companyId = getCompanyId();
1271    
1272                    dlFolderCacheModel.userId = getUserId();
1273    
1274                    dlFolderCacheModel.userName = getUserName();
1275    
1276                    String userName = dlFolderCacheModel.userName;
1277    
1278                    if ((userName != null) && (userName.length() == 0)) {
1279                            dlFolderCacheModel.userName = null;
1280                    }
1281    
1282                    Date createDate = getCreateDate();
1283    
1284                    if (createDate != null) {
1285                            dlFolderCacheModel.createDate = createDate.getTime();
1286                    }
1287                    else {
1288                            dlFolderCacheModel.createDate = Long.MIN_VALUE;
1289                    }
1290    
1291                    Date modifiedDate = getModifiedDate();
1292    
1293                    if (modifiedDate != null) {
1294                            dlFolderCacheModel.modifiedDate = modifiedDate.getTime();
1295                    }
1296                    else {
1297                            dlFolderCacheModel.modifiedDate = Long.MIN_VALUE;
1298                    }
1299    
1300                    dlFolderCacheModel.repositoryId = getRepositoryId();
1301    
1302                    dlFolderCacheModel.mountPoint = getMountPoint();
1303    
1304                    dlFolderCacheModel.parentFolderId = getParentFolderId();
1305    
1306                    dlFolderCacheModel.treePath = getTreePath();
1307    
1308                    String treePath = dlFolderCacheModel.treePath;
1309    
1310                    if ((treePath != null) && (treePath.length() == 0)) {
1311                            dlFolderCacheModel.treePath = null;
1312                    }
1313    
1314                    dlFolderCacheModel.name = getName();
1315    
1316                    String name = dlFolderCacheModel.name;
1317    
1318                    if ((name != null) && (name.length() == 0)) {
1319                            dlFolderCacheModel.name = null;
1320                    }
1321    
1322                    dlFolderCacheModel.description = getDescription();
1323    
1324                    String description = dlFolderCacheModel.description;
1325    
1326                    if ((description != null) && (description.length() == 0)) {
1327                            dlFolderCacheModel.description = null;
1328                    }
1329    
1330                    Date lastPostDate = getLastPostDate();
1331    
1332                    if (lastPostDate != null) {
1333                            dlFolderCacheModel.lastPostDate = lastPostDate.getTime();
1334                    }
1335                    else {
1336                            dlFolderCacheModel.lastPostDate = Long.MIN_VALUE;
1337                    }
1338    
1339                    dlFolderCacheModel.defaultFileEntryTypeId = getDefaultFileEntryTypeId();
1340    
1341                    dlFolderCacheModel.hidden = getHidden();
1342    
1343                    dlFolderCacheModel.overrideFileEntryTypes = getOverrideFileEntryTypes();
1344    
1345                    dlFolderCacheModel.status = getStatus();
1346    
1347                    dlFolderCacheModel.statusByUserId = getStatusByUserId();
1348    
1349                    dlFolderCacheModel.statusByUserName = getStatusByUserName();
1350    
1351                    String statusByUserName = dlFolderCacheModel.statusByUserName;
1352    
1353                    if ((statusByUserName != null) && (statusByUserName.length() == 0)) {
1354                            dlFolderCacheModel.statusByUserName = null;
1355                    }
1356    
1357                    Date statusDate = getStatusDate();
1358    
1359                    if (statusDate != null) {
1360                            dlFolderCacheModel.statusDate = statusDate.getTime();
1361                    }
1362                    else {
1363                            dlFolderCacheModel.statusDate = Long.MIN_VALUE;
1364                    }
1365    
1366                    return dlFolderCacheModel;
1367            }
1368    
1369            @Override
1370            public String toString() {
1371                    StringBundler sb = new StringBundler(45);
1372    
1373                    sb.append("{uuid=");
1374                    sb.append(getUuid());
1375                    sb.append(", folderId=");
1376                    sb.append(getFolderId());
1377                    sb.append(", groupId=");
1378                    sb.append(getGroupId());
1379                    sb.append(", companyId=");
1380                    sb.append(getCompanyId());
1381                    sb.append(", userId=");
1382                    sb.append(getUserId());
1383                    sb.append(", userName=");
1384                    sb.append(getUserName());
1385                    sb.append(", createDate=");
1386                    sb.append(getCreateDate());
1387                    sb.append(", modifiedDate=");
1388                    sb.append(getModifiedDate());
1389                    sb.append(", repositoryId=");
1390                    sb.append(getRepositoryId());
1391                    sb.append(", mountPoint=");
1392                    sb.append(getMountPoint());
1393                    sb.append(", parentFolderId=");
1394                    sb.append(getParentFolderId());
1395                    sb.append(", treePath=");
1396                    sb.append(getTreePath());
1397                    sb.append(", name=");
1398                    sb.append(getName());
1399                    sb.append(", description=");
1400                    sb.append(getDescription());
1401                    sb.append(", lastPostDate=");
1402                    sb.append(getLastPostDate());
1403                    sb.append(", defaultFileEntryTypeId=");
1404                    sb.append(getDefaultFileEntryTypeId());
1405                    sb.append(", hidden=");
1406                    sb.append(getHidden());
1407                    sb.append(", overrideFileEntryTypes=");
1408                    sb.append(getOverrideFileEntryTypes());
1409                    sb.append(", status=");
1410                    sb.append(getStatus());
1411                    sb.append(", statusByUserId=");
1412                    sb.append(getStatusByUserId());
1413                    sb.append(", statusByUserName=");
1414                    sb.append(getStatusByUserName());
1415                    sb.append(", statusDate=");
1416                    sb.append(getStatusDate());
1417                    sb.append("}");
1418    
1419                    return sb.toString();
1420            }
1421    
1422            @Override
1423            public String toXmlString() {
1424                    StringBundler sb = new StringBundler(70);
1425    
1426                    sb.append("<model><model-name>");
1427                    sb.append("com.liferay.portlet.documentlibrary.model.DLFolder");
1428                    sb.append("</model-name>");
1429    
1430                    sb.append(
1431                            "<column><column-name>uuid</column-name><column-value><![CDATA[");
1432                    sb.append(getUuid());
1433                    sb.append("]]></column-value></column>");
1434                    sb.append(
1435                            "<column><column-name>folderId</column-name><column-value><![CDATA[");
1436                    sb.append(getFolderId());
1437                    sb.append("]]></column-value></column>");
1438                    sb.append(
1439                            "<column><column-name>groupId</column-name><column-value><![CDATA[");
1440                    sb.append(getGroupId());
1441                    sb.append("]]></column-value></column>");
1442                    sb.append(
1443                            "<column><column-name>companyId</column-name><column-value><![CDATA[");
1444                    sb.append(getCompanyId());
1445                    sb.append("]]></column-value></column>");
1446                    sb.append(
1447                            "<column><column-name>userId</column-name><column-value><![CDATA[");
1448                    sb.append(getUserId());
1449                    sb.append("]]></column-value></column>");
1450                    sb.append(
1451                            "<column><column-name>userName</column-name><column-value><![CDATA[");
1452                    sb.append(getUserName());
1453                    sb.append("]]></column-value></column>");
1454                    sb.append(
1455                            "<column><column-name>createDate</column-name><column-value><![CDATA[");
1456                    sb.append(getCreateDate());
1457                    sb.append("]]></column-value></column>");
1458                    sb.append(
1459                            "<column><column-name>modifiedDate</column-name><column-value><![CDATA[");
1460                    sb.append(getModifiedDate());
1461                    sb.append("]]></column-value></column>");
1462                    sb.append(
1463                            "<column><column-name>repositoryId</column-name><column-value><![CDATA[");
1464                    sb.append(getRepositoryId());
1465                    sb.append("]]></column-value></column>");
1466                    sb.append(
1467                            "<column><column-name>mountPoint</column-name><column-value><![CDATA[");
1468                    sb.append(getMountPoint());
1469                    sb.append("]]></column-value></column>");
1470                    sb.append(
1471                            "<column><column-name>parentFolderId</column-name><column-value><![CDATA[");
1472                    sb.append(getParentFolderId());
1473                    sb.append("]]></column-value></column>");
1474                    sb.append(
1475                            "<column><column-name>treePath</column-name><column-value><![CDATA[");
1476                    sb.append(getTreePath());
1477                    sb.append("]]></column-value></column>");
1478                    sb.append(
1479                            "<column><column-name>name</column-name><column-value><![CDATA[");
1480                    sb.append(getName());
1481                    sb.append("]]></column-value></column>");
1482                    sb.append(
1483                            "<column><column-name>description</column-name><column-value><![CDATA[");
1484                    sb.append(getDescription());
1485                    sb.append("]]></column-value></column>");
1486                    sb.append(
1487                            "<column><column-name>lastPostDate</column-name><column-value><![CDATA[");
1488                    sb.append(getLastPostDate());
1489                    sb.append("]]></column-value></column>");
1490                    sb.append(
1491                            "<column><column-name>defaultFileEntryTypeId</column-name><column-value><![CDATA[");
1492                    sb.append(getDefaultFileEntryTypeId());
1493                    sb.append("]]></column-value></column>");
1494                    sb.append(
1495                            "<column><column-name>hidden</column-name><column-value><![CDATA[");
1496                    sb.append(getHidden());
1497                    sb.append("]]></column-value></column>");
1498                    sb.append(
1499                            "<column><column-name>overrideFileEntryTypes</column-name><column-value><![CDATA[");
1500                    sb.append(getOverrideFileEntryTypes());
1501                    sb.append("]]></column-value></column>");
1502                    sb.append(
1503                            "<column><column-name>status</column-name><column-value><![CDATA[");
1504                    sb.append(getStatus());
1505                    sb.append("]]></column-value></column>");
1506                    sb.append(
1507                            "<column><column-name>statusByUserId</column-name><column-value><![CDATA[");
1508                    sb.append(getStatusByUserId());
1509                    sb.append("]]></column-value></column>");
1510                    sb.append(
1511                            "<column><column-name>statusByUserName</column-name><column-value><![CDATA[");
1512                    sb.append(getStatusByUserName());
1513                    sb.append("]]></column-value></column>");
1514                    sb.append(
1515                            "<column><column-name>statusDate</column-name><column-value><![CDATA[");
1516                    sb.append(getStatusDate());
1517                    sb.append("]]></column-value></column>");
1518    
1519                    sb.append("</model>");
1520    
1521                    return sb.toString();
1522            }
1523    
1524            private static final ClassLoader _classLoader = DLFolder.class.getClassLoader();
1525            private static final Class<?>[] _escapedModelInterfaces = new Class[] {
1526                            DLFolder.class
1527                    };
1528            private String _uuid;
1529            private String _originalUuid;
1530            private long _folderId;
1531            private long _originalFolderId;
1532            private boolean _setOriginalFolderId;
1533            private long _groupId;
1534            private long _originalGroupId;
1535            private boolean _setOriginalGroupId;
1536            private long _companyId;
1537            private long _originalCompanyId;
1538            private boolean _setOriginalCompanyId;
1539            private long _userId;
1540            private String _userName;
1541            private Date _createDate;
1542            private Date _modifiedDate;
1543            private long _repositoryId;
1544            private long _originalRepositoryId;
1545            private boolean _setOriginalRepositoryId;
1546            private boolean _mountPoint;
1547            private boolean _originalMountPoint;
1548            private boolean _setOriginalMountPoint;
1549            private long _parentFolderId;
1550            private long _originalParentFolderId;
1551            private boolean _setOriginalParentFolderId;
1552            private String _treePath;
1553            private String _name;
1554            private String _originalName;
1555            private String _description;
1556            private Date _lastPostDate;
1557            private long _defaultFileEntryTypeId;
1558            private boolean _hidden;
1559            private boolean _originalHidden;
1560            private boolean _setOriginalHidden;
1561            private boolean _overrideFileEntryTypes;
1562            private int _status;
1563            private int _originalStatus;
1564            private boolean _setOriginalStatus;
1565            private long _statusByUserId;
1566            private String _statusByUserName;
1567            private Date _statusDate;
1568            private long _columnBitmask;
1569            private DLFolder _escapedModel;
1570    }