001
014
015 package com.liferay.portlet.bookmarks.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 BookmarksEntryWrapper implements BookmarksEntry,
034 ModelWrapper<BookmarksEntry> {
035 public BookmarksEntryWrapper(BookmarksEntry bookmarksEntry) {
036 _bookmarksEntry = bookmarksEntry;
037 }
038
039 public Class<?> getModelClass() {
040 return BookmarksEntry.class;
041 }
042
043 public String getModelClassName() {
044 return BookmarksEntry.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("entryId", getEntryId());
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("resourceBlockId", getResourceBlockId());
059 attributes.put("folderId", getFolderId());
060 attributes.put("name", getName());
061 attributes.put("url", getUrl());
062 attributes.put("description", getDescription());
063 attributes.put("visits", getVisits());
064 attributes.put("priority", getPriority());
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 entryId = (Long)attributes.get("entryId");
077
078 if (entryId != null) {
079 setEntryId(entryId);
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 resourceBlockId = (Long)attributes.get("resourceBlockId");
119
120 if (resourceBlockId != null) {
121 setResourceBlockId(resourceBlockId);
122 }
123
124 Long folderId = (Long)attributes.get("folderId");
125
126 if (folderId != null) {
127 setFolderId(folderId);
128 }
129
130 String name = (String)attributes.get("name");
131
132 if (name != null) {
133 setName(name);
134 }
135
136 String url = (String)attributes.get("url");
137
138 if (url != null) {
139 setUrl(url);
140 }
141
142 String description = (String)attributes.get("description");
143
144 if (description != null) {
145 setDescription(description);
146 }
147
148 Integer visits = (Integer)attributes.get("visits");
149
150 if (visits != null) {
151 setVisits(visits);
152 }
153
154 Integer priority = (Integer)attributes.get("priority");
155
156 if (priority != null) {
157 setPriority(priority);
158 }
159 }
160
161
166 public long getPrimaryKey() {
167 return _bookmarksEntry.getPrimaryKey();
168 }
169
170
175 public void setPrimaryKey(long primaryKey) {
176 _bookmarksEntry.setPrimaryKey(primaryKey);
177 }
178
179
184 public java.lang.String getUuid() {
185 return _bookmarksEntry.getUuid();
186 }
187
188
193 public void setUuid(java.lang.String uuid) {
194 _bookmarksEntry.setUuid(uuid);
195 }
196
197
202 public long getEntryId() {
203 return _bookmarksEntry.getEntryId();
204 }
205
206
211 public void setEntryId(long entryId) {
212 _bookmarksEntry.setEntryId(entryId);
213 }
214
215
220 public long getGroupId() {
221 return _bookmarksEntry.getGroupId();
222 }
223
224
229 public void setGroupId(long groupId) {
230 _bookmarksEntry.setGroupId(groupId);
231 }
232
233
238 public long getCompanyId() {
239 return _bookmarksEntry.getCompanyId();
240 }
241
242
247 public void setCompanyId(long companyId) {
248 _bookmarksEntry.setCompanyId(companyId);
249 }
250
251
256 public long getUserId() {
257 return _bookmarksEntry.getUserId();
258 }
259
260
265 public void setUserId(long userId) {
266 _bookmarksEntry.setUserId(userId);
267 }
268
269
275 public java.lang.String getUserUuid()
276 throws com.liferay.portal.kernel.exception.SystemException {
277 return _bookmarksEntry.getUserUuid();
278 }
279
280
285 public void setUserUuid(java.lang.String userUuid) {
286 _bookmarksEntry.setUserUuid(userUuid);
287 }
288
289
294 public java.lang.String getUserName() {
295 return _bookmarksEntry.getUserName();
296 }
297
298
303 public void setUserName(java.lang.String userName) {
304 _bookmarksEntry.setUserName(userName);
305 }
306
307
312 public java.util.Date getCreateDate() {
313 return _bookmarksEntry.getCreateDate();
314 }
315
316
321 public void setCreateDate(java.util.Date createDate) {
322 _bookmarksEntry.setCreateDate(createDate);
323 }
324
325
330 public java.util.Date getModifiedDate() {
331 return _bookmarksEntry.getModifiedDate();
332 }
333
334
339 public void setModifiedDate(java.util.Date modifiedDate) {
340 _bookmarksEntry.setModifiedDate(modifiedDate);
341 }
342
343
348 public long getResourceBlockId() {
349 return _bookmarksEntry.getResourceBlockId();
350 }
351
352
357 public void setResourceBlockId(long resourceBlockId) {
358 _bookmarksEntry.setResourceBlockId(resourceBlockId);
359 }
360
361
366 public long getFolderId() {
367 return _bookmarksEntry.getFolderId();
368 }
369
370
375 public void setFolderId(long folderId) {
376 _bookmarksEntry.setFolderId(folderId);
377 }
378
379
384 public java.lang.String getName() {
385 return _bookmarksEntry.getName();
386 }
387
388
393 public void setName(java.lang.String name) {
394 _bookmarksEntry.setName(name);
395 }
396
397
402 public java.lang.String getUrl() {
403 return _bookmarksEntry.getUrl();
404 }
405
406
411 public void setUrl(java.lang.String url) {
412 _bookmarksEntry.setUrl(url);
413 }
414
415
420 public java.lang.String getDescription() {
421 return _bookmarksEntry.getDescription();
422 }
423
424
429 public void setDescription(java.lang.String description) {
430 _bookmarksEntry.setDescription(description);
431 }
432
433
438 public int getVisits() {
439 return _bookmarksEntry.getVisits();
440 }
441
442
447 public void setVisits(int visits) {
448 _bookmarksEntry.setVisits(visits);
449 }
450
451
456 public int getPriority() {
457 return _bookmarksEntry.getPriority();
458 }
459
460
465 public void setPriority(int priority) {
466 _bookmarksEntry.setPriority(priority);
467 }
468
469 public boolean isNew() {
470 return _bookmarksEntry.isNew();
471 }
472
473 public void setNew(boolean n) {
474 _bookmarksEntry.setNew(n);
475 }
476
477 public boolean isCachedModel() {
478 return _bookmarksEntry.isCachedModel();
479 }
480
481 public void setCachedModel(boolean cachedModel) {
482 _bookmarksEntry.setCachedModel(cachedModel);
483 }
484
485 public boolean isEscapedModel() {
486 return _bookmarksEntry.isEscapedModel();
487 }
488
489 public java.io.Serializable getPrimaryKeyObj() {
490 return _bookmarksEntry.getPrimaryKeyObj();
491 }
492
493 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
494 _bookmarksEntry.setPrimaryKeyObj(primaryKeyObj);
495 }
496
497 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
498 return _bookmarksEntry.getExpandoBridge();
499 }
500
501 public void setExpandoBridgeAttributes(
502 com.liferay.portal.service.ServiceContext serviceContext) {
503 _bookmarksEntry.setExpandoBridgeAttributes(serviceContext);
504 }
505
506 @Override
507 public java.lang.Object clone() {
508 return new BookmarksEntryWrapper((BookmarksEntry)_bookmarksEntry.clone());
509 }
510
511 public int compareTo(
512 com.liferay.portlet.bookmarks.model.BookmarksEntry bookmarksEntry) {
513 return _bookmarksEntry.compareTo(bookmarksEntry);
514 }
515
516 @Override
517 public int hashCode() {
518 return _bookmarksEntry.hashCode();
519 }
520
521 public com.liferay.portal.model.CacheModel<com.liferay.portlet.bookmarks.model.BookmarksEntry> toCacheModel() {
522 return _bookmarksEntry.toCacheModel();
523 }
524
525 public com.liferay.portlet.bookmarks.model.BookmarksEntry toEscapedModel() {
526 return new BookmarksEntryWrapper(_bookmarksEntry.toEscapedModel());
527 }
528
529 public com.liferay.portlet.bookmarks.model.BookmarksEntry toUnescapedModel() {
530 return new BookmarksEntryWrapper(_bookmarksEntry.toUnescapedModel());
531 }
532
533 @Override
534 public java.lang.String toString() {
535 return _bookmarksEntry.toString();
536 }
537
538 public java.lang.String toXmlString() {
539 return _bookmarksEntry.toXmlString();
540 }
541
542 public void persist()
543 throws com.liferay.portal.kernel.exception.SystemException {
544 _bookmarksEntry.persist();
545 }
546
547 public com.liferay.portlet.bookmarks.model.BookmarksFolder getFolder() {
548 return _bookmarksEntry.getFolder();
549 }
550
551 @Override
552 public boolean equals(Object obj) {
553 if (this == obj) {
554 return true;
555 }
556
557 if (!(obj instanceof BookmarksEntryWrapper)) {
558 return false;
559 }
560
561 BookmarksEntryWrapper bookmarksEntryWrapper = (BookmarksEntryWrapper)obj;
562
563 if (Validator.equals(_bookmarksEntry,
564 bookmarksEntryWrapper._bookmarksEntry)) {
565 return true;
566 }
567
568 return false;
569 }
570
571
574 public BookmarksEntry getWrappedBookmarksEntry() {
575 return _bookmarksEntry;
576 }
577
578 public BookmarksEntry getWrappedModel() {
579 return _bookmarksEntry;
580 }
581
582 public void resetOriginalValues() {
583 _bookmarksEntry.resetOriginalValues();
584 }
585
586 private BookmarksEntry _bookmarksEntry;
587 }