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 DLFolderWrapper implements DLFolder, ModelWrapper<DLFolder> {
038 public DLFolderWrapper(DLFolder dlFolder) {
039 _dlFolder = dlFolder;
040 }
041
042 @Override
043 public Class<?> getModelClass() {
044 return DLFolder.class;
045 }
046
047 @Override
048 public String getModelClassName() {
049 return DLFolder.class.getName();
050 }
051
052 @Override
053 public Map<String, Object> getModelAttributes() {
054 Map<String, Object> attributes = new HashMap<String, Object>();
055
056 attributes.put("uuid", getUuid());
057 attributes.put("folderId", getFolderId());
058 attributes.put("groupId", getGroupId());
059 attributes.put("companyId", getCompanyId());
060 attributes.put("userId", getUserId());
061 attributes.put("userName", getUserName());
062 attributes.put("createDate", getCreateDate());
063 attributes.put("modifiedDate", getModifiedDate());
064 attributes.put("repositoryId", getRepositoryId());
065 attributes.put("mountPoint", getMountPoint());
066 attributes.put("parentFolderId", getParentFolderId());
067 attributes.put("treePath", getTreePath());
068 attributes.put("name", getName());
069 attributes.put("description", getDescription());
070 attributes.put("lastPostDate", getLastPostDate());
071 attributes.put("defaultFileEntryTypeId", getDefaultFileEntryTypeId());
072 attributes.put("hidden", getHidden());
073 attributes.put("overrideFileEntryTypes", getOverrideFileEntryTypes());
074 attributes.put("status", getStatus());
075 attributes.put("statusByUserId", getStatusByUserId());
076 attributes.put("statusByUserName", getStatusByUserName());
077 attributes.put("statusDate", getStatusDate());
078
079 return attributes;
080 }
081
082 @Override
083 public void setModelAttributes(Map<String, Object> attributes) {
084 String uuid = (String)attributes.get("uuid");
085
086 if (uuid != null) {
087 setUuid(uuid);
088 }
089
090 Long folderId = (Long)attributes.get("folderId");
091
092 if (folderId != null) {
093 setFolderId(folderId);
094 }
095
096 Long groupId = (Long)attributes.get("groupId");
097
098 if (groupId != null) {
099 setGroupId(groupId);
100 }
101
102 Long companyId = (Long)attributes.get("companyId");
103
104 if (companyId != null) {
105 setCompanyId(companyId);
106 }
107
108 Long userId = (Long)attributes.get("userId");
109
110 if (userId != null) {
111 setUserId(userId);
112 }
113
114 String userName = (String)attributes.get("userName");
115
116 if (userName != null) {
117 setUserName(userName);
118 }
119
120 Date createDate = (Date)attributes.get("createDate");
121
122 if (createDate != null) {
123 setCreateDate(createDate);
124 }
125
126 Date modifiedDate = (Date)attributes.get("modifiedDate");
127
128 if (modifiedDate != null) {
129 setModifiedDate(modifiedDate);
130 }
131
132 Long repositoryId = (Long)attributes.get("repositoryId");
133
134 if (repositoryId != null) {
135 setRepositoryId(repositoryId);
136 }
137
138 Boolean mountPoint = (Boolean)attributes.get("mountPoint");
139
140 if (mountPoint != null) {
141 setMountPoint(mountPoint);
142 }
143
144 Long parentFolderId = (Long)attributes.get("parentFolderId");
145
146 if (parentFolderId != null) {
147 setParentFolderId(parentFolderId);
148 }
149
150 String treePath = (String)attributes.get("treePath");
151
152 if (treePath != null) {
153 setTreePath(treePath);
154 }
155
156 String name = (String)attributes.get("name");
157
158 if (name != null) {
159 setName(name);
160 }
161
162 String description = (String)attributes.get("description");
163
164 if (description != null) {
165 setDescription(description);
166 }
167
168 Date lastPostDate = (Date)attributes.get("lastPostDate");
169
170 if (lastPostDate != null) {
171 setLastPostDate(lastPostDate);
172 }
173
174 Long defaultFileEntryTypeId = (Long)attributes.get(
175 "defaultFileEntryTypeId");
176
177 if (defaultFileEntryTypeId != null) {
178 setDefaultFileEntryTypeId(defaultFileEntryTypeId);
179 }
180
181 Boolean hidden = (Boolean)attributes.get("hidden");
182
183 if (hidden != null) {
184 setHidden(hidden);
185 }
186
187 Boolean overrideFileEntryTypes = (Boolean)attributes.get(
188 "overrideFileEntryTypes");
189
190 if (overrideFileEntryTypes != null) {
191 setOverrideFileEntryTypes(overrideFileEntryTypes);
192 }
193
194 Integer status = (Integer)attributes.get("status");
195
196 if (status != null) {
197 setStatus(status);
198 }
199
200 Long statusByUserId = (Long)attributes.get("statusByUserId");
201
202 if (statusByUserId != null) {
203 setStatusByUserId(statusByUserId);
204 }
205
206 String statusByUserName = (String)attributes.get("statusByUserName");
207
208 if (statusByUserName != null) {
209 setStatusByUserName(statusByUserName);
210 }
211
212 Date statusDate = (Date)attributes.get("statusDate");
213
214 if (statusDate != null) {
215 setStatusDate(statusDate);
216 }
217 }
218
219
224 @Override
225 public long getPrimaryKey() {
226 return _dlFolder.getPrimaryKey();
227 }
228
229
234 @Override
235 public void setPrimaryKey(long primaryKey) {
236 _dlFolder.setPrimaryKey(primaryKey);
237 }
238
239
244 @Override
245 public java.lang.String getUuid() {
246 return _dlFolder.getUuid();
247 }
248
249
254 @Override
255 public void setUuid(java.lang.String uuid) {
256 _dlFolder.setUuid(uuid);
257 }
258
259
264 @Override
265 public long getFolderId() {
266 return _dlFolder.getFolderId();
267 }
268
269
274 @Override
275 public void setFolderId(long folderId) {
276 _dlFolder.setFolderId(folderId);
277 }
278
279
284 @Override
285 public long getGroupId() {
286 return _dlFolder.getGroupId();
287 }
288
289
294 @Override
295 public void setGroupId(long groupId) {
296 _dlFolder.setGroupId(groupId);
297 }
298
299
304 @Override
305 public long getCompanyId() {
306 return _dlFolder.getCompanyId();
307 }
308
309
314 @Override
315 public void setCompanyId(long companyId) {
316 _dlFolder.setCompanyId(companyId);
317 }
318
319
324 @Override
325 public long getUserId() {
326 return _dlFolder.getUserId();
327 }
328
329
334 @Override
335 public void setUserId(long userId) {
336 _dlFolder.setUserId(userId);
337 }
338
339
345 @Override
346 public java.lang.String getUserUuid()
347 throws com.liferay.portal.kernel.exception.SystemException {
348 return _dlFolder.getUserUuid();
349 }
350
351
356 @Override
357 public void setUserUuid(java.lang.String userUuid) {
358 _dlFolder.setUserUuid(userUuid);
359 }
360
361
366 @Override
367 public java.lang.String getUserName() {
368 return _dlFolder.getUserName();
369 }
370
371
376 @Override
377 public void setUserName(java.lang.String userName) {
378 _dlFolder.setUserName(userName);
379 }
380
381
386 @Override
387 public java.util.Date getCreateDate() {
388 return _dlFolder.getCreateDate();
389 }
390
391
396 @Override
397 public void setCreateDate(java.util.Date createDate) {
398 _dlFolder.setCreateDate(createDate);
399 }
400
401
406 @Override
407 public java.util.Date getModifiedDate() {
408 return _dlFolder.getModifiedDate();
409 }
410
411
416 @Override
417 public void setModifiedDate(java.util.Date modifiedDate) {
418 _dlFolder.setModifiedDate(modifiedDate);
419 }
420
421
426 @Override
427 public long getRepositoryId() {
428 return _dlFolder.getRepositoryId();
429 }
430
431
436 @Override
437 public void setRepositoryId(long repositoryId) {
438 _dlFolder.setRepositoryId(repositoryId);
439 }
440
441
446 @Override
447 public boolean getMountPoint() {
448 return _dlFolder.getMountPoint();
449 }
450
451
456 @Override
457 public boolean isMountPoint() {
458 return _dlFolder.isMountPoint();
459 }
460
461
466 @Override
467 public void setMountPoint(boolean mountPoint) {
468 _dlFolder.setMountPoint(mountPoint);
469 }
470
471
476 @Override
477 public long getParentFolderId() {
478 return _dlFolder.getParentFolderId();
479 }
480
481
486 @Override
487 public void setParentFolderId(long parentFolderId) {
488 _dlFolder.setParentFolderId(parentFolderId);
489 }
490
491
496 @Override
497 public java.lang.String getTreePath() {
498 return _dlFolder.getTreePath();
499 }
500
501
506 @Override
507 public void setTreePath(java.lang.String treePath) {
508 _dlFolder.setTreePath(treePath);
509 }
510
511
516 @Override
517 public java.lang.String getName() {
518 return _dlFolder.getName();
519 }
520
521
526 @Override
527 public void setName(java.lang.String name) {
528 _dlFolder.setName(name);
529 }
530
531
536 @Override
537 public java.lang.String getDescription() {
538 return _dlFolder.getDescription();
539 }
540
541
546 @Override
547 public void setDescription(java.lang.String description) {
548 _dlFolder.setDescription(description);
549 }
550
551
556 @Override
557 public java.util.Date getLastPostDate() {
558 return _dlFolder.getLastPostDate();
559 }
560
561
566 @Override
567 public void setLastPostDate(java.util.Date lastPostDate) {
568 _dlFolder.setLastPostDate(lastPostDate);
569 }
570
571
576 @Override
577 public long getDefaultFileEntryTypeId() {
578 return _dlFolder.getDefaultFileEntryTypeId();
579 }
580
581
586 @Override
587 public void setDefaultFileEntryTypeId(long defaultFileEntryTypeId) {
588 _dlFolder.setDefaultFileEntryTypeId(defaultFileEntryTypeId);
589 }
590
591
596 @Override
597 public boolean getHidden() {
598 return _dlFolder.getHidden();
599 }
600
601
606 @Override
607 public boolean isHidden() {
608 return _dlFolder.isHidden();
609 }
610
611
616 @Override
617 public void setHidden(boolean hidden) {
618 _dlFolder.setHidden(hidden);
619 }
620
621
626 @Override
627 public boolean getOverrideFileEntryTypes() {
628 return _dlFolder.getOverrideFileEntryTypes();
629 }
630
631
636 @Override
637 public boolean isOverrideFileEntryTypes() {
638 return _dlFolder.isOverrideFileEntryTypes();
639 }
640
641
646 @Override
647 public void setOverrideFileEntryTypes(boolean overrideFileEntryTypes) {
648 _dlFolder.setOverrideFileEntryTypes(overrideFileEntryTypes);
649 }
650
651
656 @Override
657 public int getStatus() {
658 return _dlFolder.getStatus();
659 }
660
661
666 @Override
667 public void setStatus(int status) {
668 _dlFolder.setStatus(status);
669 }
670
671
676 @Override
677 public long getStatusByUserId() {
678 return _dlFolder.getStatusByUserId();
679 }
680
681
686 @Override
687 public void setStatusByUserId(long statusByUserId) {
688 _dlFolder.setStatusByUserId(statusByUserId);
689 }
690
691
697 @Override
698 public java.lang.String getStatusByUserUuid()
699 throws com.liferay.portal.kernel.exception.SystemException {
700 return _dlFolder.getStatusByUserUuid();
701 }
702
703
708 @Override
709 public void setStatusByUserUuid(java.lang.String statusByUserUuid) {
710 _dlFolder.setStatusByUserUuid(statusByUserUuid);
711 }
712
713
718 @Override
719 public java.lang.String getStatusByUserName() {
720 return _dlFolder.getStatusByUserName();
721 }
722
723
728 @Override
729 public void setStatusByUserName(java.lang.String statusByUserName) {
730 _dlFolder.setStatusByUserName(statusByUserName);
731 }
732
733
738 @Override
739 public java.util.Date getStatusDate() {
740 return _dlFolder.getStatusDate();
741 }
742
743
748 @Override
749 public void setStatusDate(java.util.Date statusDate) {
750 _dlFolder.setStatusDate(statusDate);
751 }
752
753
759 @Override
760 public com.liferay.portlet.trash.model.TrashEntry getTrashEntry()
761 throws com.liferay.portal.kernel.exception.PortalException,
762 com.liferay.portal.kernel.exception.SystemException {
763 return _dlFolder.getTrashEntry();
764 }
765
766
771 @Override
772 public long getTrashEntryClassPK() {
773 return _dlFolder.getTrashEntryClassPK();
774 }
775
776
781 @Override
782 public com.liferay.portal.kernel.trash.TrashHandler getTrashHandler() {
783 return _dlFolder.getTrashHandler();
784 }
785
786
791 @Override
792 public boolean isInTrash() {
793 return _dlFolder.isInTrash();
794 }
795
796
802 @Override
803 public boolean isInTrashContainer() {
804 return _dlFolder.isInTrashContainer();
805 }
806
807
810 @Override
811 public boolean getApproved() {
812 return _dlFolder.getApproved();
813 }
814
815
820 @Override
821 public boolean isApproved() {
822 return _dlFolder.isApproved();
823 }
824
825
830 @Override
831 public boolean isDenied() {
832 return _dlFolder.isDenied();
833 }
834
835
840 @Override
841 public boolean isDraft() {
842 return _dlFolder.isDraft();
843 }
844
845
850 @Override
851 public boolean isExpired() {
852 return _dlFolder.isExpired();
853 }
854
855
860 @Override
861 public boolean isInactive() {
862 return _dlFolder.isInactive();
863 }
864
865
870 @Override
871 public boolean isIncomplete() {
872 return _dlFolder.isIncomplete();
873 }
874
875
880 @Override
881 public boolean isPending() {
882 return _dlFolder.isPending();
883 }
884
885
890 @Override
891 public boolean isScheduled() {
892 return _dlFolder.isScheduled();
893 }
894
895
900 @Override
901 public long getContainerModelId() {
902 return _dlFolder.getContainerModelId();
903 }
904
905
910 @Override
911 public void setContainerModelId(long containerModelId) {
912 _dlFolder.setContainerModelId(containerModelId);
913 }
914
915
920 @Override
921 public java.lang.String getContainerModelName() {
922 return _dlFolder.getContainerModelName();
923 }
924
925
930 @Override
931 public long getParentContainerModelId() {
932 return _dlFolder.getParentContainerModelId();
933 }
934
935
940 @Override
941 public void setParentContainerModelId(long parentContainerModelId) {
942 _dlFolder.setParentContainerModelId(parentContainerModelId);
943 }
944
945 @Override
946 public boolean isNew() {
947 return _dlFolder.isNew();
948 }
949
950 @Override
951 public void setNew(boolean n) {
952 _dlFolder.setNew(n);
953 }
954
955 @Override
956 public boolean isCachedModel() {
957 return _dlFolder.isCachedModel();
958 }
959
960 @Override
961 public void setCachedModel(boolean cachedModel) {
962 _dlFolder.setCachedModel(cachedModel);
963 }
964
965 @Override
966 public boolean isEscapedModel() {
967 return _dlFolder.isEscapedModel();
968 }
969
970 @Override
971 public java.io.Serializable getPrimaryKeyObj() {
972 return _dlFolder.getPrimaryKeyObj();
973 }
974
975 @Override
976 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
977 _dlFolder.setPrimaryKeyObj(primaryKeyObj);
978 }
979
980 @Override
981 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
982 return _dlFolder.getExpandoBridge();
983 }
984
985 @Override
986 public void setExpandoBridgeAttributes(
987 com.liferay.portal.model.BaseModel<?> baseModel) {
988 _dlFolder.setExpandoBridgeAttributes(baseModel);
989 }
990
991 @Override
992 public void setExpandoBridgeAttributes(
993 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
994 _dlFolder.setExpandoBridgeAttributes(expandoBridge);
995 }
996
997 @Override
998 public void setExpandoBridgeAttributes(
999 com.liferay.portal.service.ServiceContext serviceContext) {
1000 _dlFolder.setExpandoBridgeAttributes(serviceContext);
1001 }
1002
1003 @Override
1004 public java.lang.Object clone() {
1005 return new DLFolderWrapper((DLFolder)_dlFolder.clone());
1006 }
1007
1008 @Override
1009 public int compareTo(
1010 com.liferay.portlet.documentlibrary.model.DLFolder dlFolder) {
1011 return _dlFolder.compareTo(dlFolder);
1012 }
1013
1014 @Override
1015 public int hashCode() {
1016 return _dlFolder.hashCode();
1017 }
1018
1019 @Override
1020 public com.liferay.portal.model.CacheModel<com.liferay.portlet.documentlibrary.model.DLFolder> toCacheModel() {
1021 return _dlFolder.toCacheModel();
1022 }
1023
1024 @Override
1025 public com.liferay.portlet.documentlibrary.model.DLFolder toEscapedModel() {
1026 return new DLFolderWrapper(_dlFolder.toEscapedModel());
1027 }
1028
1029 @Override
1030 public com.liferay.portlet.documentlibrary.model.DLFolder toUnescapedModel() {
1031 return new DLFolderWrapper(_dlFolder.toUnescapedModel());
1032 }
1033
1034 @Override
1035 public java.lang.String toString() {
1036 return _dlFolder.toString();
1037 }
1038
1039 @Override
1040 public java.lang.String toXmlString() {
1041 return _dlFolder.toXmlString();
1042 }
1043
1044 @Override
1045 public void persist()
1046 throws com.liferay.portal.kernel.exception.SystemException {
1047 _dlFolder.persist();
1048 }
1049
1050 @Override
1051 public java.lang.String buildTreePath()
1052 throws com.liferay.portal.kernel.exception.PortalException,
1053 com.liferay.portal.kernel.exception.SystemException {
1054 return _dlFolder.buildTreePath();
1055 }
1056
1057 @Override
1058 public void updateTreePath(java.lang.String treePath)
1059 throws com.liferay.portal.kernel.exception.SystemException {
1060 _dlFolder.updateTreePath(treePath);
1061 }
1062
1063 @Override
1064 public java.util.List<java.lang.Long> getAncestorFolderIds()
1065 throws com.liferay.portal.kernel.exception.PortalException,
1066 com.liferay.portal.kernel.exception.SystemException {
1067 return _dlFolder.getAncestorFolderIds();
1068 }
1069
1070 @Override
1071 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getAncestors()
1072 throws com.liferay.portal.kernel.exception.PortalException,
1073 com.liferay.portal.kernel.exception.SystemException {
1074 return _dlFolder.getAncestors();
1075 }
1076
1077 @Override
1078 public com.liferay.portlet.documentlibrary.model.DLFolder getParentFolder()
1079 throws com.liferay.portal.kernel.exception.PortalException,
1080 com.liferay.portal.kernel.exception.SystemException {
1081 return _dlFolder.getParentFolder();
1082 }
1083
1084 @Override
1085 public java.lang.String getPath()
1086 throws com.liferay.portal.kernel.exception.PortalException,
1087 com.liferay.portal.kernel.exception.SystemException {
1088 return _dlFolder.getPath();
1089 }
1090
1091 @Override
1092 public java.lang.String[] getPathArray()
1093 throws com.liferay.portal.kernel.exception.PortalException,
1094 com.liferay.portal.kernel.exception.SystemException {
1095 return _dlFolder.getPathArray();
1096 }
1097
1098 @Override
1099 public boolean hasInheritableLock() {
1100 return _dlFolder.hasInheritableLock();
1101 }
1102
1103 @Override
1104 public boolean hasLock() {
1105 return _dlFolder.hasLock();
1106 }
1107
1108 @Override
1109 public boolean isInHiddenFolder() {
1110 return _dlFolder.isInHiddenFolder();
1111 }
1112
1113 @Override
1114 public boolean isInTrashExplicitly()
1115 throws com.liferay.portal.kernel.exception.SystemException {
1116 return _dlFolder.isInTrashExplicitly();
1117 }
1118
1119 @Override
1120 public boolean isLocked() {
1121 return _dlFolder.isLocked();
1122 }
1123
1124 @Override
1125 public boolean isRoot() {
1126 return _dlFolder.isRoot();
1127 }
1128
1129 @Override
1130 public boolean equals(Object obj) {
1131 if (this == obj) {
1132 return true;
1133 }
1134
1135 if (!(obj instanceof DLFolderWrapper)) {
1136 return false;
1137 }
1138
1139 DLFolderWrapper dlFolderWrapper = (DLFolderWrapper)obj;
1140
1141 if (Validator.equals(_dlFolder, dlFolderWrapper._dlFolder)) {
1142 return true;
1143 }
1144
1145 return false;
1146 }
1147
1148 @Override
1149 public StagedModelType getStagedModelType() {
1150 return _dlFolder.getStagedModelType();
1151 }
1152
1153
1156 public DLFolder getWrappedDLFolder() {
1157 return _dlFolder;
1158 }
1159
1160 @Override
1161 public DLFolder getWrappedModel() {
1162 return _dlFolder;
1163 }
1164
1165 @Override
1166 public void resetOriginalValues() {
1167 _dlFolder.resetOriginalValues();
1168 }
1169
1170 private DLFolder _dlFolder;
1171 }