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 DLFolderWrapper implements DLFolder, ModelWrapper<DLFolder> {
034 public DLFolderWrapper(DLFolder dlFolder) {
035 _dlFolder = dlFolder;
036 }
037
038 public Class<?> getModelClass() {
039 return DLFolder.class;
040 }
041
042 public String getModelClassName() {
043 return DLFolder.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("folderId", getFolderId());
051 attributes.put("groupId", getGroupId());
052 attributes.put("companyId", getCompanyId());
053 attributes.put("userId", getUserId());
054 attributes.put("userName", getUserName());
055 attributes.put("createDate", getCreateDate());
056 attributes.put("modifiedDate", getModifiedDate());
057 attributes.put("repositoryId", getRepositoryId());
058 attributes.put("mountPoint", getMountPoint());
059 attributes.put("parentFolderId", getParentFolderId());
060 attributes.put("name", getName());
061 attributes.put("description", getDescription());
062 attributes.put("lastPostDate", getLastPostDate());
063 attributes.put("defaultFileEntryTypeId", getDefaultFileEntryTypeId());
064 attributes.put("overrideFileEntryTypes", getOverrideFileEntryTypes());
065
066 return attributes;
067 }
068
069 public void setModelAttributes(Map<String, Object> attributes) {
070 String uuid = (String)attributes.get("uuid");
071
072 if (uuid != null) {
073 setUuid(uuid);
074 }
075
076 Long folderId = (Long)attributes.get("folderId");
077
078 if (folderId != null) {
079 setFolderId(folderId);
080 }
081
082 Long groupId = (Long)attributes.get("groupId");
083
084 if (groupId != null) {
085 setGroupId(groupId);
086 }
087
088 Long companyId = (Long)attributes.get("companyId");
089
090 if (companyId != null) {
091 setCompanyId(companyId);
092 }
093
094 Long userId = (Long)attributes.get("userId");
095
096 if (userId != null) {
097 setUserId(userId);
098 }
099
100 String userName = (String)attributes.get("userName");
101
102 if (userName != null) {
103 setUserName(userName);
104 }
105
106 Date createDate = (Date)attributes.get("createDate");
107
108 if (createDate != null) {
109 setCreateDate(createDate);
110 }
111
112 Date modifiedDate = (Date)attributes.get("modifiedDate");
113
114 if (modifiedDate != null) {
115 setModifiedDate(modifiedDate);
116 }
117
118 Long repositoryId = (Long)attributes.get("repositoryId");
119
120 if (repositoryId != null) {
121 setRepositoryId(repositoryId);
122 }
123
124 Boolean mountPoint = (Boolean)attributes.get("mountPoint");
125
126 if (mountPoint != null) {
127 setMountPoint(mountPoint);
128 }
129
130 Long parentFolderId = (Long)attributes.get("parentFolderId");
131
132 if (parentFolderId != null) {
133 setParentFolderId(parentFolderId);
134 }
135
136 String name = (String)attributes.get("name");
137
138 if (name != null) {
139 setName(name);
140 }
141
142 String description = (String)attributes.get("description");
143
144 if (description != null) {
145 setDescription(description);
146 }
147
148 Date lastPostDate = (Date)attributes.get("lastPostDate");
149
150 if (lastPostDate != null) {
151 setLastPostDate(lastPostDate);
152 }
153
154 Long defaultFileEntryTypeId = (Long)attributes.get(
155 "defaultFileEntryTypeId");
156
157 if (defaultFileEntryTypeId != null) {
158 setDefaultFileEntryTypeId(defaultFileEntryTypeId);
159 }
160
161 Boolean overrideFileEntryTypes = (Boolean)attributes.get(
162 "overrideFileEntryTypes");
163
164 if (overrideFileEntryTypes != null) {
165 setOverrideFileEntryTypes(overrideFileEntryTypes);
166 }
167 }
168
169
174 public long getPrimaryKey() {
175 return _dlFolder.getPrimaryKey();
176 }
177
178
183 public void setPrimaryKey(long primaryKey) {
184 _dlFolder.setPrimaryKey(primaryKey);
185 }
186
187
192 public java.lang.String getUuid() {
193 return _dlFolder.getUuid();
194 }
195
196
201 public void setUuid(java.lang.String uuid) {
202 _dlFolder.setUuid(uuid);
203 }
204
205
210 public long getFolderId() {
211 return _dlFolder.getFolderId();
212 }
213
214
219 public void setFolderId(long folderId) {
220 _dlFolder.setFolderId(folderId);
221 }
222
223
228 public long getGroupId() {
229 return _dlFolder.getGroupId();
230 }
231
232
237 public void setGroupId(long groupId) {
238 _dlFolder.setGroupId(groupId);
239 }
240
241
246 public long getCompanyId() {
247 return _dlFolder.getCompanyId();
248 }
249
250
255 public void setCompanyId(long companyId) {
256 _dlFolder.setCompanyId(companyId);
257 }
258
259
264 public long getUserId() {
265 return _dlFolder.getUserId();
266 }
267
268
273 public void setUserId(long userId) {
274 _dlFolder.setUserId(userId);
275 }
276
277
283 public java.lang.String getUserUuid()
284 throws com.liferay.portal.kernel.exception.SystemException {
285 return _dlFolder.getUserUuid();
286 }
287
288
293 public void setUserUuid(java.lang.String userUuid) {
294 _dlFolder.setUserUuid(userUuid);
295 }
296
297
302 public java.lang.String getUserName() {
303 return _dlFolder.getUserName();
304 }
305
306
311 public void setUserName(java.lang.String userName) {
312 _dlFolder.setUserName(userName);
313 }
314
315
320 public java.util.Date getCreateDate() {
321 return _dlFolder.getCreateDate();
322 }
323
324
329 public void setCreateDate(java.util.Date createDate) {
330 _dlFolder.setCreateDate(createDate);
331 }
332
333
338 public java.util.Date getModifiedDate() {
339 return _dlFolder.getModifiedDate();
340 }
341
342
347 public void setModifiedDate(java.util.Date modifiedDate) {
348 _dlFolder.setModifiedDate(modifiedDate);
349 }
350
351
356 public long getRepositoryId() {
357 return _dlFolder.getRepositoryId();
358 }
359
360
365 public void setRepositoryId(long repositoryId) {
366 _dlFolder.setRepositoryId(repositoryId);
367 }
368
369
374 public boolean getMountPoint() {
375 return _dlFolder.getMountPoint();
376 }
377
378
383 public boolean isMountPoint() {
384 return _dlFolder.isMountPoint();
385 }
386
387
392 public void setMountPoint(boolean mountPoint) {
393 _dlFolder.setMountPoint(mountPoint);
394 }
395
396
401 public long getParentFolderId() {
402 return _dlFolder.getParentFolderId();
403 }
404
405
410 public void setParentFolderId(long parentFolderId) {
411 _dlFolder.setParentFolderId(parentFolderId);
412 }
413
414
419 public java.lang.String getName() {
420 return _dlFolder.getName();
421 }
422
423
428 public void setName(java.lang.String name) {
429 _dlFolder.setName(name);
430 }
431
432
437 public java.lang.String getDescription() {
438 return _dlFolder.getDescription();
439 }
440
441
446 public void setDescription(java.lang.String description) {
447 _dlFolder.setDescription(description);
448 }
449
450
455 public java.util.Date getLastPostDate() {
456 return _dlFolder.getLastPostDate();
457 }
458
459
464 public void setLastPostDate(java.util.Date lastPostDate) {
465 _dlFolder.setLastPostDate(lastPostDate);
466 }
467
468
473 public long getDefaultFileEntryTypeId() {
474 return _dlFolder.getDefaultFileEntryTypeId();
475 }
476
477
482 public void setDefaultFileEntryTypeId(long defaultFileEntryTypeId) {
483 _dlFolder.setDefaultFileEntryTypeId(defaultFileEntryTypeId);
484 }
485
486
491 public boolean getOverrideFileEntryTypes() {
492 return _dlFolder.getOverrideFileEntryTypes();
493 }
494
495
500 public boolean isOverrideFileEntryTypes() {
501 return _dlFolder.isOverrideFileEntryTypes();
502 }
503
504
509 public void setOverrideFileEntryTypes(boolean overrideFileEntryTypes) {
510 _dlFolder.setOverrideFileEntryTypes(overrideFileEntryTypes);
511 }
512
513 public boolean isNew() {
514 return _dlFolder.isNew();
515 }
516
517 public void setNew(boolean n) {
518 _dlFolder.setNew(n);
519 }
520
521 public boolean isCachedModel() {
522 return _dlFolder.isCachedModel();
523 }
524
525 public void setCachedModel(boolean cachedModel) {
526 _dlFolder.setCachedModel(cachedModel);
527 }
528
529 public boolean isEscapedModel() {
530 return _dlFolder.isEscapedModel();
531 }
532
533 public java.io.Serializable getPrimaryKeyObj() {
534 return _dlFolder.getPrimaryKeyObj();
535 }
536
537 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
538 _dlFolder.setPrimaryKeyObj(primaryKeyObj);
539 }
540
541 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
542 return _dlFolder.getExpandoBridge();
543 }
544
545 public void setExpandoBridgeAttributes(
546 com.liferay.portal.service.ServiceContext serviceContext) {
547 _dlFolder.setExpandoBridgeAttributes(serviceContext);
548 }
549
550 @Override
551 public java.lang.Object clone() {
552 return new DLFolderWrapper((DLFolder)_dlFolder.clone());
553 }
554
555 public int compareTo(
556 com.liferay.portlet.documentlibrary.model.DLFolder dlFolder) {
557 return _dlFolder.compareTo(dlFolder);
558 }
559
560 @Override
561 public int hashCode() {
562 return _dlFolder.hashCode();
563 }
564
565 public com.liferay.portal.model.CacheModel<com.liferay.portlet.documentlibrary.model.DLFolder> toCacheModel() {
566 return _dlFolder.toCacheModel();
567 }
568
569 public com.liferay.portlet.documentlibrary.model.DLFolder toEscapedModel() {
570 return new DLFolderWrapper(_dlFolder.toEscapedModel());
571 }
572
573 public com.liferay.portlet.documentlibrary.model.DLFolder toUnescapedModel() {
574 return new DLFolderWrapper(_dlFolder.toUnescapedModel());
575 }
576
577 @Override
578 public java.lang.String toString() {
579 return _dlFolder.toString();
580 }
581
582 public java.lang.String toXmlString() {
583 return _dlFolder.toXmlString();
584 }
585
586 public void persist()
587 throws com.liferay.portal.kernel.exception.SystemException {
588 _dlFolder.persist();
589 }
590
591 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getAncestors()
592 throws com.liferay.portal.kernel.exception.PortalException,
593 com.liferay.portal.kernel.exception.SystemException {
594 return _dlFolder.getAncestors();
595 }
596
597 public com.liferay.portlet.documentlibrary.model.DLFolder getParentFolder()
598 throws com.liferay.portal.kernel.exception.PortalException,
599 com.liferay.portal.kernel.exception.SystemException {
600 return _dlFolder.getParentFolder();
601 }
602
603 public java.lang.String getPath()
604 throws com.liferay.portal.kernel.exception.PortalException,
605 com.liferay.portal.kernel.exception.SystemException {
606 return _dlFolder.getPath();
607 }
608
609 public java.lang.String[] getPathArray()
610 throws com.liferay.portal.kernel.exception.PortalException,
611 com.liferay.portal.kernel.exception.SystemException {
612 return _dlFolder.getPathArray();
613 }
614
615 public boolean hasInheritableLock() {
616 return _dlFolder.hasInheritableLock();
617 }
618
619 public boolean hasLock() {
620 return _dlFolder.hasLock();
621 }
622
623 public boolean isLocked() {
624 return _dlFolder.isLocked();
625 }
626
627 public boolean isRoot() {
628 return _dlFolder.isRoot();
629 }
630
631 @Override
632 public boolean equals(Object obj) {
633 if (this == obj) {
634 return true;
635 }
636
637 if (!(obj instanceof DLFolderWrapper)) {
638 return false;
639 }
640
641 DLFolderWrapper dlFolderWrapper = (DLFolderWrapper)obj;
642
643 if (Validator.equals(_dlFolder, dlFolderWrapper._dlFolder)) {
644 return true;
645 }
646
647 return false;
648 }
649
650
653 public DLFolder getWrappedDLFolder() {
654 return _dlFolder;
655 }
656
657 public DLFolder getWrappedModel() {
658 return _dlFolder;
659 }
660
661 public void resetOriginalValues() {
662 _dlFolder.resetOriginalValues();
663 }
664
665 private DLFolder _dlFolder;
666 }