001
014
015 package com.liferay.portlet.documentlibrary.model;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.lar.StagedModelType;
020 import com.liferay.portal.kernel.util.Validator;
021 import com.liferay.portal.model.ModelWrapper;
022
023 import java.util.Date;
024 import java.util.HashMap;
025 import java.util.Map;
026
027
036 @ProviderType
037 public class DLFileVersionWrapper implements DLFileVersion,
038 ModelWrapper<DLFileVersion> {
039 public DLFileVersionWrapper(DLFileVersion dlFileVersion) {
040 _dlFileVersion = dlFileVersion;
041 }
042
043 @Override
044 public Class<?> getModelClass() {
045 return DLFileVersion.class;
046 }
047
048 @Override
049 public String getModelClassName() {
050 return DLFileVersion.class.getName();
051 }
052
053 @Override
054 public Map<String, Object> getModelAttributes() {
055 Map<String, Object> attributes = new HashMap<String, Object>();
056
057 attributes.put("uuid", getUuid());
058 attributes.put("fileVersionId", getFileVersionId());
059 attributes.put("groupId", getGroupId());
060 attributes.put("companyId", getCompanyId());
061 attributes.put("userId", getUserId());
062 attributes.put("userName", getUserName());
063 attributes.put("createDate", getCreateDate());
064 attributes.put("modifiedDate", getModifiedDate());
065 attributes.put("repositoryId", getRepositoryId());
066 attributes.put("folderId", getFolderId());
067 attributes.put("fileEntryId", getFileEntryId());
068 attributes.put("treePath", getTreePath());
069 attributes.put("extension", getExtension());
070 attributes.put("mimeType", getMimeType());
071 attributes.put("title", getTitle());
072 attributes.put("description", getDescription());
073 attributes.put("changeLog", getChangeLog());
074 attributes.put("extraSettings", getExtraSettings());
075 attributes.put("fileEntryTypeId", getFileEntryTypeId());
076 attributes.put("version", getVersion());
077 attributes.put("size", getSize());
078 attributes.put("checksum", getChecksum());
079 attributes.put("status", getStatus());
080 attributes.put("statusByUserId", getStatusByUserId());
081 attributes.put("statusByUserName", getStatusByUserName());
082 attributes.put("statusDate", getStatusDate());
083
084 return attributes;
085 }
086
087 @Override
088 public void setModelAttributes(Map<String, Object> attributes) {
089 String uuid = (String)attributes.get("uuid");
090
091 if (uuid != null) {
092 setUuid(uuid);
093 }
094
095 Long fileVersionId = (Long)attributes.get("fileVersionId");
096
097 if (fileVersionId != null) {
098 setFileVersionId(fileVersionId);
099 }
100
101 Long groupId = (Long)attributes.get("groupId");
102
103 if (groupId != null) {
104 setGroupId(groupId);
105 }
106
107 Long companyId = (Long)attributes.get("companyId");
108
109 if (companyId != null) {
110 setCompanyId(companyId);
111 }
112
113 Long userId = (Long)attributes.get("userId");
114
115 if (userId != null) {
116 setUserId(userId);
117 }
118
119 String userName = (String)attributes.get("userName");
120
121 if (userName != null) {
122 setUserName(userName);
123 }
124
125 Date createDate = (Date)attributes.get("createDate");
126
127 if (createDate != null) {
128 setCreateDate(createDate);
129 }
130
131 Date modifiedDate = (Date)attributes.get("modifiedDate");
132
133 if (modifiedDate != null) {
134 setModifiedDate(modifiedDate);
135 }
136
137 Long repositoryId = (Long)attributes.get("repositoryId");
138
139 if (repositoryId != null) {
140 setRepositoryId(repositoryId);
141 }
142
143 Long folderId = (Long)attributes.get("folderId");
144
145 if (folderId != null) {
146 setFolderId(folderId);
147 }
148
149 Long fileEntryId = (Long)attributes.get("fileEntryId");
150
151 if (fileEntryId != null) {
152 setFileEntryId(fileEntryId);
153 }
154
155 String treePath = (String)attributes.get("treePath");
156
157 if (treePath != null) {
158 setTreePath(treePath);
159 }
160
161 String extension = (String)attributes.get("extension");
162
163 if (extension != null) {
164 setExtension(extension);
165 }
166
167 String mimeType = (String)attributes.get("mimeType");
168
169 if (mimeType != null) {
170 setMimeType(mimeType);
171 }
172
173 String title = (String)attributes.get("title");
174
175 if (title != null) {
176 setTitle(title);
177 }
178
179 String description = (String)attributes.get("description");
180
181 if (description != null) {
182 setDescription(description);
183 }
184
185 String changeLog = (String)attributes.get("changeLog");
186
187 if (changeLog != null) {
188 setChangeLog(changeLog);
189 }
190
191 String extraSettings = (String)attributes.get("extraSettings");
192
193 if (extraSettings != null) {
194 setExtraSettings(extraSettings);
195 }
196
197 Long fileEntryTypeId = (Long)attributes.get("fileEntryTypeId");
198
199 if (fileEntryTypeId != null) {
200 setFileEntryTypeId(fileEntryTypeId);
201 }
202
203 String version = (String)attributes.get("version");
204
205 if (version != null) {
206 setVersion(version);
207 }
208
209 Long size = (Long)attributes.get("size");
210
211 if (size != null) {
212 setSize(size);
213 }
214
215 String checksum = (String)attributes.get("checksum");
216
217 if (checksum != null) {
218 setChecksum(checksum);
219 }
220
221 Integer status = (Integer)attributes.get("status");
222
223 if (status != null) {
224 setStatus(status);
225 }
226
227 Long statusByUserId = (Long)attributes.get("statusByUserId");
228
229 if (statusByUserId != null) {
230 setStatusByUserId(statusByUserId);
231 }
232
233 String statusByUserName = (String)attributes.get("statusByUserName");
234
235 if (statusByUserName != null) {
236 setStatusByUserName(statusByUserName);
237 }
238
239 Date statusDate = (Date)attributes.get("statusDate");
240
241 if (statusDate != null) {
242 setStatusDate(statusDate);
243 }
244 }
245
246
251 @Override
252 public long getPrimaryKey() {
253 return _dlFileVersion.getPrimaryKey();
254 }
255
256
261 @Override
262 public void setPrimaryKey(long primaryKey) {
263 _dlFileVersion.setPrimaryKey(primaryKey);
264 }
265
266
271 @Override
272 public java.lang.String getUuid() {
273 return _dlFileVersion.getUuid();
274 }
275
276
281 @Override
282 public void setUuid(java.lang.String uuid) {
283 _dlFileVersion.setUuid(uuid);
284 }
285
286
291 @Override
292 public long getFileVersionId() {
293 return _dlFileVersion.getFileVersionId();
294 }
295
296
301 @Override
302 public void setFileVersionId(long fileVersionId) {
303 _dlFileVersion.setFileVersionId(fileVersionId);
304 }
305
306
311 @Override
312 public long getGroupId() {
313 return _dlFileVersion.getGroupId();
314 }
315
316
321 @Override
322 public void setGroupId(long groupId) {
323 _dlFileVersion.setGroupId(groupId);
324 }
325
326
331 @Override
332 public long getCompanyId() {
333 return _dlFileVersion.getCompanyId();
334 }
335
336
341 @Override
342 public void setCompanyId(long companyId) {
343 _dlFileVersion.setCompanyId(companyId);
344 }
345
346
351 @Override
352 public long getUserId() {
353 return _dlFileVersion.getUserId();
354 }
355
356
361 @Override
362 public void setUserId(long userId) {
363 _dlFileVersion.setUserId(userId);
364 }
365
366
372 @Override
373 public java.lang.String getUserUuid()
374 throws com.liferay.portal.kernel.exception.SystemException {
375 return _dlFileVersion.getUserUuid();
376 }
377
378
383 @Override
384 public void setUserUuid(java.lang.String userUuid) {
385 _dlFileVersion.setUserUuid(userUuid);
386 }
387
388
393 @Override
394 public java.lang.String getUserName() {
395 return _dlFileVersion.getUserName();
396 }
397
398
403 @Override
404 public void setUserName(java.lang.String userName) {
405 _dlFileVersion.setUserName(userName);
406 }
407
408
413 @Override
414 public java.util.Date getCreateDate() {
415 return _dlFileVersion.getCreateDate();
416 }
417
418
423 @Override
424 public void setCreateDate(java.util.Date createDate) {
425 _dlFileVersion.setCreateDate(createDate);
426 }
427
428
433 @Override
434 public java.util.Date getModifiedDate() {
435 return _dlFileVersion.getModifiedDate();
436 }
437
438
443 @Override
444 public void setModifiedDate(java.util.Date modifiedDate) {
445 _dlFileVersion.setModifiedDate(modifiedDate);
446 }
447
448
453 @Override
454 public long getRepositoryId() {
455 return _dlFileVersion.getRepositoryId();
456 }
457
458
463 @Override
464 public void setRepositoryId(long repositoryId) {
465 _dlFileVersion.setRepositoryId(repositoryId);
466 }
467
468
473 @Override
474 public long getFolderId() {
475 return _dlFileVersion.getFolderId();
476 }
477
478
483 @Override
484 public void setFolderId(long folderId) {
485 _dlFileVersion.setFolderId(folderId);
486 }
487
488
493 @Override
494 public long getFileEntryId() {
495 return _dlFileVersion.getFileEntryId();
496 }
497
498
503 @Override
504 public void setFileEntryId(long fileEntryId) {
505 _dlFileVersion.setFileEntryId(fileEntryId);
506 }
507
508
513 @Override
514 public java.lang.String getTreePath() {
515 return _dlFileVersion.getTreePath();
516 }
517
518
523 @Override
524 public void setTreePath(java.lang.String treePath) {
525 _dlFileVersion.setTreePath(treePath);
526 }
527
528
533 @Override
534 public java.lang.String getExtension() {
535 return _dlFileVersion.getExtension();
536 }
537
538
543 @Override
544 public void setExtension(java.lang.String extension) {
545 _dlFileVersion.setExtension(extension);
546 }
547
548
553 @Override
554 public java.lang.String getMimeType() {
555 return _dlFileVersion.getMimeType();
556 }
557
558
563 @Override
564 public void setMimeType(java.lang.String mimeType) {
565 _dlFileVersion.setMimeType(mimeType);
566 }
567
568
573 @Override
574 public java.lang.String getTitle() {
575 return _dlFileVersion.getTitle();
576 }
577
578
583 @Override
584 public void setTitle(java.lang.String title) {
585 _dlFileVersion.setTitle(title);
586 }
587
588
593 @Override
594 public java.lang.String getDescription() {
595 return _dlFileVersion.getDescription();
596 }
597
598
603 @Override
604 public void setDescription(java.lang.String description) {
605 _dlFileVersion.setDescription(description);
606 }
607
608
613 @Override
614 public java.lang.String getChangeLog() {
615 return _dlFileVersion.getChangeLog();
616 }
617
618
623 @Override
624 public void setChangeLog(java.lang.String changeLog) {
625 _dlFileVersion.setChangeLog(changeLog);
626 }
627
628
633 @Override
634 public java.lang.String getExtraSettings() {
635 return _dlFileVersion.getExtraSettings();
636 }
637
638
643 @Override
644 public void setExtraSettings(java.lang.String extraSettings) {
645 _dlFileVersion.setExtraSettings(extraSettings);
646 }
647
648
653 @Override
654 public long getFileEntryTypeId() {
655 return _dlFileVersion.getFileEntryTypeId();
656 }
657
658
663 @Override
664 public void setFileEntryTypeId(long fileEntryTypeId) {
665 _dlFileVersion.setFileEntryTypeId(fileEntryTypeId);
666 }
667
668
673 @Override
674 public java.lang.String getVersion() {
675 return _dlFileVersion.getVersion();
676 }
677
678
683 @Override
684 public void setVersion(java.lang.String version) {
685 _dlFileVersion.setVersion(version);
686 }
687
688
693 @Override
694 public long getSize() {
695 return _dlFileVersion.getSize();
696 }
697
698
703 @Override
704 public void setSize(long size) {
705 _dlFileVersion.setSize(size);
706 }
707
708
713 @Override
714 public java.lang.String getChecksum() {
715 return _dlFileVersion.getChecksum();
716 }
717
718
723 @Override
724 public void setChecksum(java.lang.String checksum) {
725 _dlFileVersion.setChecksum(checksum);
726 }
727
728
733 @Override
734 public int getStatus() {
735 return _dlFileVersion.getStatus();
736 }
737
738
743 @Override
744 public void setStatus(int status) {
745 _dlFileVersion.setStatus(status);
746 }
747
748
753 @Override
754 public long getStatusByUserId() {
755 return _dlFileVersion.getStatusByUserId();
756 }
757
758
763 @Override
764 public void setStatusByUserId(long statusByUserId) {
765 _dlFileVersion.setStatusByUserId(statusByUserId);
766 }
767
768
774 @Override
775 public java.lang.String getStatusByUserUuid()
776 throws com.liferay.portal.kernel.exception.SystemException {
777 return _dlFileVersion.getStatusByUserUuid();
778 }
779
780
785 @Override
786 public void setStatusByUserUuid(java.lang.String statusByUserUuid) {
787 _dlFileVersion.setStatusByUserUuid(statusByUserUuid);
788 }
789
790
795 @Override
796 public java.lang.String getStatusByUserName() {
797 return _dlFileVersion.getStatusByUserName();
798 }
799
800
805 @Override
806 public void setStatusByUserName(java.lang.String statusByUserName) {
807 _dlFileVersion.setStatusByUserName(statusByUserName);
808 }
809
810
815 @Override
816 public java.util.Date getStatusDate() {
817 return _dlFileVersion.getStatusDate();
818 }
819
820
825 @Override
826 public void setStatusDate(java.util.Date statusDate) {
827 _dlFileVersion.setStatusDate(statusDate);
828 }
829
830
833 @Override
834 public boolean getApproved() {
835 return _dlFileVersion.getApproved();
836 }
837
838
843 @Override
844 public boolean isApproved() {
845 return _dlFileVersion.isApproved();
846 }
847
848
853 @Override
854 public boolean isDenied() {
855 return _dlFileVersion.isDenied();
856 }
857
858
863 @Override
864 public boolean isDraft() {
865 return _dlFileVersion.isDraft();
866 }
867
868
873 @Override
874 public boolean isExpired() {
875 return _dlFileVersion.isExpired();
876 }
877
878
883 @Override
884 public boolean isInactive() {
885 return _dlFileVersion.isInactive();
886 }
887
888
893 @Override
894 public boolean isIncomplete() {
895 return _dlFileVersion.isIncomplete();
896 }
897
898
903 @Override
904 public boolean isPending() {
905 return _dlFileVersion.isPending();
906 }
907
908
913 @Override
914 public boolean isScheduled() {
915 return _dlFileVersion.isScheduled();
916 }
917
918 @Override
919 public boolean isNew() {
920 return _dlFileVersion.isNew();
921 }
922
923 @Override
924 public void setNew(boolean n) {
925 _dlFileVersion.setNew(n);
926 }
927
928 @Override
929 public boolean isCachedModel() {
930 return _dlFileVersion.isCachedModel();
931 }
932
933 @Override
934 public void setCachedModel(boolean cachedModel) {
935 _dlFileVersion.setCachedModel(cachedModel);
936 }
937
938 @Override
939 public boolean isEscapedModel() {
940 return _dlFileVersion.isEscapedModel();
941 }
942
943 @Override
944 public java.io.Serializable getPrimaryKeyObj() {
945 return _dlFileVersion.getPrimaryKeyObj();
946 }
947
948 @Override
949 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
950 _dlFileVersion.setPrimaryKeyObj(primaryKeyObj);
951 }
952
953 @Override
954 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
955 return _dlFileVersion.getExpandoBridge();
956 }
957
958 @Override
959 public void setExpandoBridgeAttributes(
960 com.liferay.portal.model.BaseModel<?> baseModel) {
961 _dlFileVersion.setExpandoBridgeAttributes(baseModel);
962 }
963
964 @Override
965 public void setExpandoBridgeAttributes(
966 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
967 _dlFileVersion.setExpandoBridgeAttributes(expandoBridge);
968 }
969
970 @Override
971 public void setExpandoBridgeAttributes(
972 com.liferay.portal.service.ServiceContext serviceContext) {
973 _dlFileVersion.setExpandoBridgeAttributes(serviceContext);
974 }
975
976 @Override
977 public java.lang.Object clone() {
978 return new DLFileVersionWrapper((DLFileVersion)_dlFileVersion.clone());
979 }
980
981 @Override
982 public int compareTo(
983 com.liferay.portlet.documentlibrary.model.DLFileVersion dlFileVersion) {
984 return _dlFileVersion.compareTo(dlFileVersion);
985 }
986
987 @Override
988 public int hashCode() {
989 return _dlFileVersion.hashCode();
990 }
991
992 @Override
993 public com.liferay.portal.model.CacheModel<com.liferay.portlet.documentlibrary.model.DLFileVersion> toCacheModel() {
994 return _dlFileVersion.toCacheModel();
995 }
996
997 @Override
998 public com.liferay.portlet.documentlibrary.model.DLFileVersion toEscapedModel() {
999 return new DLFileVersionWrapper(_dlFileVersion.toEscapedModel());
1000 }
1001
1002 @Override
1003 public com.liferay.portlet.documentlibrary.model.DLFileVersion toUnescapedModel() {
1004 return new DLFileVersionWrapper(_dlFileVersion.toUnescapedModel());
1005 }
1006
1007 @Override
1008 public java.lang.String toString() {
1009 return _dlFileVersion.toString();
1010 }
1011
1012 @Override
1013 public java.lang.String toXmlString() {
1014 return _dlFileVersion.toXmlString();
1015 }
1016
1017 @Override
1018 public void persist()
1019 throws com.liferay.portal.kernel.exception.SystemException {
1020 _dlFileVersion.persist();
1021 }
1022
1023 @Override
1024 public void updateTreePath(java.lang.String treePath)
1025 throws com.liferay.portal.kernel.exception.SystemException {
1026 _dlFileVersion.updateTreePath(treePath);
1027 }
1028
1029 @Override
1030 public java.lang.String buildTreePath()
1031 throws com.liferay.portal.kernel.exception.PortalException,
1032 com.liferay.portal.kernel.exception.SystemException {
1033 return _dlFileVersion.buildTreePath();
1034 }
1035
1036 @Override
1037 public java.io.InputStream getContentStream(boolean incrementCounter)
1038 throws com.liferay.portal.kernel.exception.PortalException,
1039 com.liferay.portal.kernel.exception.SystemException {
1040 return _dlFileVersion.getContentStream(incrementCounter);
1041 }
1042
1043 @Override
1044 public com.liferay.portal.kernel.util.UnicodeProperties getExtraSettingsProperties() {
1045 return _dlFileVersion.getExtraSettingsProperties();
1046 }
1047
1048 @Override
1049 public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry()
1050 throws com.liferay.portal.kernel.exception.PortalException,
1051 com.liferay.portal.kernel.exception.SystemException {
1052 return _dlFileVersion.getFileEntry();
1053 }
1054
1055 @Override
1056 public com.liferay.portlet.documentlibrary.model.DLFolder getFolder()
1057 throws com.liferay.portal.kernel.exception.PortalException,
1058 com.liferay.portal.kernel.exception.SystemException {
1059 return _dlFileVersion.getFolder();
1060 }
1061
1062 @Override
1063 public java.lang.String getIcon() {
1064 return _dlFileVersion.getIcon();
1065 }
1066
1067 @Override
1068 public void setExtraSettingsProperties(
1069 com.liferay.portal.kernel.util.UnicodeProperties extraSettingsProperties) {
1070 _dlFileVersion.setExtraSettingsProperties(extraSettingsProperties);
1071 }
1072
1073 @Override
1074 public boolean equals(Object obj) {
1075 if (this == obj) {
1076 return true;
1077 }
1078
1079 if (!(obj instanceof DLFileVersionWrapper)) {
1080 return false;
1081 }
1082
1083 DLFileVersionWrapper dlFileVersionWrapper = (DLFileVersionWrapper)obj;
1084
1085 if (Validator.equals(_dlFileVersion, dlFileVersionWrapper._dlFileVersion)) {
1086 return true;
1087 }
1088
1089 return false;
1090 }
1091
1092 @Override
1093 public StagedModelType getStagedModelType() {
1094 return _dlFileVersion.getStagedModelType();
1095 }
1096
1097
1100 public DLFileVersion getWrappedDLFileVersion() {
1101 return _dlFileVersion;
1102 }
1103
1104 @Override
1105 public DLFileVersion getWrappedModel() {
1106 return _dlFileVersion;
1107 }
1108
1109 @Override
1110 public void resetOriginalValues() {
1111 _dlFileVersion.resetOriginalValues();
1112 }
1113
1114 private DLFileVersion _dlFileVersion;
1115 }