001
014
015 package com.liferay.portlet.documentlibrary.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018 import com.liferay.portal.model.ModelWrapper;
019
020 import java.util.Date;
021 import java.util.HashMap;
022 import java.util.Map;
023
024
033 public class DLFileEntryWrapper implements DLFileEntry,
034 ModelWrapper<DLFileEntry> {
035 public DLFileEntryWrapper(DLFileEntry dlFileEntry) {
036 _dlFileEntry = dlFileEntry;
037 }
038
039 public Class<?> getModelClass() {
040 return DLFileEntry.class;
041 }
042
043 public String getModelClassName() {
044 return DLFileEntry.class.getName();
045 }
046
047 public Map<String, Object> getModelAttributes() {
048 Map<String, Object> attributes = new HashMap<String, Object>();
049
050 attributes.put("uuid", getUuid());
051 attributes.put("fileEntryId", getFileEntryId());
052 attributes.put("groupId", getGroupId());
053 attributes.put("companyId", getCompanyId());
054 attributes.put("userId", getUserId());
055 attributes.put("userName", getUserName());
056 attributes.put("versionUserId", getVersionUserId());
057 attributes.put("versionUserName", getVersionUserName());
058 attributes.put("createDate", getCreateDate());
059 attributes.put("modifiedDate", getModifiedDate());
060 attributes.put("repositoryId", getRepositoryId());
061 attributes.put("folderId", getFolderId());
062 attributes.put("name", getName());
063 attributes.put("extension", getExtension());
064 attributes.put("mimeType", getMimeType());
065 attributes.put("title", getTitle());
066 attributes.put("description", getDescription());
067 attributes.put("extraSettings", getExtraSettings());
068 attributes.put("fileEntryTypeId", getFileEntryTypeId());
069 attributes.put("version", getVersion());
070 attributes.put("size", getSize());
071 attributes.put("readCount", getReadCount());
072 attributes.put("smallImageId", getSmallImageId());
073 attributes.put("largeImageId", getLargeImageId());
074 attributes.put("custom1ImageId", getCustom1ImageId());
075 attributes.put("custom2ImageId", getCustom2ImageId());
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
238
243 public long getPrimaryKey() {
244 return _dlFileEntry.getPrimaryKey();
245 }
246
247
252 public void setPrimaryKey(long primaryKey) {
253 _dlFileEntry.setPrimaryKey(primaryKey);
254 }
255
256
261 public java.lang.String getUuid() {
262 return _dlFileEntry.getUuid();
263 }
264
265
270 public void setUuid(java.lang.String uuid) {
271 _dlFileEntry.setUuid(uuid);
272 }
273
274
279 public long getFileEntryId() {
280 return _dlFileEntry.getFileEntryId();
281 }
282
283
288 public void setFileEntryId(long fileEntryId) {
289 _dlFileEntry.setFileEntryId(fileEntryId);
290 }
291
292
297 public long getGroupId() {
298 return _dlFileEntry.getGroupId();
299 }
300
301
306 public void setGroupId(long groupId) {
307 _dlFileEntry.setGroupId(groupId);
308 }
309
310
315 public long getCompanyId() {
316 return _dlFileEntry.getCompanyId();
317 }
318
319
324 public void setCompanyId(long companyId) {
325 _dlFileEntry.setCompanyId(companyId);
326 }
327
328
333 public long getUserId() {
334 return _dlFileEntry.getUserId();
335 }
336
337
342 public void setUserId(long userId) {
343 _dlFileEntry.setUserId(userId);
344 }
345
346
352 public java.lang.String getUserUuid()
353 throws com.liferay.portal.kernel.exception.SystemException {
354 return _dlFileEntry.getUserUuid();
355 }
356
357
362 public void setUserUuid(java.lang.String userUuid) {
363 _dlFileEntry.setUserUuid(userUuid);
364 }
365
366
371 public java.lang.String getUserName() {
372 return _dlFileEntry.getUserName();
373 }
374
375
380 public void setUserName(java.lang.String userName) {
381 _dlFileEntry.setUserName(userName);
382 }
383
384
389 public long getVersionUserId() {
390 return _dlFileEntry.getVersionUserId();
391 }
392
393
398 public void setVersionUserId(long versionUserId) {
399 _dlFileEntry.setVersionUserId(versionUserId);
400 }
401
402
408 public java.lang.String getVersionUserUuid()
409 throws com.liferay.portal.kernel.exception.SystemException {
410 return _dlFileEntry.getVersionUserUuid();
411 }
412
413
418 public void setVersionUserUuid(java.lang.String versionUserUuid) {
419 _dlFileEntry.setVersionUserUuid(versionUserUuid);
420 }
421
422
427 public java.lang.String getVersionUserName() {
428 return _dlFileEntry.getVersionUserName();
429 }
430
431
436 public void setVersionUserName(java.lang.String versionUserName) {
437 _dlFileEntry.setVersionUserName(versionUserName);
438 }
439
440
445 public java.util.Date getCreateDate() {
446 return _dlFileEntry.getCreateDate();
447 }
448
449
454 public void setCreateDate(java.util.Date createDate) {
455 _dlFileEntry.setCreateDate(createDate);
456 }
457
458
463 public java.util.Date getModifiedDate() {
464 return _dlFileEntry.getModifiedDate();
465 }
466
467
472 public void setModifiedDate(java.util.Date modifiedDate) {
473 _dlFileEntry.setModifiedDate(modifiedDate);
474 }
475
476
481 public long getRepositoryId() {
482 return _dlFileEntry.getRepositoryId();
483 }
484
485
490 public void setRepositoryId(long repositoryId) {
491 _dlFileEntry.setRepositoryId(repositoryId);
492 }
493
494
499 public long getFolderId() {
500 return _dlFileEntry.getFolderId();
501 }
502
503
508 public void setFolderId(long folderId) {
509 _dlFileEntry.setFolderId(folderId);
510 }
511
512
517 public java.lang.String getName() {
518 return _dlFileEntry.getName();
519 }
520
521
526 public void setName(java.lang.String name) {
527 _dlFileEntry.setName(name);
528 }
529
530
535 public java.lang.String getExtension() {
536 return _dlFileEntry.getExtension();
537 }
538
539
544 public void setExtension(java.lang.String extension) {
545 _dlFileEntry.setExtension(extension);
546 }
547
548
553 public java.lang.String getMimeType() {
554 return _dlFileEntry.getMimeType();
555 }
556
557
562 public void setMimeType(java.lang.String mimeType) {
563 _dlFileEntry.setMimeType(mimeType);
564 }
565
566
571 public java.lang.String getTitle() {
572 return _dlFileEntry.getTitle();
573 }
574
575
580 public void setTitle(java.lang.String title) {
581 _dlFileEntry.setTitle(title);
582 }
583
584
589 public java.lang.String getDescription() {
590 return _dlFileEntry.getDescription();
591 }
592
593
598 public void setDescription(java.lang.String description) {
599 _dlFileEntry.setDescription(description);
600 }
601
602
607 public java.lang.String getExtraSettings() {
608 return _dlFileEntry.getExtraSettings();
609 }
610
611
616 public void setExtraSettings(java.lang.String extraSettings) {
617 _dlFileEntry.setExtraSettings(extraSettings);
618 }
619
620
625 public long getFileEntryTypeId() {
626 return _dlFileEntry.getFileEntryTypeId();
627 }
628
629
634 public void setFileEntryTypeId(long fileEntryTypeId) {
635 _dlFileEntry.setFileEntryTypeId(fileEntryTypeId);
636 }
637
638
643 public java.lang.String getVersion() {
644 return _dlFileEntry.getVersion();
645 }
646
647
652 public void setVersion(java.lang.String version) {
653 _dlFileEntry.setVersion(version);
654 }
655
656
661 public long getSize() {
662 return _dlFileEntry.getSize();
663 }
664
665
670 public void setSize(long size) {
671 _dlFileEntry.setSize(size);
672 }
673
674
679 public int getReadCount() {
680 return _dlFileEntry.getReadCount();
681 }
682
683
688 public void setReadCount(int readCount) {
689 _dlFileEntry.setReadCount(readCount);
690 }
691
692
697 public long getSmallImageId() {
698 return _dlFileEntry.getSmallImageId();
699 }
700
701
706 public void setSmallImageId(long smallImageId) {
707 _dlFileEntry.setSmallImageId(smallImageId);
708 }
709
710
715 public long getLargeImageId() {
716 return _dlFileEntry.getLargeImageId();
717 }
718
719
724 public void setLargeImageId(long largeImageId) {
725 _dlFileEntry.setLargeImageId(largeImageId);
726 }
727
728
733 public long getCustom1ImageId() {
734 return _dlFileEntry.getCustom1ImageId();
735 }
736
737
742 public void setCustom1ImageId(long custom1ImageId) {
743 _dlFileEntry.setCustom1ImageId(custom1ImageId);
744 }
745
746
751 public long getCustom2ImageId() {
752 return _dlFileEntry.getCustom2ImageId();
753 }
754
755
760 public void setCustom2ImageId(long custom2ImageId) {
761 _dlFileEntry.setCustom2ImageId(custom2ImageId);
762 }
763
764 public boolean isNew() {
765 return _dlFileEntry.isNew();
766 }
767
768 public void setNew(boolean n) {
769 _dlFileEntry.setNew(n);
770 }
771
772 public boolean isCachedModel() {
773 return _dlFileEntry.isCachedModel();
774 }
775
776 public void setCachedModel(boolean cachedModel) {
777 _dlFileEntry.setCachedModel(cachedModel);
778 }
779
780 public boolean isEscapedModel() {
781 return _dlFileEntry.isEscapedModel();
782 }
783
784 public java.io.Serializable getPrimaryKeyObj() {
785 return _dlFileEntry.getPrimaryKeyObj();
786 }
787
788 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
789 _dlFileEntry.setPrimaryKeyObj(primaryKeyObj);
790 }
791
792 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
793 return _dlFileEntry.getExpandoBridge();
794 }
795
796 public void setExpandoBridgeAttributes(
797 com.liferay.portal.service.ServiceContext serviceContext) {
798 _dlFileEntry.setExpandoBridgeAttributes(serviceContext);
799 }
800
801 @Override
802 public java.lang.Object clone() {
803 return new DLFileEntryWrapper((DLFileEntry)_dlFileEntry.clone());
804 }
805
806 public int compareTo(
807 com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry) {
808 return _dlFileEntry.compareTo(dlFileEntry);
809 }
810
811 @Override
812 public int hashCode() {
813 return _dlFileEntry.hashCode();
814 }
815
816 public com.liferay.portal.model.CacheModel<com.liferay.portlet.documentlibrary.model.DLFileEntry> toCacheModel() {
817 return _dlFileEntry.toCacheModel();
818 }
819
820 public com.liferay.portlet.documentlibrary.model.DLFileEntry toEscapedModel() {
821 return new DLFileEntryWrapper(_dlFileEntry.toEscapedModel());
822 }
823
824 public com.liferay.portlet.documentlibrary.model.DLFileEntry toUnescapedModel() {
825 return new DLFileEntryWrapper(_dlFileEntry.toUnescapedModel());
826 }
827
828 @Override
829 public java.lang.String toString() {
830 return _dlFileEntry.toString();
831 }
832
833 public java.lang.String toXmlString() {
834 return _dlFileEntry.toXmlString();
835 }
836
837 public void persist()
838 throws com.liferay.portal.kernel.exception.SystemException {
839 _dlFileEntry.persist();
840 }
841
842 public java.io.InputStream getContentStream()
843 throws com.liferay.portal.kernel.exception.PortalException,
844 com.liferay.portal.kernel.exception.SystemException {
845 return _dlFileEntry.getContentStream();
846 }
847
848 public java.io.InputStream getContentStream(java.lang.String version)
849 throws com.liferay.portal.kernel.exception.PortalException,
850 com.liferay.portal.kernel.exception.SystemException {
851 return _dlFileEntry.getContentStream(version);
852 }
853
854 public long getDataRepositoryId() {
855 return _dlFileEntry.getDataRepositoryId();
856 }
857
858 public com.liferay.portal.kernel.util.UnicodeProperties getExtraSettingsProperties() {
859 return _dlFileEntry.getExtraSettingsProperties();
860 }
861
862 public java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.storage.Fields> getFieldsMap(
863 long fileVersionId)
864 throws com.liferay.portal.kernel.exception.PortalException,
865 com.liferay.portal.kernel.exception.SystemException {
866 return _dlFileEntry.getFieldsMap(fileVersionId);
867 }
868
869 public com.liferay.portlet.documentlibrary.model.DLFileVersion getFileVersion()
870 throws com.liferay.portal.kernel.exception.PortalException,
871 com.liferay.portal.kernel.exception.SystemException {
872 return _dlFileEntry.getFileVersion();
873 }
874
875 public com.liferay.portlet.documentlibrary.model.DLFileVersion getFileVersion(
876 java.lang.String version)
877 throws com.liferay.portal.kernel.exception.PortalException,
878 com.liferay.portal.kernel.exception.SystemException {
879 return _dlFileEntry.getFileVersion(version);
880 }
881
882 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> getFileVersions(
883 int status) throws com.liferay.portal.kernel.exception.SystemException {
884 return _dlFileEntry.getFileVersions(status);
885 }
886
887 public int getFileVersionsCount(int status)
888 throws com.liferay.portal.kernel.exception.SystemException {
889 return _dlFileEntry.getFileVersionsCount(status);
890 }
891
892 public com.liferay.portlet.documentlibrary.model.DLFolder getFolder() {
893 return _dlFileEntry.getFolder();
894 }
895
896 public java.lang.String getIcon() {
897 return _dlFileEntry.getIcon();
898 }
899
900 public com.liferay.portlet.documentlibrary.model.DLFileVersion getLatestFileVersion(
901 boolean trusted)
902 throws com.liferay.portal.kernel.exception.PortalException,
903 com.liferay.portal.kernel.exception.SystemException {
904 return _dlFileEntry.getLatestFileVersion(trusted);
905 }
906
907 public com.liferay.portal.model.Lock getLock() {
908 return _dlFileEntry.getLock();
909 }
910
911 public java.lang.String getLuceneProperties() {
912 return _dlFileEntry.getLuceneProperties();
913 }
914
915 public boolean hasLock() {
916 return _dlFileEntry.hasLock();
917 }
918
919 public boolean isCheckedOut() {
920 return _dlFileEntry.isCheckedOut();
921 }
922
923 public void setExtraSettingsProperties(
924 com.liferay.portal.kernel.util.UnicodeProperties extraSettingsProperties) {
925 _dlFileEntry.setExtraSettingsProperties(extraSettingsProperties);
926 }
927
928 public void setFileVersion(
929 com.liferay.portlet.documentlibrary.model.DLFileVersion dlFileVersion) {
930 _dlFileEntry.setFileVersion(dlFileVersion);
931 }
932
933 @Override
934 public boolean equals(Object obj) {
935 if (this == obj) {
936 return true;
937 }
938
939 if (!(obj instanceof DLFileEntryWrapper)) {
940 return false;
941 }
942
943 DLFileEntryWrapper dlFileEntryWrapper = (DLFileEntryWrapper)obj;
944
945 if (Validator.equals(_dlFileEntry, dlFileEntryWrapper._dlFileEntry)) {
946 return true;
947 }
948
949 return false;
950 }
951
952
955 public DLFileEntry getWrappedDLFileEntry() {
956 return _dlFileEntry;
957 }
958
959 public DLFileEntry getWrappedModel() {
960 return _dlFileEntry;
961 }
962
963 public void resetOriginalValues() {
964 _dlFileEntry.resetOriginalValues();
965 }
966
967 private DLFileEntry _dlFileEntry;
968 }