001
014
015 package com.liferay.portlet.bookmarks.model;
016
017 import com.liferay.portal.kernel.lar.StagedModelType;
018 import com.liferay.portal.kernel.util.Validator;
019 import com.liferay.portal.model.ModelWrapper;
020
021 import java.util.Date;
022 import java.util.HashMap;
023 import java.util.Map;
024
025
034 public class BookmarksEntryWrapper implements BookmarksEntry,
035 ModelWrapper<BookmarksEntry> {
036 public BookmarksEntryWrapper(BookmarksEntry bookmarksEntry) {
037 _bookmarksEntry = bookmarksEntry;
038 }
039
040 @Override
041 public Class<?> getModelClass() {
042 return BookmarksEntry.class;
043 }
044
045 @Override
046 public String getModelClassName() {
047 return BookmarksEntry.class.getName();
048 }
049
050 @Override
051 public Map<String, Object> getModelAttributes() {
052 Map<String, Object> attributes = new HashMap<String, Object>();
053
054 attributes.put("uuid", getUuid());
055 attributes.put("entryId", getEntryId());
056 attributes.put("groupId", getGroupId());
057 attributes.put("companyId", getCompanyId());
058 attributes.put("userId", getUserId());
059 attributes.put("userName", getUserName());
060 attributes.put("createDate", getCreateDate());
061 attributes.put("modifiedDate", getModifiedDate());
062 attributes.put("resourceBlockId", getResourceBlockId());
063 attributes.put("folderId", getFolderId());
064 attributes.put("treePath", getTreePath());
065 attributes.put("name", getName());
066 attributes.put("url", getUrl());
067 attributes.put("description", getDescription());
068 attributes.put("visits", getVisits());
069 attributes.put("priority", getPriority());
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 @Override
079 public void setModelAttributes(Map<String, Object> attributes) {
080 String uuid = (String)attributes.get("uuid");
081
082 if (uuid != null) {
083 setUuid(uuid);
084 }
085
086 Long entryId = (Long)attributes.get("entryId");
087
088 if (entryId != null) {
089 setEntryId(entryId);
090 }
091
092 Long groupId = (Long)attributes.get("groupId");
093
094 if (groupId != null) {
095 setGroupId(groupId);
096 }
097
098 Long companyId = (Long)attributes.get("companyId");
099
100 if (companyId != null) {
101 setCompanyId(companyId);
102 }
103
104 Long userId = (Long)attributes.get("userId");
105
106 if (userId != null) {
107 setUserId(userId);
108 }
109
110 String userName = (String)attributes.get("userName");
111
112 if (userName != null) {
113 setUserName(userName);
114 }
115
116 Date createDate = (Date)attributes.get("createDate");
117
118 if (createDate != null) {
119 setCreateDate(createDate);
120 }
121
122 Date modifiedDate = (Date)attributes.get("modifiedDate");
123
124 if (modifiedDate != null) {
125 setModifiedDate(modifiedDate);
126 }
127
128 Long resourceBlockId = (Long)attributes.get("resourceBlockId");
129
130 if (resourceBlockId != null) {
131 setResourceBlockId(resourceBlockId);
132 }
133
134 Long folderId = (Long)attributes.get("folderId");
135
136 if (folderId != null) {
137 setFolderId(folderId);
138 }
139
140 String treePath = (String)attributes.get("treePath");
141
142 if (treePath != null) {
143 setTreePath(treePath);
144 }
145
146 String name = (String)attributes.get("name");
147
148 if (name != null) {
149 setName(name);
150 }
151
152 String url = (String)attributes.get("url");
153
154 if (url != null) {
155 setUrl(url);
156 }
157
158 String description = (String)attributes.get("description");
159
160 if (description != null) {
161 setDescription(description);
162 }
163
164 Integer visits = (Integer)attributes.get("visits");
165
166 if (visits != null) {
167 setVisits(visits);
168 }
169
170 Integer priority = (Integer)attributes.get("priority");
171
172 if (priority != null) {
173 setPriority(priority);
174 }
175
176 Integer status = (Integer)attributes.get("status");
177
178 if (status != null) {
179 setStatus(status);
180 }
181
182 Long statusByUserId = (Long)attributes.get("statusByUserId");
183
184 if (statusByUserId != null) {
185 setStatusByUserId(statusByUserId);
186 }
187
188 String statusByUserName = (String)attributes.get("statusByUserName");
189
190 if (statusByUserName != null) {
191 setStatusByUserName(statusByUserName);
192 }
193
194 Date statusDate = (Date)attributes.get("statusDate");
195
196 if (statusDate != null) {
197 setStatusDate(statusDate);
198 }
199 }
200
201
206 @Override
207 public long getPrimaryKey() {
208 return _bookmarksEntry.getPrimaryKey();
209 }
210
211
216 @Override
217 public void setPrimaryKey(long primaryKey) {
218 _bookmarksEntry.setPrimaryKey(primaryKey);
219 }
220
221
226 @Override
227 public java.lang.String getUuid() {
228 return _bookmarksEntry.getUuid();
229 }
230
231
236 @Override
237 public void setUuid(java.lang.String uuid) {
238 _bookmarksEntry.setUuid(uuid);
239 }
240
241
246 @Override
247 public long getEntryId() {
248 return _bookmarksEntry.getEntryId();
249 }
250
251
256 @Override
257 public void setEntryId(long entryId) {
258 _bookmarksEntry.setEntryId(entryId);
259 }
260
261
266 @Override
267 public long getGroupId() {
268 return _bookmarksEntry.getGroupId();
269 }
270
271
276 @Override
277 public void setGroupId(long groupId) {
278 _bookmarksEntry.setGroupId(groupId);
279 }
280
281
286 @Override
287 public long getCompanyId() {
288 return _bookmarksEntry.getCompanyId();
289 }
290
291
296 @Override
297 public void setCompanyId(long companyId) {
298 _bookmarksEntry.setCompanyId(companyId);
299 }
300
301
306 @Override
307 public long getUserId() {
308 return _bookmarksEntry.getUserId();
309 }
310
311
316 @Override
317 public void setUserId(long userId) {
318 _bookmarksEntry.setUserId(userId);
319 }
320
321
327 @Override
328 public java.lang.String getUserUuid()
329 throws com.liferay.portal.kernel.exception.SystemException {
330 return _bookmarksEntry.getUserUuid();
331 }
332
333
338 @Override
339 public void setUserUuid(java.lang.String userUuid) {
340 _bookmarksEntry.setUserUuid(userUuid);
341 }
342
343
348 @Override
349 public java.lang.String getUserName() {
350 return _bookmarksEntry.getUserName();
351 }
352
353
358 @Override
359 public void setUserName(java.lang.String userName) {
360 _bookmarksEntry.setUserName(userName);
361 }
362
363
368 @Override
369 public java.util.Date getCreateDate() {
370 return _bookmarksEntry.getCreateDate();
371 }
372
373
378 @Override
379 public void setCreateDate(java.util.Date createDate) {
380 _bookmarksEntry.setCreateDate(createDate);
381 }
382
383
388 @Override
389 public java.util.Date getModifiedDate() {
390 return _bookmarksEntry.getModifiedDate();
391 }
392
393
398 @Override
399 public void setModifiedDate(java.util.Date modifiedDate) {
400 _bookmarksEntry.setModifiedDate(modifiedDate);
401 }
402
403
408 @Override
409 public long getResourceBlockId() {
410 return _bookmarksEntry.getResourceBlockId();
411 }
412
413
418 @Override
419 public void setResourceBlockId(long resourceBlockId) {
420 _bookmarksEntry.setResourceBlockId(resourceBlockId);
421 }
422
423
428 @Override
429 public long getFolderId() {
430 return _bookmarksEntry.getFolderId();
431 }
432
433
438 @Override
439 public void setFolderId(long folderId) {
440 _bookmarksEntry.setFolderId(folderId);
441 }
442
443
448 @Override
449 public java.lang.String getTreePath() {
450 return _bookmarksEntry.getTreePath();
451 }
452
453
458 @Override
459 public void setTreePath(java.lang.String treePath) {
460 _bookmarksEntry.setTreePath(treePath);
461 }
462
463
468 @Override
469 public java.lang.String getName() {
470 return _bookmarksEntry.getName();
471 }
472
473
478 @Override
479 public void setName(java.lang.String name) {
480 _bookmarksEntry.setName(name);
481 }
482
483
488 @Override
489 public java.lang.String getUrl() {
490 return _bookmarksEntry.getUrl();
491 }
492
493
498 @Override
499 public void setUrl(java.lang.String url) {
500 _bookmarksEntry.setUrl(url);
501 }
502
503
508 @Override
509 public java.lang.String getDescription() {
510 return _bookmarksEntry.getDescription();
511 }
512
513
518 @Override
519 public void setDescription(java.lang.String description) {
520 _bookmarksEntry.setDescription(description);
521 }
522
523
528 @Override
529 public int getVisits() {
530 return _bookmarksEntry.getVisits();
531 }
532
533
538 @Override
539 public void setVisits(int visits) {
540 _bookmarksEntry.setVisits(visits);
541 }
542
543
548 @Override
549 public int getPriority() {
550 return _bookmarksEntry.getPriority();
551 }
552
553
558 @Override
559 public void setPriority(int priority) {
560 _bookmarksEntry.setPriority(priority);
561 }
562
563
568 @Override
569 public int getStatus() {
570 return _bookmarksEntry.getStatus();
571 }
572
573
578 @Override
579 public void setStatus(int status) {
580 _bookmarksEntry.setStatus(status);
581 }
582
583
588 @Override
589 public long getStatusByUserId() {
590 return _bookmarksEntry.getStatusByUserId();
591 }
592
593
598 @Override
599 public void setStatusByUserId(long statusByUserId) {
600 _bookmarksEntry.setStatusByUserId(statusByUserId);
601 }
602
603
609 @Override
610 public java.lang.String getStatusByUserUuid()
611 throws com.liferay.portal.kernel.exception.SystemException {
612 return _bookmarksEntry.getStatusByUserUuid();
613 }
614
615
620 @Override
621 public void setStatusByUserUuid(java.lang.String statusByUserUuid) {
622 _bookmarksEntry.setStatusByUserUuid(statusByUserUuid);
623 }
624
625
630 @Override
631 public java.lang.String getStatusByUserName() {
632 return _bookmarksEntry.getStatusByUserName();
633 }
634
635
640 @Override
641 public void setStatusByUserName(java.lang.String statusByUserName) {
642 _bookmarksEntry.setStatusByUserName(statusByUserName);
643 }
644
645
650 @Override
651 public java.util.Date getStatusDate() {
652 return _bookmarksEntry.getStatusDate();
653 }
654
655
660 @Override
661 public void setStatusDate(java.util.Date statusDate) {
662 _bookmarksEntry.setStatusDate(statusDate);
663 }
664
665
671 @Override
672 public com.liferay.portlet.trash.model.TrashEntry getTrashEntry()
673 throws com.liferay.portal.kernel.exception.PortalException,
674 com.liferay.portal.kernel.exception.SystemException {
675 return _bookmarksEntry.getTrashEntry();
676 }
677
678
683 @Override
684 public com.liferay.portal.kernel.trash.TrashHandler getTrashHandler() {
685 return _bookmarksEntry.getTrashHandler();
686 }
687
688
693 @Override
694 public boolean isInTrash() {
695 return _bookmarksEntry.isInTrash();
696 }
697
698
704 @Override
705 public boolean isInTrashContainer() {
706 return _bookmarksEntry.isInTrashContainer();
707 }
708
709
712 @Override
713 public boolean getApproved() {
714 return _bookmarksEntry.getApproved();
715 }
716
717
722 @Override
723 public boolean isApproved() {
724 return _bookmarksEntry.isApproved();
725 }
726
727
732 @Override
733 public boolean isDenied() {
734 return _bookmarksEntry.isDenied();
735 }
736
737
742 @Override
743 public boolean isDraft() {
744 return _bookmarksEntry.isDraft();
745 }
746
747
752 @Override
753 public boolean isExpired() {
754 return _bookmarksEntry.isExpired();
755 }
756
757
762 @Override
763 public boolean isInactive() {
764 return _bookmarksEntry.isInactive();
765 }
766
767
772 @Override
773 public boolean isIncomplete() {
774 return _bookmarksEntry.isIncomplete();
775 }
776
777
782 @Override
783 public boolean isPending() {
784 return _bookmarksEntry.isPending();
785 }
786
787
792 @Override
793 public boolean isScheduled() {
794 return _bookmarksEntry.isScheduled();
795 }
796
797 @Override
798 public boolean isNew() {
799 return _bookmarksEntry.isNew();
800 }
801
802 @Override
803 public void setNew(boolean n) {
804 _bookmarksEntry.setNew(n);
805 }
806
807 @Override
808 public boolean isCachedModel() {
809 return _bookmarksEntry.isCachedModel();
810 }
811
812 @Override
813 public void setCachedModel(boolean cachedModel) {
814 _bookmarksEntry.setCachedModel(cachedModel);
815 }
816
817 @Override
818 public boolean isEscapedModel() {
819 return _bookmarksEntry.isEscapedModel();
820 }
821
822 @Override
823 public java.io.Serializable getPrimaryKeyObj() {
824 return _bookmarksEntry.getPrimaryKeyObj();
825 }
826
827 @Override
828 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
829 _bookmarksEntry.setPrimaryKeyObj(primaryKeyObj);
830 }
831
832 @Override
833 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
834 return _bookmarksEntry.getExpandoBridge();
835 }
836
837 @Override
838 public void setExpandoBridgeAttributes(
839 com.liferay.portal.model.BaseModel<?> baseModel) {
840 _bookmarksEntry.setExpandoBridgeAttributes(baseModel);
841 }
842
843 @Override
844 public void setExpandoBridgeAttributes(
845 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
846 _bookmarksEntry.setExpandoBridgeAttributes(expandoBridge);
847 }
848
849 @Override
850 public void setExpandoBridgeAttributes(
851 com.liferay.portal.service.ServiceContext serviceContext) {
852 _bookmarksEntry.setExpandoBridgeAttributes(serviceContext);
853 }
854
855 @Override
856 public java.lang.Object clone() {
857 return new BookmarksEntryWrapper((BookmarksEntry)_bookmarksEntry.clone());
858 }
859
860 @Override
861 public int compareTo(
862 com.liferay.portlet.bookmarks.model.BookmarksEntry bookmarksEntry) {
863 return _bookmarksEntry.compareTo(bookmarksEntry);
864 }
865
866 @Override
867 public int hashCode() {
868 return _bookmarksEntry.hashCode();
869 }
870
871 @Override
872 public com.liferay.portal.model.CacheModel<com.liferay.portlet.bookmarks.model.BookmarksEntry> toCacheModel() {
873 return _bookmarksEntry.toCacheModel();
874 }
875
876 @Override
877 public com.liferay.portlet.bookmarks.model.BookmarksEntry toEscapedModel() {
878 return new BookmarksEntryWrapper(_bookmarksEntry.toEscapedModel());
879 }
880
881 @Override
882 public com.liferay.portlet.bookmarks.model.BookmarksEntry toUnescapedModel() {
883 return new BookmarksEntryWrapper(_bookmarksEntry.toUnescapedModel());
884 }
885
886 @Override
887 public java.lang.String toString() {
888 return _bookmarksEntry.toString();
889 }
890
891 @Override
892 public java.lang.String toXmlString() {
893 return _bookmarksEntry.toXmlString();
894 }
895
896 @Override
897 public void persist()
898 throws com.liferay.portal.kernel.exception.SystemException {
899 _bookmarksEntry.persist();
900 }
901
902 @Override
903 public java.lang.String buildTreePath()
904 throws com.liferay.portal.kernel.exception.PortalException,
905 com.liferay.portal.kernel.exception.SystemException {
906 return _bookmarksEntry.buildTreePath();
907 }
908
909 @Override
910 public com.liferay.portlet.bookmarks.model.BookmarksFolder getFolder()
911 throws com.liferay.portal.kernel.exception.PortalException,
912 com.liferay.portal.kernel.exception.SystemException {
913 return _bookmarksEntry.getFolder();
914 }
915
916 @Override
917 public com.liferay.portlet.bookmarks.model.BookmarksFolder getTrashContainer()
918 throws com.liferay.portal.kernel.exception.PortalException,
919 com.liferay.portal.kernel.exception.SystemException {
920 return _bookmarksEntry.getTrashContainer();
921 }
922
923 @Override
924 public boolean equals(Object obj) {
925 if (this == obj) {
926 return true;
927 }
928
929 if (!(obj instanceof BookmarksEntryWrapper)) {
930 return false;
931 }
932
933 BookmarksEntryWrapper bookmarksEntryWrapper = (BookmarksEntryWrapper)obj;
934
935 if (Validator.equals(_bookmarksEntry,
936 bookmarksEntryWrapper._bookmarksEntry)) {
937 return true;
938 }
939
940 return false;
941 }
942
943 @Override
944 public StagedModelType getStagedModelType() {
945 return _bookmarksEntry.getStagedModelType();
946 }
947
948
951 public BookmarksEntry getWrappedBookmarksEntry() {
952 return _bookmarksEntry;
953 }
954
955 @Override
956 public BookmarksEntry getWrappedModel() {
957 return _bookmarksEntry;
958 }
959
960 @Override
961 public void resetOriginalValues() {
962 _bookmarksEntry.resetOriginalValues();
963 }
964
965 private BookmarksEntry _bookmarksEntry;
966 }