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
076 return attributes;
077 }
078
079 public void setModelAttributes(Map<String, Object> attributes) {
080 String uuid = (String)attributes.get("uuid");
081
082 if (uuid != null) {
083 setUuid(uuid);
084 }
085
086 Long fileEntryId = (Long)attributes.get("fileEntryId");
087
088 if (fileEntryId != null) {
089 setFileEntryId(fileEntryId);
090 }
091
092 Long groupId = (Long)attributes.get("groupId");
093
094 if (groupId != null) {
095 setGroupId(groupId);
096 }
097
098 Long companyId = (Long)attributes.get("companyId");
099
100 if (companyId != null) {
101 setCompanyId(companyId);
102 }
103
104 Long userId = (Long)attributes.get("userId");
105
106 if (userId != null) {
107 setUserId(userId);
108 }
109
110 String userName = (String)attributes.get("userName");
111
112 if (userName != null) {
113 setUserName(userName);
114 }
115
116 Long versionUserId = (Long)attributes.get("versionUserId");
117
118 if (versionUserId != null) {
119 setVersionUserId(versionUserId);
120 }
121
122 String versionUserName = (String)attributes.get("versionUserName");
123
124 if (versionUserName != null) {
125 setVersionUserName(versionUserName);
126 }
127
128 Date createDate = (Date)attributes.get("createDate");
129
130 if (createDate != null) {
131 setCreateDate(createDate);
132 }
133
134 Date modifiedDate = (Date)attributes.get("modifiedDate");
135
136 if (modifiedDate != null) {
137 setModifiedDate(modifiedDate);
138 }
139
140 Long repositoryId = (Long)attributes.get("repositoryId");
141
142 if (repositoryId != null) {
143 setRepositoryId(repositoryId);
144 }
145
146 Long folderId = (Long)attributes.get("folderId");
147
148 if (folderId != null) {
149 setFolderId(folderId);
150 }
151
152 String name = (String)attributes.get("name");
153
154 if (name != null) {
155 setName(name);
156 }
157
158 String extension = (String)attributes.get("extension");
159
160 if (extension != null) {
161 setExtension(extension);
162 }
163
164 String mimeType = (String)attributes.get("mimeType");
165
166 if (mimeType != null) {
167 setMimeType(mimeType);
168 }
169
170 String title = (String)attributes.get("title");
171
172 if (title != null) {
173 setTitle(title);
174 }
175
176 String description = (String)attributes.get("description");
177
178 if (description != null) {
179 setDescription(description);
180 }
181
182 String extraSettings = (String)attributes.get("extraSettings");
183
184 if (extraSettings != null) {
185 setExtraSettings(extraSettings);
186 }
187
188 Long fileEntryTypeId = (Long)attributes.get("fileEntryTypeId");
189
190 if (fileEntryTypeId != null) {
191 setFileEntryTypeId(fileEntryTypeId);
192 }
193
194 String version = (String)attributes.get("version");
195
196 if (version != null) {
197 setVersion(version);
198 }
199
200 Long size = (Long)attributes.get("size");
201
202 if (size != null) {
203 setSize(size);
204 }
205
206 Integer readCount = (Integer)attributes.get("readCount");
207
208 if (readCount != null) {
209 setReadCount(readCount);
210 }
211
212 Long smallImageId = (Long)attributes.get("smallImageId");
213
214 if (smallImageId != null) {
215 setSmallImageId(smallImageId);
216 }
217
218 Long largeImageId = (Long)attributes.get("largeImageId");
219
220 if (largeImageId != null) {
221 setLargeImageId(largeImageId);
222 }
223
224 Long custom1ImageId = (Long)attributes.get("custom1ImageId");
225
226 if (custom1ImageId != null) {
227 setCustom1ImageId(custom1ImageId);
228 }
229
230 Long custom2ImageId = (Long)attributes.get("custom2ImageId");
231
232 if (custom2ImageId != null) {
233 setCustom2ImageId(custom2ImageId);
234 }
235 }
236
237
242 public long getPrimaryKey() {
243 return _dlFileEntry.getPrimaryKey();
244 }
245
246
251 public void setPrimaryKey(long primaryKey) {
252 _dlFileEntry.setPrimaryKey(primaryKey);
253 }
254
255
260 public java.lang.String getUuid() {
261 return _dlFileEntry.getUuid();
262 }
263
264
269 public void setUuid(java.lang.String uuid) {
270 _dlFileEntry.setUuid(uuid);
271 }
272
273
278 public long getFileEntryId() {
279 return _dlFileEntry.getFileEntryId();
280 }
281
282
287 public void setFileEntryId(long fileEntryId) {
288 _dlFileEntry.setFileEntryId(fileEntryId);
289 }
290
291
296 public long getGroupId() {
297 return _dlFileEntry.getGroupId();
298 }
299
300
305 public void setGroupId(long groupId) {
306 _dlFileEntry.setGroupId(groupId);
307 }
308
309
314 public long getCompanyId() {
315 return _dlFileEntry.getCompanyId();
316 }
317
318
323 public void setCompanyId(long companyId) {
324 _dlFileEntry.setCompanyId(companyId);
325 }
326
327
332 public long getUserId() {
333 return _dlFileEntry.getUserId();
334 }
335
336
341 public void setUserId(long userId) {
342 _dlFileEntry.setUserId(userId);
343 }
344
345
351 public java.lang.String getUserUuid()
352 throws com.liferay.portal.kernel.exception.SystemException {
353 return _dlFileEntry.getUserUuid();
354 }
355
356
361 public void setUserUuid(java.lang.String userUuid) {
362 _dlFileEntry.setUserUuid(userUuid);
363 }
364
365
370 public java.lang.String getUserName() {
371 return _dlFileEntry.getUserName();
372 }
373
374
379 public void setUserName(java.lang.String userName) {
380 _dlFileEntry.setUserName(userName);
381 }
382
383
388 public long getVersionUserId() {
389 return _dlFileEntry.getVersionUserId();
390 }
391
392
397 public void setVersionUserId(long versionUserId) {
398 _dlFileEntry.setVersionUserId(versionUserId);
399 }
400
401
407 public java.lang.String getVersionUserUuid()
408 throws com.liferay.portal.kernel.exception.SystemException {
409 return _dlFileEntry.getVersionUserUuid();
410 }
411
412
417 public void setVersionUserUuid(java.lang.String versionUserUuid) {
418 _dlFileEntry.setVersionUserUuid(versionUserUuid);
419 }
420
421
426 public java.lang.String getVersionUserName() {
427 return _dlFileEntry.getVersionUserName();
428 }
429
430
435 public void setVersionUserName(java.lang.String versionUserName) {
436 _dlFileEntry.setVersionUserName(versionUserName);
437 }
438
439
444 public java.util.Date getCreateDate() {
445 return _dlFileEntry.getCreateDate();
446 }
447
448
453 public void setCreateDate(java.util.Date createDate) {
454 _dlFileEntry.setCreateDate(createDate);
455 }
456
457
462 public java.util.Date getModifiedDate() {
463 return _dlFileEntry.getModifiedDate();
464 }
465
466
471 public void setModifiedDate(java.util.Date modifiedDate) {
472 _dlFileEntry.setModifiedDate(modifiedDate);
473 }
474
475
480 public long getRepositoryId() {
481 return _dlFileEntry.getRepositoryId();
482 }
483
484
489 public void setRepositoryId(long repositoryId) {
490 _dlFileEntry.setRepositoryId(repositoryId);
491 }
492
493
498 public long getFolderId() {
499 return _dlFileEntry.getFolderId();
500 }
501
502
507 public void setFolderId(long folderId) {
508 _dlFileEntry.setFolderId(folderId);
509 }
510
511
516 public java.lang.String getName() {
517 return _dlFileEntry.getName();
518 }
519
520
525 public void setName(java.lang.String name) {
526 _dlFileEntry.setName(name);
527 }
528
529
534 public java.lang.String getExtension() {
535 return _dlFileEntry.getExtension();
536 }
537
538
543 public void setExtension(java.lang.String extension) {
544 _dlFileEntry.setExtension(extension);
545 }
546
547
552 public java.lang.String getMimeType() {
553 return _dlFileEntry.getMimeType();
554 }
555
556
561 public void setMimeType(java.lang.String mimeType) {
562 _dlFileEntry.setMimeType(mimeType);
563 }
564
565
570 public java.lang.String getTitle() {
571 return _dlFileEntry.getTitle();
572 }
573
574
579 public void setTitle(java.lang.String title) {
580 _dlFileEntry.setTitle(title);
581 }
582
583
588 public java.lang.String getDescription() {
589 return _dlFileEntry.getDescription();
590 }
591
592
597 public void setDescription(java.lang.String description) {
598 _dlFileEntry.setDescription(description);
599 }
600
601
606 public java.lang.String getExtraSettings() {
607 return _dlFileEntry.getExtraSettings();
608 }
609
610
615 public void setExtraSettings(java.lang.String extraSettings) {
616 _dlFileEntry.setExtraSettings(extraSettings);
617 }
618
619
624 public long getFileEntryTypeId() {
625 return _dlFileEntry.getFileEntryTypeId();
626 }
627
628
633 public void setFileEntryTypeId(long fileEntryTypeId) {
634 _dlFileEntry.setFileEntryTypeId(fileEntryTypeId);
635 }
636
637
642 public java.lang.String getVersion() {
643 return _dlFileEntry.getVersion();
644 }
645
646
651 public void setVersion(java.lang.String version) {
652 _dlFileEntry.setVersion(version);
653 }
654
655
660 public long getSize() {
661 return _dlFileEntry.getSize();
662 }
663
664
669 public void setSize(long size) {
670 _dlFileEntry.setSize(size);
671 }
672
673
678 public int getReadCount() {
679 return _dlFileEntry.getReadCount();
680 }
681
682
687 public void setReadCount(int readCount) {
688 _dlFileEntry.setReadCount(readCount);
689 }
690
691
696 public long getSmallImageId() {
697 return _dlFileEntry.getSmallImageId();
698 }
699
700
705 public void setSmallImageId(long smallImageId) {
706 _dlFileEntry.setSmallImageId(smallImageId);
707 }
708
709
714 public long getLargeImageId() {
715 return _dlFileEntry.getLargeImageId();
716 }
717
718
723 public void setLargeImageId(long largeImageId) {
724 _dlFileEntry.setLargeImageId(largeImageId);
725 }
726
727
732 public long getCustom1ImageId() {
733 return _dlFileEntry.getCustom1ImageId();
734 }
735
736
741 public void setCustom1ImageId(long custom1ImageId) {
742 _dlFileEntry.setCustom1ImageId(custom1ImageId);
743 }
744
745
750 public long getCustom2ImageId() {
751 return _dlFileEntry.getCustom2ImageId();
752 }
753
754
759 public void setCustom2ImageId(long custom2ImageId) {
760 _dlFileEntry.setCustom2ImageId(custom2ImageId);
761 }
762
763 public boolean isNew() {
764 return _dlFileEntry.isNew();
765 }
766
767 public void setNew(boolean n) {
768 _dlFileEntry.setNew(n);
769 }
770
771 public boolean isCachedModel() {
772 return _dlFileEntry.isCachedModel();
773 }
774
775 public void setCachedModel(boolean cachedModel) {
776 _dlFileEntry.setCachedModel(cachedModel);
777 }
778
779 public boolean isEscapedModel() {
780 return _dlFileEntry.isEscapedModel();
781 }
782
783 public java.io.Serializable getPrimaryKeyObj() {
784 return _dlFileEntry.getPrimaryKeyObj();
785 }
786
787 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
788 _dlFileEntry.setPrimaryKeyObj(primaryKeyObj);
789 }
790
791 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
792 return _dlFileEntry.getExpandoBridge();
793 }
794
795 public void setExpandoBridgeAttributes(
796 com.liferay.portal.service.ServiceContext serviceContext) {
797 _dlFileEntry.setExpandoBridgeAttributes(serviceContext);
798 }
799
800 @Override
801 public java.lang.Object clone() {
802 return new DLFileEntryWrapper((DLFileEntry)_dlFileEntry.clone());
803 }
804
805 public int compareTo(
806 com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry) {
807 return _dlFileEntry.compareTo(dlFileEntry);
808 }
809
810 @Override
811 public int hashCode() {
812 return _dlFileEntry.hashCode();
813 }
814
815 public com.liferay.portal.model.CacheModel<com.liferay.portlet.documentlibrary.model.DLFileEntry> toCacheModel() {
816 return _dlFileEntry.toCacheModel();
817 }
818
819 public com.liferay.portlet.documentlibrary.model.DLFileEntry toEscapedModel() {
820 return new DLFileEntryWrapper(_dlFileEntry.toEscapedModel());
821 }
822
823 @Override
824 public java.lang.String toString() {
825 return _dlFileEntry.toString();
826 }
827
828 public java.lang.String toXmlString() {
829 return _dlFileEntry.toXmlString();
830 }
831
832 public void persist()
833 throws com.liferay.portal.kernel.exception.SystemException {
834 _dlFileEntry.persist();
835 }
836
837 public java.io.InputStream getContentStream()
838 throws com.liferay.portal.kernel.exception.PortalException,
839 com.liferay.portal.kernel.exception.SystemException {
840 return _dlFileEntry.getContentStream();
841 }
842
843 public java.io.InputStream getContentStream(java.lang.String version)
844 throws com.liferay.portal.kernel.exception.PortalException,
845 com.liferay.portal.kernel.exception.SystemException {
846 return _dlFileEntry.getContentStream(version);
847 }
848
849 public long getDataRepositoryId() {
850 return _dlFileEntry.getDataRepositoryId();
851 }
852
853 public com.liferay.portal.kernel.util.UnicodeProperties getExtraSettingsProperties() {
854 return _dlFileEntry.getExtraSettingsProperties();
855 }
856
857 public java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> getFieldsMap(
858 long fileVersionId)
859 throws com.liferay.portal.kernel.exception.PortalException,
860 com.liferay.portal.kernel.exception.SystemException {
861 return _dlFileEntry.getFieldsMap(fileVersionId);
862 }
863
864 public com.liferay.portlet.documentlibrary.model.DLFileVersion getFileVersion()
865 throws com.liferay.portal.kernel.exception.PortalException,
866 com.liferay.portal.kernel.exception.SystemException {
867 return _dlFileEntry.getFileVersion();
868 }
869
870 public com.liferay.portlet.documentlibrary.model.DLFileVersion getFileVersion(
871 java.lang.String version)
872 throws com.liferay.portal.kernel.exception.PortalException,
873 com.liferay.portal.kernel.exception.SystemException {
874 return _dlFileEntry.getFileVersion(version);
875 }
876
877 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> getFileVersions(
878 int status) throws com.liferay.portal.kernel.exception.SystemException {
879 return _dlFileEntry.getFileVersions(status);
880 }
881
882 public int getFileVersionsCount(int status)
883 throws com.liferay.portal.kernel.exception.SystemException {
884 return _dlFileEntry.getFileVersionsCount(status);
885 }
886
887 public com.liferay.portlet.documentlibrary.model.DLFolder getFolder() {
888 return _dlFileEntry.getFolder();
889 }
890
891 public java.lang.String getIcon() {
892 return _dlFileEntry.getIcon();
893 }
894
895 public com.liferay.portlet.documentlibrary.model.DLFileVersion getLatestFileVersion(
896 boolean trusted)
897 throws com.liferay.portal.kernel.exception.PortalException,
898 com.liferay.portal.kernel.exception.SystemException {
899 return _dlFileEntry.getLatestFileVersion(trusted);
900 }
901
902 public com.liferay.portal.model.Lock getLock() {
903 return _dlFileEntry.getLock();
904 }
905
906 public java.lang.String getLuceneProperties() {
907 return _dlFileEntry.getLuceneProperties();
908 }
909
910 public boolean hasLock() {
911 return _dlFileEntry.hasLock();
912 }
913
914 public boolean isCheckedOut() {
915 return _dlFileEntry.isCheckedOut();
916 }
917
918 public void setExtraSettingsProperties(
919 com.liferay.portal.kernel.util.UnicodeProperties extraSettingsProperties) {
920 _dlFileEntry.setExtraSettingsProperties(extraSettingsProperties);
921 }
922
923 public void setFileVersion(
924 com.liferay.portlet.documentlibrary.model.DLFileVersion dlFileVersion) {
925 _dlFileEntry.setFileVersion(dlFileVersion);
926 }
927
928
931 public DLFileEntry getWrappedDLFileEntry() {
932 return _dlFileEntry;
933 }
934
935 public DLFileEntry getWrappedModel() {
936 return _dlFileEntry;
937 }
938
939 public void resetOriginalValues() {
940 _dlFileEntry.resetOriginalValues();
941 }
942
943 private DLFileEntry _dlFileEntry;
944 }