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