001
014
015 package com.liferay.portlet.documentlibrary.model;
016
017 import com.liferay.portal.model.ModelWrapper;
018
019 import java.util.Date;
020 import java.util.HashMap;
021 import java.util.Map;
022
023
032 public class DLFileEntryWrapper implements DLFileEntry,
033 ModelWrapper<DLFileEntry> {
034 public DLFileEntryWrapper(DLFileEntry dlFileEntry) {
035 _dlFileEntry = dlFileEntry;
036 }
037
038 public Class<?> getModelClass() {
039 return DLFileEntry.class;
040 }
041
042 public String getModelClassName() {
043 return DLFileEntry.class.getName();
044 }
045
046 public Map<String, Object> getModelAttributes() {
047 Map<String, Object> attributes = new HashMap<String, Object>();
048
049 attributes.put("uuid", getUuid());
050 attributes.put("fileEntryId", getFileEntryId());
051 attributes.put("groupId", getGroupId());
052 attributes.put("companyId", getCompanyId());
053 attributes.put("userId", getUserId());
054 attributes.put("userName", getUserName());
055 attributes.put("versionUserId", getVersionUserId());
056 attributes.put("versionUserName", getVersionUserName());
057 attributes.put("createDate", getCreateDate());
058 attributes.put("modifiedDate", getModifiedDate());
059 attributes.put("repositoryId", getRepositoryId());
060 attributes.put("folderId", getFolderId());
061 attributes.put("name", getName());
062 attributes.put("extension", getExtension());
063 attributes.put("mimeType", getMimeType());
064 attributes.put("title", getTitle());
065 attributes.put("description", getDescription());
066 attributes.put("extraSettings", getExtraSettings());
067 attributes.put("fileEntryTypeId", getFileEntryTypeId());
068 attributes.put("version", getVersion());
069 attributes.put("size", getSize());
070 attributes.put("readCount", getReadCount());
071 attributes.put("smallImageId", getSmallImageId());
072 attributes.put("largeImageId", getLargeImageId());
073 attributes.put("custom1ImageId", getCustom1ImageId());
074 attributes.put("custom2ImageId", getCustom2ImageId());
075 attributes.put("manualCheckInRequired", getManualCheckInRequired());
076
077 return attributes;
078 }
079
080 public void setModelAttributes(Map<String, Object> attributes) {
081 String uuid = (String)attributes.get("uuid");
082
083 if (uuid != null) {
084 setUuid(uuid);
085 }
086
087 Long fileEntryId = (Long)attributes.get("fileEntryId");
088
089 if (fileEntryId != null) {
090 setFileEntryId(fileEntryId);
091 }
092
093 Long groupId = (Long)attributes.get("groupId");
094
095 if (groupId != null) {
096 setGroupId(groupId);
097 }
098
099 Long companyId = (Long)attributes.get("companyId");
100
101 if (companyId != null) {
102 setCompanyId(companyId);
103 }
104
105 Long userId = (Long)attributes.get("userId");
106
107 if (userId != null) {
108 setUserId(userId);
109 }
110
111 String userName = (String)attributes.get("userName");
112
113 if (userName != null) {
114 setUserName(userName);
115 }
116
117 Long versionUserId = (Long)attributes.get("versionUserId");
118
119 if (versionUserId != null) {
120 setVersionUserId(versionUserId);
121 }
122
123 String versionUserName = (String)attributes.get("versionUserName");
124
125 if (versionUserName != null) {
126 setVersionUserName(versionUserName);
127 }
128
129 Date createDate = (Date)attributes.get("createDate");
130
131 if (createDate != null) {
132 setCreateDate(createDate);
133 }
134
135 Date modifiedDate = (Date)attributes.get("modifiedDate");
136
137 if (modifiedDate != null) {
138 setModifiedDate(modifiedDate);
139 }
140
141 Long repositoryId = (Long)attributes.get("repositoryId");
142
143 if (repositoryId != null) {
144 setRepositoryId(repositoryId);
145 }
146
147 Long folderId = (Long)attributes.get("folderId");
148
149 if (folderId != null) {
150 setFolderId(folderId);
151 }
152
153 String name = (String)attributes.get("name");
154
155 if (name != null) {
156 setName(name);
157 }
158
159 String extension = (String)attributes.get("extension");
160
161 if (extension != null) {
162 setExtension(extension);
163 }
164
165 String mimeType = (String)attributes.get("mimeType");
166
167 if (mimeType != null) {
168 setMimeType(mimeType);
169 }
170
171 String title = (String)attributes.get("title");
172
173 if (title != null) {
174 setTitle(title);
175 }
176
177 String description = (String)attributes.get("description");
178
179 if (description != null) {
180 setDescription(description);
181 }
182
183 String extraSettings = (String)attributes.get("extraSettings");
184
185 if (extraSettings != null) {
186 setExtraSettings(extraSettings);
187 }
188
189 Long fileEntryTypeId = (Long)attributes.get("fileEntryTypeId");
190
191 if (fileEntryTypeId != null) {
192 setFileEntryTypeId(fileEntryTypeId);
193 }
194
195 String version = (String)attributes.get("version");
196
197 if (version != null) {
198 setVersion(version);
199 }
200
201 Long size = (Long)attributes.get("size");
202
203 if (size != null) {
204 setSize(size);
205 }
206
207 Integer readCount = (Integer)attributes.get("readCount");
208
209 if (readCount != null) {
210 setReadCount(readCount);
211 }
212
213 Long smallImageId = (Long)attributes.get("smallImageId");
214
215 if (smallImageId != null) {
216 setSmallImageId(smallImageId);
217 }
218
219 Long largeImageId = (Long)attributes.get("largeImageId");
220
221 if (largeImageId != null) {
222 setLargeImageId(largeImageId);
223 }
224
225 Long custom1ImageId = (Long)attributes.get("custom1ImageId");
226
227 if (custom1ImageId != null) {
228 setCustom1ImageId(custom1ImageId);
229 }
230
231 Long custom2ImageId = (Long)attributes.get("custom2ImageId");
232
233 if (custom2ImageId != null) {
234 setCustom2ImageId(custom2ImageId);
235 }
236
237 Boolean manualCheckInRequired = (Boolean)attributes.get(
238 "manualCheckInRequired");
239
240 if (manualCheckInRequired != null) {
241 setManualCheckInRequired(manualCheckInRequired);
242 }
243 }
244
245
250 public long getPrimaryKey() {
251 return _dlFileEntry.getPrimaryKey();
252 }
253
254
259 public void setPrimaryKey(long primaryKey) {
260 _dlFileEntry.setPrimaryKey(primaryKey);
261 }
262
263
268 public java.lang.String getUuid() {
269 return _dlFileEntry.getUuid();
270 }
271
272
277 public void setUuid(java.lang.String uuid) {
278 _dlFileEntry.setUuid(uuid);
279 }
280
281
286 public long getFileEntryId() {
287 return _dlFileEntry.getFileEntryId();
288 }
289
290
295 public void setFileEntryId(long fileEntryId) {
296 _dlFileEntry.setFileEntryId(fileEntryId);
297 }
298
299
304 public long getGroupId() {
305 return _dlFileEntry.getGroupId();
306 }
307
308
313 public void setGroupId(long groupId) {
314 _dlFileEntry.setGroupId(groupId);
315 }
316
317
322 public long getCompanyId() {
323 return _dlFileEntry.getCompanyId();
324 }
325
326
331 public void setCompanyId(long companyId) {
332 _dlFileEntry.setCompanyId(companyId);
333 }
334
335
340 public long getUserId() {
341 return _dlFileEntry.getUserId();
342 }
343
344
349 public void setUserId(long userId) {
350 _dlFileEntry.setUserId(userId);
351 }
352
353
359 public java.lang.String getUserUuid()
360 throws com.liferay.portal.kernel.exception.SystemException {
361 return _dlFileEntry.getUserUuid();
362 }
363
364
369 public void setUserUuid(java.lang.String userUuid) {
370 _dlFileEntry.setUserUuid(userUuid);
371 }
372
373
378 public java.lang.String getUserName() {
379 return _dlFileEntry.getUserName();
380 }
381
382
387 public void setUserName(java.lang.String userName) {
388 _dlFileEntry.setUserName(userName);
389 }
390
391
396 public long getVersionUserId() {
397 return _dlFileEntry.getVersionUserId();
398 }
399
400
405 public void setVersionUserId(long versionUserId) {
406 _dlFileEntry.setVersionUserId(versionUserId);
407 }
408
409
415 public java.lang.String getVersionUserUuid()
416 throws com.liferay.portal.kernel.exception.SystemException {
417 return _dlFileEntry.getVersionUserUuid();
418 }
419
420
425 public void setVersionUserUuid(java.lang.String versionUserUuid) {
426 _dlFileEntry.setVersionUserUuid(versionUserUuid);
427 }
428
429
434 public java.lang.String getVersionUserName() {
435 return _dlFileEntry.getVersionUserName();
436 }
437
438
443 public void setVersionUserName(java.lang.String versionUserName) {
444 _dlFileEntry.setVersionUserName(versionUserName);
445 }
446
447
452 public java.util.Date getCreateDate() {
453 return _dlFileEntry.getCreateDate();
454 }
455
456
461 public void setCreateDate(java.util.Date createDate) {
462 _dlFileEntry.setCreateDate(createDate);
463 }
464
465
470 public java.util.Date getModifiedDate() {
471 return _dlFileEntry.getModifiedDate();
472 }
473
474
479 public void setModifiedDate(java.util.Date modifiedDate) {
480 _dlFileEntry.setModifiedDate(modifiedDate);
481 }
482
483
488 public long getRepositoryId() {
489 return _dlFileEntry.getRepositoryId();
490 }
491
492
497 public void setRepositoryId(long repositoryId) {
498 _dlFileEntry.setRepositoryId(repositoryId);
499 }
500
501
506 public long getFolderId() {
507 return _dlFileEntry.getFolderId();
508 }
509
510
515 public void setFolderId(long folderId) {
516 _dlFileEntry.setFolderId(folderId);
517 }
518
519
524 public java.lang.String getName() {
525 return _dlFileEntry.getName();
526 }
527
528
533 public void setName(java.lang.String name) {
534 _dlFileEntry.setName(name);
535 }
536
537
542 public java.lang.String getExtension() {
543 return _dlFileEntry.getExtension();
544 }
545
546
551 public void setExtension(java.lang.String extension) {
552 _dlFileEntry.setExtension(extension);
553 }
554
555
560 public java.lang.String getMimeType() {
561 return _dlFileEntry.getMimeType();
562 }
563
564
569 public void setMimeType(java.lang.String mimeType) {
570 _dlFileEntry.setMimeType(mimeType);
571 }
572
573
578 public java.lang.String getTitle() {
579 return _dlFileEntry.getTitle();
580 }
581
582
587 public void setTitle(java.lang.String title) {
588 _dlFileEntry.setTitle(title);
589 }
590
591
596 public java.lang.String getDescription() {
597 return _dlFileEntry.getDescription();
598 }
599
600
605 public void setDescription(java.lang.String description) {
606 _dlFileEntry.setDescription(description);
607 }
608
609
614 public java.lang.String getExtraSettings() {
615 return _dlFileEntry.getExtraSettings();
616 }
617
618
623 public void setExtraSettings(java.lang.String extraSettings) {
624 _dlFileEntry.setExtraSettings(extraSettings);
625 }
626
627
632 public long getFileEntryTypeId() {
633 return _dlFileEntry.getFileEntryTypeId();
634 }
635
636
641 public void setFileEntryTypeId(long fileEntryTypeId) {
642 _dlFileEntry.setFileEntryTypeId(fileEntryTypeId);
643 }
644
645
650 public java.lang.String getVersion() {
651 return _dlFileEntry.getVersion();
652 }
653
654
659 public void setVersion(java.lang.String version) {
660 _dlFileEntry.setVersion(version);
661 }
662
663
668 public long getSize() {
669 return _dlFileEntry.getSize();
670 }
671
672
677 public void setSize(long size) {
678 _dlFileEntry.setSize(size);
679 }
680
681
686 public int getReadCount() {
687 return _dlFileEntry.getReadCount();
688 }
689
690
695 public void setReadCount(int readCount) {
696 _dlFileEntry.setReadCount(readCount);
697 }
698
699
704 public long getSmallImageId() {
705 return _dlFileEntry.getSmallImageId();
706 }
707
708
713 public void setSmallImageId(long smallImageId) {
714 _dlFileEntry.setSmallImageId(smallImageId);
715 }
716
717
722 public long getLargeImageId() {
723 return _dlFileEntry.getLargeImageId();
724 }
725
726
731 public void setLargeImageId(long largeImageId) {
732 _dlFileEntry.setLargeImageId(largeImageId);
733 }
734
735
740 public long getCustom1ImageId() {
741 return _dlFileEntry.getCustom1ImageId();
742 }
743
744
749 public void setCustom1ImageId(long custom1ImageId) {
750 _dlFileEntry.setCustom1ImageId(custom1ImageId);
751 }
752
753
758 public long getCustom2ImageId() {
759 return _dlFileEntry.getCustom2ImageId();
760 }
761
762
767 public void setCustom2ImageId(long custom2ImageId) {
768 _dlFileEntry.setCustom2ImageId(custom2ImageId);
769 }
770
771
776 public boolean getManualCheckInRequired() {
777 return _dlFileEntry.getManualCheckInRequired();
778 }
779
780
785 public boolean isManualCheckInRequired() {
786 return _dlFileEntry.isManualCheckInRequired();
787 }
788
789
794 public void setManualCheckInRequired(boolean manualCheckInRequired) {
795 _dlFileEntry.setManualCheckInRequired(manualCheckInRequired);
796 }
797
798 public boolean isNew() {
799 return _dlFileEntry.isNew();
800 }
801
802 public void setNew(boolean n) {
803 _dlFileEntry.setNew(n);
804 }
805
806 public boolean isCachedModel() {
807 return _dlFileEntry.isCachedModel();
808 }
809
810 public void setCachedModel(boolean cachedModel) {
811 _dlFileEntry.setCachedModel(cachedModel);
812 }
813
814 public boolean isEscapedModel() {
815 return _dlFileEntry.isEscapedModel();
816 }
817
818 public java.io.Serializable getPrimaryKeyObj() {
819 return _dlFileEntry.getPrimaryKeyObj();
820 }
821
822 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
823 _dlFileEntry.setPrimaryKeyObj(primaryKeyObj);
824 }
825
826 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
827 return _dlFileEntry.getExpandoBridge();
828 }
829
830 public void setExpandoBridgeAttributes(
831 com.liferay.portal.service.ServiceContext serviceContext) {
832 _dlFileEntry.setExpandoBridgeAttributes(serviceContext);
833 }
834
835 @Override
836 public java.lang.Object clone() {
837 return new DLFileEntryWrapper((DLFileEntry)_dlFileEntry.clone());
838 }
839
840 public int compareTo(
841 com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry) {
842 return _dlFileEntry.compareTo(dlFileEntry);
843 }
844
845 @Override
846 public int hashCode() {
847 return _dlFileEntry.hashCode();
848 }
849
850 public com.liferay.portal.model.CacheModel<com.liferay.portlet.documentlibrary.model.DLFileEntry> toCacheModel() {
851 return _dlFileEntry.toCacheModel();
852 }
853
854 public com.liferay.portlet.documentlibrary.model.DLFileEntry toEscapedModel() {
855 return new DLFileEntryWrapper(_dlFileEntry.toEscapedModel());
856 }
857
858 public com.liferay.portlet.documentlibrary.model.DLFileEntry toUnescapedModel() {
859 return new DLFileEntryWrapper(_dlFileEntry.toUnescapedModel());
860 }
861
862 @Override
863 public java.lang.String toString() {
864 return _dlFileEntry.toString();
865 }
866
867 public java.lang.String toXmlString() {
868 return _dlFileEntry.toXmlString();
869 }
870
871 public void persist()
872 throws com.liferay.portal.kernel.exception.SystemException {
873 _dlFileEntry.persist();
874 }
875
876 public java.io.InputStream getContentStream()
877 throws com.liferay.portal.kernel.exception.PortalException,
878 com.liferay.portal.kernel.exception.SystemException {
879 return _dlFileEntry.getContentStream();
880 }
881
882 public java.io.InputStream getContentStream(java.lang.String version)
883 throws com.liferay.portal.kernel.exception.PortalException,
884 com.liferay.portal.kernel.exception.SystemException {
885 return _dlFileEntry.getContentStream(version);
886 }
887
888 public long getDataRepositoryId() {
889 return _dlFileEntry.getDataRepositoryId();
890 }
891
892 public com.liferay.portal.kernel.util.UnicodeProperties getExtraSettingsProperties() {
893 return _dlFileEntry.getExtraSettingsProperties();
894 }
895
896 public java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> getFieldsMap(
897 long fileVersionId)
898 throws com.liferay.portal.kernel.exception.PortalException,
899 com.liferay.portal.kernel.exception.SystemException {
900 return _dlFileEntry.getFieldsMap(fileVersionId);
901 }
902
903 public com.liferay.portlet.documentlibrary.model.DLFileVersion getFileVersion()
904 throws com.liferay.portal.kernel.exception.PortalException,
905 com.liferay.portal.kernel.exception.SystemException {
906 return _dlFileEntry.getFileVersion();
907 }
908
909 public com.liferay.portlet.documentlibrary.model.DLFileVersion getFileVersion(
910 java.lang.String version)
911 throws com.liferay.portal.kernel.exception.PortalException,
912 com.liferay.portal.kernel.exception.SystemException {
913 return _dlFileEntry.getFileVersion(version);
914 }
915
916 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> getFileVersions(
917 int status) throws com.liferay.portal.kernel.exception.SystemException {
918 return _dlFileEntry.getFileVersions(status);
919 }
920
921 public int getFileVersionsCount(int status)
922 throws com.liferay.portal.kernel.exception.SystemException {
923 return _dlFileEntry.getFileVersionsCount(status);
924 }
925
926 public com.liferay.portlet.documentlibrary.model.DLFolder getFolder() {
927 return _dlFileEntry.getFolder();
928 }
929
930 public java.lang.String getIcon() {
931 return _dlFileEntry.getIcon();
932 }
933
934 public com.liferay.portlet.documentlibrary.model.DLFileVersion getLatestFileVersion(
935 boolean trusted)
936 throws com.liferay.portal.kernel.exception.PortalException,
937 com.liferay.portal.kernel.exception.SystemException {
938 return _dlFileEntry.getLatestFileVersion(trusted);
939 }
940
941 public com.liferay.portal.model.Lock getLock() {
942 return _dlFileEntry.getLock();
943 }
944
945 public java.lang.String getLuceneProperties() {
946 return _dlFileEntry.getLuceneProperties();
947 }
948
949 public com.liferay.portlet.documentlibrary.model.DLFolder getTrashContainer() {
950 return _dlFileEntry.getTrashContainer();
951 }
952
953 public boolean hasLock() {
954 return _dlFileEntry.hasLock();
955 }
956
957 public boolean isCheckedOut() {
958 return _dlFileEntry.isCheckedOut();
959 }
960
961 public boolean isInHiddenFolder() {
962 return _dlFileEntry.isInHiddenFolder();
963 }
964
965 public boolean isInTrashContainer() {
966 return _dlFileEntry.isInTrashContainer();
967 }
968
969 public void setExtraSettingsProperties(
970 com.liferay.portal.kernel.util.UnicodeProperties extraSettingsProperties) {
971 _dlFileEntry.setExtraSettingsProperties(extraSettingsProperties);
972 }
973
974 public void setFileVersion(
975 com.liferay.portlet.documentlibrary.model.DLFileVersion dlFileVersion) {
976 _dlFileEntry.setFileVersion(dlFileVersion);
977 }
978
979
982 public DLFileEntry getWrappedDLFileEntry() {
983 return _dlFileEntry;
984 }
985
986 public DLFileEntry getWrappedModel() {
987 return _dlFileEntry;
988 }
989
990 public void resetOriginalValues() {
991 _dlFileEntry.resetOriginalValues();
992 }
993
994 private DLFileEntry _dlFileEntry;
995 }