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 BookmarksFolderWrapper implements BookmarksFolder,
034 ModelWrapper<BookmarksFolder> {
035 public BookmarksFolderWrapper(BookmarksFolder bookmarksFolder) {
036 _bookmarksFolder = bookmarksFolder;
037 }
038
039 public Class<?> getModelClass() {
040 return BookmarksFolder.class;
041 }
042
043 public String getModelClassName() {
044 return BookmarksFolder.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("folderId", getFolderId());
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("parentFolderId", getParentFolderId());
060 attributes.put("name", getName());
061 attributes.put("description", getDescription());
062
063 return attributes;
064 }
065
066 public void setModelAttributes(Map<String, Object> attributes) {
067 String uuid = (String)attributes.get("uuid");
068
069 if (uuid != null) {
070 setUuid(uuid);
071 }
072
073 Long folderId = (Long)attributes.get("folderId");
074
075 if (folderId != null) {
076 setFolderId(folderId);
077 }
078
079 Long groupId = (Long)attributes.get("groupId");
080
081 if (groupId != null) {
082 setGroupId(groupId);
083 }
084
085 Long companyId = (Long)attributes.get("companyId");
086
087 if (companyId != null) {
088 setCompanyId(companyId);
089 }
090
091 Long userId = (Long)attributes.get("userId");
092
093 if (userId != null) {
094 setUserId(userId);
095 }
096
097 String userName = (String)attributes.get("userName");
098
099 if (userName != null) {
100 setUserName(userName);
101 }
102
103 Date createDate = (Date)attributes.get("createDate");
104
105 if (createDate != null) {
106 setCreateDate(createDate);
107 }
108
109 Date modifiedDate = (Date)attributes.get("modifiedDate");
110
111 if (modifiedDate != null) {
112 setModifiedDate(modifiedDate);
113 }
114
115 Long resourceBlockId = (Long)attributes.get("resourceBlockId");
116
117 if (resourceBlockId != null) {
118 setResourceBlockId(resourceBlockId);
119 }
120
121 Long parentFolderId = (Long)attributes.get("parentFolderId");
122
123 if (parentFolderId != null) {
124 setParentFolderId(parentFolderId);
125 }
126
127 String name = (String)attributes.get("name");
128
129 if (name != null) {
130 setName(name);
131 }
132
133 String description = (String)attributes.get("description");
134
135 if (description != null) {
136 setDescription(description);
137 }
138 }
139
140
145 public long getPrimaryKey() {
146 return _bookmarksFolder.getPrimaryKey();
147 }
148
149
154 public void setPrimaryKey(long primaryKey) {
155 _bookmarksFolder.setPrimaryKey(primaryKey);
156 }
157
158
163 public java.lang.String getUuid() {
164 return _bookmarksFolder.getUuid();
165 }
166
167
172 public void setUuid(java.lang.String uuid) {
173 _bookmarksFolder.setUuid(uuid);
174 }
175
176
181 public long getFolderId() {
182 return _bookmarksFolder.getFolderId();
183 }
184
185
190 public void setFolderId(long folderId) {
191 _bookmarksFolder.setFolderId(folderId);
192 }
193
194
199 public long getGroupId() {
200 return _bookmarksFolder.getGroupId();
201 }
202
203
208 public void setGroupId(long groupId) {
209 _bookmarksFolder.setGroupId(groupId);
210 }
211
212
217 public long getCompanyId() {
218 return _bookmarksFolder.getCompanyId();
219 }
220
221
226 public void setCompanyId(long companyId) {
227 _bookmarksFolder.setCompanyId(companyId);
228 }
229
230
235 public long getUserId() {
236 return _bookmarksFolder.getUserId();
237 }
238
239
244 public void setUserId(long userId) {
245 _bookmarksFolder.setUserId(userId);
246 }
247
248
254 public java.lang.String getUserUuid()
255 throws com.liferay.portal.kernel.exception.SystemException {
256 return _bookmarksFolder.getUserUuid();
257 }
258
259
264 public void setUserUuid(java.lang.String userUuid) {
265 _bookmarksFolder.setUserUuid(userUuid);
266 }
267
268
273 public java.lang.String getUserName() {
274 return _bookmarksFolder.getUserName();
275 }
276
277
282 public void setUserName(java.lang.String userName) {
283 _bookmarksFolder.setUserName(userName);
284 }
285
286
291 public java.util.Date getCreateDate() {
292 return _bookmarksFolder.getCreateDate();
293 }
294
295
300 public void setCreateDate(java.util.Date createDate) {
301 _bookmarksFolder.setCreateDate(createDate);
302 }
303
304
309 public java.util.Date getModifiedDate() {
310 return _bookmarksFolder.getModifiedDate();
311 }
312
313
318 public void setModifiedDate(java.util.Date modifiedDate) {
319 _bookmarksFolder.setModifiedDate(modifiedDate);
320 }
321
322
327 public long getResourceBlockId() {
328 return _bookmarksFolder.getResourceBlockId();
329 }
330
331
336 public void setResourceBlockId(long resourceBlockId) {
337 _bookmarksFolder.setResourceBlockId(resourceBlockId);
338 }
339
340
345 public long getParentFolderId() {
346 return _bookmarksFolder.getParentFolderId();
347 }
348
349
354 public void setParentFolderId(long parentFolderId) {
355 _bookmarksFolder.setParentFolderId(parentFolderId);
356 }
357
358
363 public java.lang.String getName() {
364 return _bookmarksFolder.getName();
365 }
366
367
372 public void setName(java.lang.String name) {
373 _bookmarksFolder.setName(name);
374 }
375
376
381 public java.lang.String getDescription() {
382 return _bookmarksFolder.getDescription();
383 }
384
385
390 public void setDescription(java.lang.String description) {
391 _bookmarksFolder.setDescription(description);
392 }
393
394 public boolean isNew() {
395 return _bookmarksFolder.isNew();
396 }
397
398 public void setNew(boolean n) {
399 _bookmarksFolder.setNew(n);
400 }
401
402 public boolean isCachedModel() {
403 return _bookmarksFolder.isCachedModel();
404 }
405
406 public void setCachedModel(boolean cachedModel) {
407 _bookmarksFolder.setCachedModel(cachedModel);
408 }
409
410 public boolean isEscapedModel() {
411 return _bookmarksFolder.isEscapedModel();
412 }
413
414 public java.io.Serializable getPrimaryKeyObj() {
415 return _bookmarksFolder.getPrimaryKeyObj();
416 }
417
418 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
419 _bookmarksFolder.setPrimaryKeyObj(primaryKeyObj);
420 }
421
422 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
423 return _bookmarksFolder.getExpandoBridge();
424 }
425
426 public void setExpandoBridgeAttributes(
427 com.liferay.portal.service.ServiceContext serviceContext) {
428 _bookmarksFolder.setExpandoBridgeAttributes(serviceContext);
429 }
430
431 @Override
432 public java.lang.Object clone() {
433 return new BookmarksFolderWrapper((BookmarksFolder)_bookmarksFolder.clone());
434 }
435
436 public int compareTo(
437 com.liferay.portlet.bookmarks.model.BookmarksFolder bookmarksFolder) {
438 return _bookmarksFolder.compareTo(bookmarksFolder);
439 }
440
441 @Override
442 public int hashCode() {
443 return _bookmarksFolder.hashCode();
444 }
445
446 public com.liferay.portal.model.CacheModel<com.liferay.portlet.bookmarks.model.BookmarksFolder> toCacheModel() {
447 return _bookmarksFolder.toCacheModel();
448 }
449
450 public com.liferay.portlet.bookmarks.model.BookmarksFolder toEscapedModel() {
451 return new BookmarksFolderWrapper(_bookmarksFolder.toEscapedModel());
452 }
453
454 public com.liferay.portlet.bookmarks.model.BookmarksFolder toUnescapedModel() {
455 return new BookmarksFolderWrapper(_bookmarksFolder.toUnescapedModel());
456 }
457
458 @Override
459 public java.lang.String toString() {
460 return _bookmarksFolder.toString();
461 }
462
463 public java.lang.String toXmlString() {
464 return _bookmarksFolder.toXmlString();
465 }
466
467 public void persist()
468 throws com.liferay.portal.kernel.exception.SystemException {
469 _bookmarksFolder.persist();
470 }
471
472 public java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> getAncestors()
473 throws com.liferay.portal.kernel.exception.PortalException,
474 com.liferay.portal.kernel.exception.SystemException {
475 return _bookmarksFolder.getAncestors();
476 }
477
478 public com.liferay.portlet.bookmarks.model.BookmarksFolder getParentFolder()
479 throws com.liferay.portal.kernel.exception.PortalException,
480 com.liferay.portal.kernel.exception.SystemException {
481 return _bookmarksFolder.getParentFolder();
482 }
483
484 public boolean isRoot() {
485 return _bookmarksFolder.isRoot();
486 }
487
488 @Override
489 public boolean equals(Object obj) {
490 if (this == obj) {
491 return true;
492 }
493
494 if (!(obj instanceof BookmarksFolderWrapper)) {
495 return false;
496 }
497
498 BookmarksFolderWrapper bookmarksFolderWrapper = (BookmarksFolderWrapper)obj;
499
500 if (Validator.equals(_bookmarksFolder,
501 bookmarksFolderWrapper._bookmarksFolder)) {
502 return true;
503 }
504
505 return false;
506 }
507
508
511 public BookmarksFolder getWrappedBookmarksFolder() {
512 return _bookmarksFolder;
513 }
514
515 public BookmarksFolder getWrappedModel() {
516 return _bookmarksFolder;
517 }
518
519 public void resetOriginalValues() {
520 _bookmarksFolder.resetOriginalValues();
521 }
522
523 private BookmarksFolder _bookmarksFolder;
524 }