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("name", getName());
065 attributes.put("url", getUrl());
066 attributes.put("description", getDescription());
067 attributes.put("visits", getVisits());
068 attributes.put("priority", getPriority());
069 attributes.put("status", getStatus());
070 attributes.put("statusByUserId", getStatusByUserId());
071 attributes.put("statusByUserName", getStatusByUserName());
072 attributes.put("statusDate", getStatusDate());
073
074 return attributes;
075 }
076
077 @Override
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 entryId = (Long)attributes.get("entryId");
086
087 if (entryId != null) {
088 setEntryId(entryId);
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 resourceBlockId = (Long)attributes.get("resourceBlockId");
128
129 if (resourceBlockId != null) {
130 setResourceBlockId(resourceBlockId);
131 }
132
133 Long folderId = (Long)attributes.get("folderId");
134
135 if (folderId != null) {
136 setFolderId(folderId);
137 }
138
139 String name = (String)attributes.get("name");
140
141 if (name != null) {
142 setName(name);
143 }
144
145 String url = (String)attributes.get("url");
146
147 if (url != null) {
148 setUrl(url);
149 }
150
151 String description = (String)attributes.get("description");
152
153 if (description != null) {
154 setDescription(description);
155 }
156
157 Integer visits = (Integer)attributes.get("visits");
158
159 if (visits != null) {
160 setVisits(visits);
161 }
162
163 Integer priority = (Integer)attributes.get("priority");
164
165 if (priority != null) {
166 setPriority(priority);
167 }
168
169 Integer status = (Integer)attributes.get("status");
170
171 if (status != null) {
172 setStatus(status);
173 }
174
175 Long statusByUserId = (Long)attributes.get("statusByUserId");
176
177 if (statusByUserId != null) {
178 setStatusByUserId(statusByUserId);
179 }
180
181 String statusByUserName = (String)attributes.get("statusByUserName");
182
183 if (statusByUserName != null) {
184 setStatusByUserName(statusByUserName);
185 }
186
187 Date statusDate = (Date)attributes.get("statusDate");
188
189 if (statusDate != null) {
190 setStatusDate(statusDate);
191 }
192 }
193
194
199 @Override
200 public long getPrimaryKey() {
201 return _bookmarksEntry.getPrimaryKey();
202 }
203
204
209 @Override
210 public void setPrimaryKey(long primaryKey) {
211 _bookmarksEntry.setPrimaryKey(primaryKey);
212 }
213
214
219 @Override
220 public java.lang.String getUuid() {
221 return _bookmarksEntry.getUuid();
222 }
223
224
229 @Override
230 public void setUuid(java.lang.String uuid) {
231 _bookmarksEntry.setUuid(uuid);
232 }
233
234
239 @Override
240 public long getEntryId() {
241 return _bookmarksEntry.getEntryId();
242 }
243
244
249 @Override
250 public void setEntryId(long entryId) {
251 _bookmarksEntry.setEntryId(entryId);
252 }
253
254
259 @Override
260 public long getGroupId() {
261 return _bookmarksEntry.getGroupId();
262 }
263
264
269 @Override
270 public void setGroupId(long groupId) {
271 _bookmarksEntry.setGroupId(groupId);
272 }
273
274
279 @Override
280 public long getCompanyId() {
281 return _bookmarksEntry.getCompanyId();
282 }
283
284
289 @Override
290 public void setCompanyId(long companyId) {
291 _bookmarksEntry.setCompanyId(companyId);
292 }
293
294
299 @Override
300 public long getUserId() {
301 return _bookmarksEntry.getUserId();
302 }
303
304
309 @Override
310 public void setUserId(long userId) {
311 _bookmarksEntry.setUserId(userId);
312 }
313
314
320 @Override
321 public java.lang.String getUserUuid()
322 throws com.liferay.portal.kernel.exception.SystemException {
323 return _bookmarksEntry.getUserUuid();
324 }
325
326
331 @Override
332 public void setUserUuid(java.lang.String userUuid) {
333 _bookmarksEntry.setUserUuid(userUuid);
334 }
335
336
341 @Override
342 public java.lang.String getUserName() {
343 return _bookmarksEntry.getUserName();
344 }
345
346
351 @Override
352 public void setUserName(java.lang.String userName) {
353 _bookmarksEntry.setUserName(userName);
354 }
355
356
361 @Override
362 public java.util.Date getCreateDate() {
363 return _bookmarksEntry.getCreateDate();
364 }
365
366
371 @Override
372 public void setCreateDate(java.util.Date createDate) {
373 _bookmarksEntry.setCreateDate(createDate);
374 }
375
376
381 @Override
382 public java.util.Date getModifiedDate() {
383 return _bookmarksEntry.getModifiedDate();
384 }
385
386
391 @Override
392 public void setModifiedDate(java.util.Date modifiedDate) {
393 _bookmarksEntry.setModifiedDate(modifiedDate);
394 }
395
396
401 @Override
402 public long getResourceBlockId() {
403 return _bookmarksEntry.getResourceBlockId();
404 }
405
406
411 @Override
412 public void setResourceBlockId(long resourceBlockId) {
413 _bookmarksEntry.setResourceBlockId(resourceBlockId);
414 }
415
416
421 @Override
422 public long getFolderId() {
423 return _bookmarksEntry.getFolderId();
424 }
425
426
431 @Override
432 public void setFolderId(long folderId) {
433 _bookmarksEntry.setFolderId(folderId);
434 }
435
436
441 @Override
442 public java.lang.String getName() {
443 return _bookmarksEntry.getName();
444 }
445
446
451 @Override
452 public void setName(java.lang.String name) {
453 _bookmarksEntry.setName(name);
454 }
455
456
461 @Override
462 public java.lang.String getUrl() {
463 return _bookmarksEntry.getUrl();
464 }
465
466
471 @Override
472 public void setUrl(java.lang.String url) {
473 _bookmarksEntry.setUrl(url);
474 }
475
476
481 @Override
482 public java.lang.String getDescription() {
483 return _bookmarksEntry.getDescription();
484 }
485
486
491 @Override
492 public void setDescription(java.lang.String description) {
493 _bookmarksEntry.setDescription(description);
494 }
495
496
501 @Override
502 public int getVisits() {
503 return _bookmarksEntry.getVisits();
504 }
505
506
511 @Override
512 public void setVisits(int visits) {
513 _bookmarksEntry.setVisits(visits);
514 }
515
516
521 @Override
522 public int getPriority() {
523 return _bookmarksEntry.getPriority();
524 }
525
526
531 @Override
532 public void setPriority(int priority) {
533 _bookmarksEntry.setPriority(priority);
534 }
535
536
541 @Override
542 public int getStatus() {
543 return _bookmarksEntry.getStatus();
544 }
545
546
551 @Override
552 public void setStatus(int status) {
553 _bookmarksEntry.setStatus(status);
554 }
555
556
561 @Override
562 public long getStatusByUserId() {
563 return _bookmarksEntry.getStatusByUserId();
564 }
565
566
571 @Override
572 public void setStatusByUserId(long statusByUserId) {
573 _bookmarksEntry.setStatusByUserId(statusByUserId);
574 }
575
576
582 @Override
583 public java.lang.String getStatusByUserUuid()
584 throws com.liferay.portal.kernel.exception.SystemException {
585 return _bookmarksEntry.getStatusByUserUuid();
586 }
587
588
593 @Override
594 public void setStatusByUserUuid(java.lang.String statusByUserUuid) {
595 _bookmarksEntry.setStatusByUserUuid(statusByUserUuid);
596 }
597
598
603 @Override
604 public java.lang.String getStatusByUserName() {
605 return _bookmarksEntry.getStatusByUserName();
606 }
607
608
613 @Override
614 public void setStatusByUserName(java.lang.String statusByUserName) {
615 _bookmarksEntry.setStatusByUserName(statusByUserName);
616 }
617
618
623 @Override
624 public java.util.Date getStatusDate() {
625 return _bookmarksEntry.getStatusDate();
626 }
627
628
633 @Override
634 public void setStatusDate(java.util.Date statusDate) {
635 _bookmarksEntry.setStatusDate(statusDate);
636 }
637
638
641 @Override
642 public boolean getApproved() {
643 return _bookmarksEntry.getApproved();
644 }
645
646
651 @Override
652 public boolean isApproved() {
653 return _bookmarksEntry.isApproved();
654 }
655
656
661 @Override
662 public boolean isDenied() {
663 return _bookmarksEntry.isDenied();
664 }
665
666
671 @Override
672 public boolean isDraft() {
673 return _bookmarksEntry.isDraft();
674 }
675
676
681 @Override
682 public boolean isExpired() {
683 return _bookmarksEntry.isExpired();
684 }
685
686
691 @Override
692 public boolean isInactive() {
693 return _bookmarksEntry.isInactive();
694 }
695
696
701 @Override
702 public boolean isIncomplete() {
703 return _bookmarksEntry.isIncomplete();
704 }
705
706
711 @Override
712 public boolean isInTrash() {
713 return _bookmarksEntry.isInTrash();
714 }
715
716
721 @Override
722 public boolean isPending() {
723 return _bookmarksEntry.isPending();
724 }
725
726
731 @Override
732 public boolean isScheduled() {
733 return _bookmarksEntry.isScheduled();
734 }
735
736 @Override
737 public boolean isNew() {
738 return _bookmarksEntry.isNew();
739 }
740
741 @Override
742 public void setNew(boolean n) {
743 _bookmarksEntry.setNew(n);
744 }
745
746 @Override
747 public boolean isCachedModel() {
748 return _bookmarksEntry.isCachedModel();
749 }
750
751 @Override
752 public void setCachedModel(boolean cachedModel) {
753 _bookmarksEntry.setCachedModel(cachedModel);
754 }
755
756 @Override
757 public boolean isEscapedModel() {
758 return _bookmarksEntry.isEscapedModel();
759 }
760
761 @Override
762 public java.io.Serializable getPrimaryKeyObj() {
763 return _bookmarksEntry.getPrimaryKeyObj();
764 }
765
766 @Override
767 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
768 _bookmarksEntry.setPrimaryKeyObj(primaryKeyObj);
769 }
770
771 @Override
772 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
773 return _bookmarksEntry.getExpandoBridge();
774 }
775
776 @Override
777 public void setExpandoBridgeAttributes(
778 com.liferay.portal.model.BaseModel<?> baseModel) {
779 _bookmarksEntry.setExpandoBridgeAttributes(baseModel);
780 }
781
782 @Override
783 public void setExpandoBridgeAttributes(
784 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
785 _bookmarksEntry.setExpandoBridgeAttributes(expandoBridge);
786 }
787
788 @Override
789 public void setExpandoBridgeAttributes(
790 com.liferay.portal.service.ServiceContext serviceContext) {
791 _bookmarksEntry.setExpandoBridgeAttributes(serviceContext);
792 }
793
794 @Override
795 public java.lang.Object clone() {
796 return new BookmarksEntryWrapper((BookmarksEntry)_bookmarksEntry.clone());
797 }
798
799 @Override
800 public int compareTo(
801 com.liferay.portlet.bookmarks.model.BookmarksEntry bookmarksEntry) {
802 return _bookmarksEntry.compareTo(bookmarksEntry);
803 }
804
805 @Override
806 public int hashCode() {
807 return _bookmarksEntry.hashCode();
808 }
809
810 @Override
811 public com.liferay.portal.model.CacheModel<com.liferay.portlet.bookmarks.model.BookmarksEntry> toCacheModel() {
812 return _bookmarksEntry.toCacheModel();
813 }
814
815 @Override
816 public com.liferay.portlet.bookmarks.model.BookmarksEntry toEscapedModel() {
817 return new BookmarksEntryWrapper(_bookmarksEntry.toEscapedModel());
818 }
819
820 @Override
821 public com.liferay.portlet.bookmarks.model.BookmarksEntry toUnescapedModel() {
822 return new BookmarksEntryWrapper(_bookmarksEntry.toUnescapedModel());
823 }
824
825 @Override
826 public java.lang.String toString() {
827 return _bookmarksEntry.toString();
828 }
829
830 @Override
831 public java.lang.String toXmlString() {
832 return _bookmarksEntry.toXmlString();
833 }
834
835 @Override
836 public void persist()
837 throws com.liferay.portal.kernel.exception.SystemException {
838 _bookmarksEntry.persist();
839 }
840
841 @Override
842 public com.liferay.portlet.bookmarks.model.BookmarksFolder getFolder()
843 throws com.liferay.portal.kernel.exception.PortalException,
844 com.liferay.portal.kernel.exception.SystemException {
845 return _bookmarksEntry.getFolder();
846 }
847
848 @Override
849 public com.liferay.portlet.bookmarks.model.BookmarksFolder getTrashContainer()
850 throws com.liferay.portal.kernel.exception.PortalException,
851 com.liferay.portal.kernel.exception.SystemException {
852 return _bookmarksEntry.getTrashContainer();
853 }
854
855 @Override
856 public boolean isInTrashContainer()
857 throws com.liferay.portal.kernel.exception.PortalException,
858 com.liferay.portal.kernel.exception.SystemException {
859 return _bookmarksEntry.isInTrashContainer();
860 }
861
862 @Override
863 public boolean equals(Object obj) {
864 if (this == obj) {
865 return true;
866 }
867
868 if (!(obj instanceof BookmarksEntryWrapper)) {
869 return false;
870 }
871
872 BookmarksEntryWrapper bookmarksEntryWrapper = (BookmarksEntryWrapper)obj;
873
874 if (Validator.equals(_bookmarksEntry,
875 bookmarksEntryWrapper._bookmarksEntry)) {
876 return true;
877 }
878
879 return false;
880 }
881
882 @Override
883 public StagedModelType getStagedModelType() {
884 return _bookmarksEntry.getStagedModelType();
885 }
886
887
890 public BookmarksEntry getWrappedBookmarksEntry() {
891 return _bookmarksEntry;
892 }
893
894 @Override
895 public BookmarksEntry getWrappedModel() {
896 return _bookmarksEntry;
897 }
898
899 @Override
900 public void resetOriginalValues() {
901 _bookmarksEntry.resetOriginalValues();
902 }
903
904 private BookmarksEntry _bookmarksEntry;
905 }