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 DLFileVersionWrapper implements DLFileVersion,
034 ModelWrapper<DLFileVersion> {
035 public DLFileVersionWrapper(DLFileVersion dlFileVersion) {
036 _dlFileVersion = dlFileVersion;
037 }
038
039 public Class<?> getModelClass() {
040 return DLFileVersion.class;
041 }
042
043 public String getModelClassName() {
044 return DLFileVersion.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("fileVersionId", getFileVersionId());
052 attributes.put("groupId", getGroupId());
053 attributes.put("companyId", getCompanyId());
054 attributes.put("userId", getUserId());
055 attributes.put("userName", getUserName());
056 attributes.put("createDate", getCreateDate());
057 attributes.put("modifiedDate", getModifiedDate());
058 attributes.put("repositoryId", getRepositoryId());
059 attributes.put("folderId", getFolderId());
060 attributes.put("fileEntryId", getFileEntryId());
061 attributes.put("extension", getExtension());
062 attributes.put("mimeType", getMimeType());
063 attributes.put("title", getTitle());
064 attributes.put("description", getDescription());
065 attributes.put("changeLog", getChangeLog());
066 attributes.put("extraSettings", getExtraSettings());
067 attributes.put("fileEntryTypeId", getFileEntryTypeId());
068 attributes.put("version", getVersion());
069 attributes.put("size", getSize());
070 attributes.put("status", getStatus());
071 attributes.put("statusByUserId", getStatusByUserId());
072 attributes.put("statusByUserName", getStatusByUserName());
073 attributes.put("statusDate", getStatusDate());
074
075 return attributes;
076 }
077
078 public void setModelAttributes(Map<String, Object> attributes) {
079 String uuid = (String)attributes.get("uuid");
080
081 if (uuid != null) {
082 setUuid(uuid);
083 }
084
085 Long fileVersionId = (Long)attributes.get("fileVersionId");
086
087 if (fileVersionId != null) {
088 setFileVersionId(fileVersionId);
089 }
090
091 Long groupId = (Long)attributes.get("groupId");
092
093 if (groupId != null) {
094 setGroupId(groupId);
095 }
096
097 Long companyId = (Long)attributes.get("companyId");
098
099 if (companyId != null) {
100 setCompanyId(companyId);
101 }
102
103 Long userId = (Long)attributes.get("userId");
104
105 if (userId != null) {
106 setUserId(userId);
107 }
108
109 String userName = (String)attributes.get("userName");
110
111 if (userName != null) {
112 setUserName(userName);
113 }
114
115 Date createDate = (Date)attributes.get("createDate");
116
117 if (createDate != null) {
118 setCreateDate(createDate);
119 }
120
121 Date modifiedDate = (Date)attributes.get("modifiedDate");
122
123 if (modifiedDate != null) {
124 setModifiedDate(modifiedDate);
125 }
126
127 Long repositoryId = (Long)attributes.get("repositoryId");
128
129 if (repositoryId != null) {
130 setRepositoryId(repositoryId);
131 }
132
133 Long folderId = (Long)attributes.get("folderId");
134
135 if (folderId != null) {
136 setFolderId(folderId);
137 }
138
139 Long fileEntryId = (Long)attributes.get("fileEntryId");
140
141 if (fileEntryId != null) {
142 setFileEntryId(fileEntryId);
143 }
144
145 String extension = (String)attributes.get("extension");
146
147 if (extension != null) {
148 setExtension(extension);
149 }
150
151 String mimeType = (String)attributes.get("mimeType");
152
153 if (mimeType != null) {
154 setMimeType(mimeType);
155 }
156
157 String title = (String)attributes.get("title");
158
159 if (title != null) {
160 setTitle(title);
161 }
162
163 String description = (String)attributes.get("description");
164
165 if (description != null) {
166 setDescription(description);
167 }
168
169 String changeLog = (String)attributes.get("changeLog");
170
171 if (changeLog != null) {
172 setChangeLog(changeLog);
173 }
174
175 String extraSettings = (String)attributes.get("extraSettings");
176
177 if (extraSettings != null) {
178 setExtraSettings(extraSettings);
179 }
180
181 Long fileEntryTypeId = (Long)attributes.get("fileEntryTypeId");
182
183 if (fileEntryTypeId != null) {
184 setFileEntryTypeId(fileEntryTypeId);
185 }
186
187 String version = (String)attributes.get("version");
188
189 if (version != null) {
190 setVersion(version);
191 }
192
193 Long size = (Long)attributes.get("size");
194
195 if (size != null) {
196 setSize(size);
197 }
198
199 Integer status = (Integer)attributes.get("status");
200
201 if (status != null) {
202 setStatus(status);
203 }
204
205 Long statusByUserId = (Long)attributes.get("statusByUserId");
206
207 if (statusByUserId != null) {
208 setStatusByUserId(statusByUserId);
209 }
210
211 String statusByUserName = (String)attributes.get("statusByUserName");
212
213 if (statusByUserName != null) {
214 setStatusByUserName(statusByUserName);
215 }
216
217 Date statusDate = (Date)attributes.get("statusDate");
218
219 if (statusDate != null) {
220 setStatusDate(statusDate);
221 }
222 }
223
224
229 public long getPrimaryKey() {
230 return _dlFileVersion.getPrimaryKey();
231 }
232
233
238 public void setPrimaryKey(long primaryKey) {
239 _dlFileVersion.setPrimaryKey(primaryKey);
240 }
241
242
247 public java.lang.String getUuid() {
248 return _dlFileVersion.getUuid();
249 }
250
251
256 public void setUuid(java.lang.String uuid) {
257 _dlFileVersion.setUuid(uuid);
258 }
259
260
265 public long getFileVersionId() {
266 return _dlFileVersion.getFileVersionId();
267 }
268
269
274 public void setFileVersionId(long fileVersionId) {
275 _dlFileVersion.setFileVersionId(fileVersionId);
276 }
277
278
283 public long getGroupId() {
284 return _dlFileVersion.getGroupId();
285 }
286
287
292 public void setGroupId(long groupId) {
293 _dlFileVersion.setGroupId(groupId);
294 }
295
296
301 public long getCompanyId() {
302 return _dlFileVersion.getCompanyId();
303 }
304
305
310 public void setCompanyId(long companyId) {
311 _dlFileVersion.setCompanyId(companyId);
312 }
313
314
319 public long getUserId() {
320 return _dlFileVersion.getUserId();
321 }
322
323
328 public void setUserId(long userId) {
329 _dlFileVersion.setUserId(userId);
330 }
331
332
338 public java.lang.String getUserUuid()
339 throws com.liferay.portal.kernel.exception.SystemException {
340 return _dlFileVersion.getUserUuid();
341 }
342
343
348 public void setUserUuid(java.lang.String userUuid) {
349 _dlFileVersion.setUserUuid(userUuid);
350 }
351
352
357 public java.lang.String getUserName() {
358 return _dlFileVersion.getUserName();
359 }
360
361
366 public void setUserName(java.lang.String userName) {
367 _dlFileVersion.setUserName(userName);
368 }
369
370
375 public java.util.Date getCreateDate() {
376 return _dlFileVersion.getCreateDate();
377 }
378
379
384 public void setCreateDate(java.util.Date createDate) {
385 _dlFileVersion.setCreateDate(createDate);
386 }
387
388
393 public java.util.Date getModifiedDate() {
394 return _dlFileVersion.getModifiedDate();
395 }
396
397
402 public void setModifiedDate(java.util.Date modifiedDate) {
403 _dlFileVersion.setModifiedDate(modifiedDate);
404 }
405
406
411 public long getRepositoryId() {
412 return _dlFileVersion.getRepositoryId();
413 }
414
415
420 public void setRepositoryId(long repositoryId) {
421 _dlFileVersion.setRepositoryId(repositoryId);
422 }
423
424
429 public long getFolderId() {
430 return _dlFileVersion.getFolderId();
431 }
432
433
438 public void setFolderId(long folderId) {
439 _dlFileVersion.setFolderId(folderId);
440 }
441
442
447 public long getFileEntryId() {
448 return _dlFileVersion.getFileEntryId();
449 }
450
451
456 public void setFileEntryId(long fileEntryId) {
457 _dlFileVersion.setFileEntryId(fileEntryId);
458 }
459
460
465 public java.lang.String getExtension() {
466 return _dlFileVersion.getExtension();
467 }
468
469
474 public void setExtension(java.lang.String extension) {
475 _dlFileVersion.setExtension(extension);
476 }
477
478
483 public java.lang.String getMimeType() {
484 return _dlFileVersion.getMimeType();
485 }
486
487
492 public void setMimeType(java.lang.String mimeType) {
493 _dlFileVersion.setMimeType(mimeType);
494 }
495
496
501 public java.lang.String getTitle() {
502 return _dlFileVersion.getTitle();
503 }
504
505
510 public void setTitle(java.lang.String title) {
511 _dlFileVersion.setTitle(title);
512 }
513
514
519 public java.lang.String getDescription() {
520 return _dlFileVersion.getDescription();
521 }
522
523
528 public void setDescription(java.lang.String description) {
529 _dlFileVersion.setDescription(description);
530 }
531
532
537 public java.lang.String getChangeLog() {
538 return _dlFileVersion.getChangeLog();
539 }
540
541
546 public void setChangeLog(java.lang.String changeLog) {
547 _dlFileVersion.setChangeLog(changeLog);
548 }
549
550
555 public java.lang.String getExtraSettings() {
556 return _dlFileVersion.getExtraSettings();
557 }
558
559
564 public void setExtraSettings(java.lang.String extraSettings) {
565 _dlFileVersion.setExtraSettings(extraSettings);
566 }
567
568
573 public long getFileEntryTypeId() {
574 return _dlFileVersion.getFileEntryTypeId();
575 }
576
577
582 public void setFileEntryTypeId(long fileEntryTypeId) {
583 _dlFileVersion.setFileEntryTypeId(fileEntryTypeId);
584 }
585
586
591 public java.lang.String getVersion() {
592 return _dlFileVersion.getVersion();
593 }
594
595
600 public void setVersion(java.lang.String version) {
601 _dlFileVersion.setVersion(version);
602 }
603
604
609 public long getSize() {
610 return _dlFileVersion.getSize();
611 }
612
613
618 public void setSize(long size) {
619 _dlFileVersion.setSize(size);
620 }
621
622
627 public int getStatus() {
628 return _dlFileVersion.getStatus();
629 }
630
631
636 public void setStatus(int status) {
637 _dlFileVersion.setStatus(status);
638 }
639
640
645 public long getStatusByUserId() {
646 return _dlFileVersion.getStatusByUserId();
647 }
648
649
654 public void setStatusByUserId(long statusByUserId) {
655 _dlFileVersion.setStatusByUserId(statusByUserId);
656 }
657
658
664 public java.lang.String getStatusByUserUuid()
665 throws com.liferay.portal.kernel.exception.SystemException {
666 return _dlFileVersion.getStatusByUserUuid();
667 }
668
669
674 public void setStatusByUserUuid(java.lang.String statusByUserUuid) {
675 _dlFileVersion.setStatusByUserUuid(statusByUserUuid);
676 }
677
678
683 public java.lang.String getStatusByUserName() {
684 return _dlFileVersion.getStatusByUserName();
685 }
686
687
692 public void setStatusByUserName(java.lang.String statusByUserName) {
693 _dlFileVersion.setStatusByUserName(statusByUserName);
694 }
695
696
701 public java.util.Date getStatusDate() {
702 return _dlFileVersion.getStatusDate();
703 }
704
705
710 public void setStatusDate(java.util.Date statusDate) {
711 _dlFileVersion.setStatusDate(statusDate);
712 }
713
714
717 public boolean getApproved() {
718 return _dlFileVersion.getApproved();
719 }
720
721
726 public boolean isApproved() {
727 return _dlFileVersion.isApproved();
728 }
729
730
735 public boolean isDenied() {
736 return _dlFileVersion.isDenied();
737 }
738
739
744 public boolean isDraft() {
745 return _dlFileVersion.isDraft();
746 }
747
748
753 public boolean isExpired() {
754 return _dlFileVersion.isExpired();
755 }
756
757
762 public boolean isInactive() {
763 return _dlFileVersion.isInactive();
764 }
765
766
771 public boolean isIncomplete() {
772 return _dlFileVersion.isIncomplete();
773 }
774
775
780 public boolean isPending() {
781 return _dlFileVersion.isPending();
782 }
783
784
789 public boolean isScheduled() {
790 return _dlFileVersion.isScheduled();
791 }
792
793 public boolean isNew() {
794 return _dlFileVersion.isNew();
795 }
796
797 public void setNew(boolean n) {
798 _dlFileVersion.setNew(n);
799 }
800
801 public boolean isCachedModel() {
802 return _dlFileVersion.isCachedModel();
803 }
804
805 public void setCachedModel(boolean cachedModel) {
806 _dlFileVersion.setCachedModel(cachedModel);
807 }
808
809 public boolean isEscapedModel() {
810 return _dlFileVersion.isEscapedModel();
811 }
812
813 public java.io.Serializable getPrimaryKeyObj() {
814 return _dlFileVersion.getPrimaryKeyObj();
815 }
816
817 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
818 _dlFileVersion.setPrimaryKeyObj(primaryKeyObj);
819 }
820
821 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
822 return _dlFileVersion.getExpandoBridge();
823 }
824
825 public void setExpandoBridgeAttributes(
826 com.liferay.portal.service.ServiceContext serviceContext) {
827 _dlFileVersion.setExpandoBridgeAttributes(serviceContext);
828 }
829
830 @Override
831 public java.lang.Object clone() {
832 return new DLFileVersionWrapper((DLFileVersion)_dlFileVersion.clone());
833 }
834
835 public int compareTo(
836 com.liferay.portlet.documentlibrary.model.DLFileVersion dlFileVersion) {
837 return _dlFileVersion.compareTo(dlFileVersion);
838 }
839
840 @Override
841 public int hashCode() {
842 return _dlFileVersion.hashCode();
843 }
844
845 public com.liferay.portal.model.CacheModel<com.liferay.portlet.documentlibrary.model.DLFileVersion> toCacheModel() {
846 return _dlFileVersion.toCacheModel();
847 }
848
849 public com.liferay.portlet.documentlibrary.model.DLFileVersion toEscapedModel() {
850 return new DLFileVersionWrapper(_dlFileVersion.toEscapedModel());
851 }
852
853 public com.liferay.portlet.documentlibrary.model.DLFileVersion toUnescapedModel() {
854 return new DLFileVersionWrapper(_dlFileVersion.toUnescapedModel());
855 }
856
857 @Override
858 public java.lang.String toString() {
859 return _dlFileVersion.toString();
860 }
861
862 public java.lang.String toXmlString() {
863 return _dlFileVersion.toXmlString();
864 }
865
866 public void persist()
867 throws com.liferay.portal.kernel.exception.SystemException {
868 _dlFileVersion.persist();
869 }
870
871 public java.lang.String getChecksum()
872 throws com.liferay.portal.kernel.exception.PortalException,
873 com.liferay.portal.kernel.exception.SystemException {
874 return _dlFileVersion.getChecksum();
875 }
876
877 public java.io.InputStream getContentStream(boolean incrementCounter)
878 throws com.liferay.portal.kernel.exception.PortalException,
879 com.liferay.portal.kernel.exception.SystemException {
880 return _dlFileVersion.getContentStream(incrementCounter);
881 }
882
883 public com.liferay.portal.kernel.util.UnicodeProperties getExtraSettingsProperties() {
884 return _dlFileVersion.getExtraSettingsProperties();
885 }
886
887 public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry()
888 throws com.liferay.portal.kernel.exception.PortalException,
889 com.liferay.portal.kernel.exception.SystemException {
890 return _dlFileVersion.getFileEntry();
891 }
892
893 public com.liferay.portlet.documentlibrary.model.DLFolder getFolder() {
894 return _dlFileVersion.getFolder();
895 }
896
897 public java.lang.String getIcon() {
898 return _dlFileVersion.getIcon();
899 }
900
901 public void setChecksum(java.lang.String checksum)
902 throws com.liferay.portal.kernel.exception.PortalException,
903 com.liferay.portal.kernel.exception.SystemException {
904 _dlFileVersion.setChecksum(checksum);
905 }
906
907 public void setExtraSettingsProperties(
908 com.liferay.portal.kernel.util.UnicodeProperties extraSettingsProperties) {
909 _dlFileVersion.setExtraSettingsProperties(extraSettingsProperties);
910 }
911
912 @Override
913 public boolean equals(Object obj) {
914 if (this == obj) {
915 return true;
916 }
917
918 if (!(obj instanceof DLFileVersionWrapper)) {
919 return false;
920 }
921
922 DLFileVersionWrapper dlFileVersionWrapper = (DLFileVersionWrapper)obj;
923
924 if (Validator.equals(_dlFileVersion, dlFileVersionWrapper._dlFileVersion)) {
925 return true;
926 }
927
928 return false;
929 }
930
931
934 public DLFileVersion getWrappedDLFileVersion() {
935 return _dlFileVersion;
936 }
937
938 public DLFileVersion getWrappedModel() {
939 return _dlFileVersion;
940 }
941
942 public void resetOriginalValues() {
943 _dlFileVersion.resetOriginalValues();
944 }
945
946 private DLFileVersion _dlFileVersion;
947 }