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