001
014
015 package com.liferay.portlet.messageboards.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 MBCategoryWrapper implements MBCategory, ModelWrapper<MBCategory> {
034 public MBCategoryWrapper(MBCategory mbCategory) {
035 _mbCategory = mbCategory;
036 }
037
038 public Class<?> getModelClass() {
039 return MBCategory.class;
040 }
041
042 public String getModelClassName() {
043 return MBCategory.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("categoryId", getCategoryId());
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("parentCategoryId", getParentCategoryId());
058 attributes.put("name", getName());
059 attributes.put("description", getDescription());
060 attributes.put("displayStyle", getDisplayStyle());
061 attributes.put("threadCount", getThreadCount());
062 attributes.put("messageCount", getMessageCount());
063 attributes.put("lastPostDate", getLastPostDate());
064
065 return attributes;
066 }
067
068 public void setModelAttributes(Map<String, Object> attributes) {
069 String uuid = (String)attributes.get("uuid");
070
071 if (uuid != null) {
072 setUuid(uuid);
073 }
074
075 Long categoryId = (Long)attributes.get("categoryId");
076
077 if (categoryId != null) {
078 setCategoryId(categoryId);
079 }
080
081 Long groupId = (Long)attributes.get("groupId");
082
083 if (groupId != null) {
084 setGroupId(groupId);
085 }
086
087 Long companyId = (Long)attributes.get("companyId");
088
089 if (companyId != null) {
090 setCompanyId(companyId);
091 }
092
093 Long userId = (Long)attributes.get("userId");
094
095 if (userId != null) {
096 setUserId(userId);
097 }
098
099 String userName = (String)attributes.get("userName");
100
101 if (userName != null) {
102 setUserName(userName);
103 }
104
105 Date createDate = (Date)attributes.get("createDate");
106
107 if (createDate != null) {
108 setCreateDate(createDate);
109 }
110
111 Date modifiedDate = (Date)attributes.get("modifiedDate");
112
113 if (modifiedDate != null) {
114 setModifiedDate(modifiedDate);
115 }
116
117 Long parentCategoryId = (Long)attributes.get("parentCategoryId");
118
119 if (parentCategoryId != null) {
120 setParentCategoryId(parentCategoryId);
121 }
122
123 String name = (String)attributes.get("name");
124
125 if (name != null) {
126 setName(name);
127 }
128
129 String description = (String)attributes.get("description");
130
131 if (description != null) {
132 setDescription(description);
133 }
134
135 String displayStyle = (String)attributes.get("displayStyle");
136
137 if (displayStyle != null) {
138 setDisplayStyle(displayStyle);
139 }
140
141 Integer threadCount = (Integer)attributes.get("threadCount");
142
143 if (threadCount != null) {
144 setThreadCount(threadCount);
145 }
146
147 Integer messageCount = (Integer)attributes.get("messageCount");
148
149 if (messageCount != null) {
150 setMessageCount(messageCount);
151 }
152
153 Date lastPostDate = (Date)attributes.get("lastPostDate");
154
155 if (lastPostDate != null) {
156 setLastPostDate(lastPostDate);
157 }
158 }
159
160
165 public long getPrimaryKey() {
166 return _mbCategory.getPrimaryKey();
167 }
168
169
174 public void setPrimaryKey(long primaryKey) {
175 _mbCategory.setPrimaryKey(primaryKey);
176 }
177
178
183 public java.lang.String getUuid() {
184 return _mbCategory.getUuid();
185 }
186
187
192 public void setUuid(java.lang.String uuid) {
193 _mbCategory.setUuid(uuid);
194 }
195
196
201 public long getCategoryId() {
202 return _mbCategory.getCategoryId();
203 }
204
205
210 public void setCategoryId(long categoryId) {
211 _mbCategory.setCategoryId(categoryId);
212 }
213
214
219 public long getGroupId() {
220 return _mbCategory.getGroupId();
221 }
222
223
228 public void setGroupId(long groupId) {
229 _mbCategory.setGroupId(groupId);
230 }
231
232
237 public long getCompanyId() {
238 return _mbCategory.getCompanyId();
239 }
240
241
246 public void setCompanyId(long companyId) {
247 _mbCategory.setCompanyId(companyId);
248 }
249
250
255 public long getUserId() {
256 return _mbCategory.getUserId();
257 }
258
259
264 public void setUserId(long userId) {
265 _mbCategory.setUserId(userId);
266 }
267
268
274 public java.lang.String getUserUuid()
275 throws com.liferay.portal.kernel.exception.SystemException {
276 return _mbCategory.getUserUuid();
277 }
278
279
284 public void setUserUuid(java.lang.String userUuid) {
285 _mbCategory.setUserUuid(userUuid);
286 }
287
288
293 public java.lang.String getUserName() {
294 return _mbCategory.getUserName();
295 }
296
297
302 public void setUserName(java.lang.String userName) {
303 _mbCategory.setUserName(userName);
304 }
305
306
311 public java.util.Date getCreateDate() {
312 return _mbCategory.getCreateDate();
313 }
314
315
320 public void setCreateDate(java.util.Date createDate) {
321 _mbCategory.setCreateDate(createDate);
322 }
323
324
329 public java.util.Date getModifiedDate() {
330 return _mbCategory.getModifiedDate();
331 }
332
333
338 public void setModifiedDate(java.util.Date modifiedDate) {
339 _mbCategory.setModifiedDate(modifiedDate);
340 }
341
342
347 public long getParentCategoryId() {
348 return _mbCategory.getParentCategoryId();
349 }
350
351
356 public void setParentCategoryId(long parentCategoryId) {
357 _mbCategory.setParentCategoryId(parentCategoryId);
358 }
359
360
365 public java.lang.String getName() {
366 return _mbCategory.getName();
367 }
368
369
374 public void setName(java.lang.String name) {
375 _mbCategory.setName(name);
376 }
377
378
383 public java.lang.String getDescription() {
384 return _mbCategory.getDescription();
385 }
386
387
392 public void setDescription(java.lang.String description) {
393 _mbCategory.setDescription(description);
394 }
395
396
401 public java.lang.String getDisplayStyle() {
402 return _mbCategory.getDisplayStyle();
403 }
404
405
410 public void setDisplayStyle(java.lang.String displayStyle) {
411 _mbCategory.setDisplayStyle(displayStyle);
412 }
413
414
419 public int getThreadCount() {
420 return _mbCategory.getThreadCount();
421 }
422
423
428 public void setThreadCount(int threadCount) {
429 _mbCategory.setThreadCount(threadCount);
430 }
431
432
437 public int getMessageCount() {
438 return _mbCategory.getMessageCount();
439 }
440
441
446 public void setMessageCount(int messageCount) {
447 _mbCategory.setMessageCount(messageCount);
448 }
449
450
455 public java.util.Date getLastPostDate() {
456 return _mbCategory.getLastPostDate();
457 }
458
459
464 public void setLastPostDate(java.util.Date lastPostDate) {
465 _mbCategory.setLastPostDate(lastPostDate);
466 }
467
468 public boolean isNew() {
469 return _mbCategory.isNew();
470 }
471
472 public void setNew(boolean n) {
473 _mbCategory.setNew(n);
474 }
475
476 public boolean isCachedModel() {
477 return _mbCategory.isCachedModel();
478 }
479
480 public void setCachedModel(boolean cachedModel) {
481 _mbCategory.setCachedModel(cachedModel);
482 }
483
484 public boolean isEscapedModel() {
485 return _mbCategory.isEscapedModel();
486 }
487
488 public java.io.Serializable getPrimaryKeyObj() {
489 return _mbCategory.getPrimaryKeyObj();
490 }
491
492 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
493 _mbCategory.setPrimaryKeyObj(primaryKeyObj);
494 }
495
496 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
497 return _mbCategory.getExpandoBridge();
498 }
499
500 public void setExpandoBridgeAttributes(
501 com.liferay.portal.service.ServiceContext serviceContext) {
502 _mbCategory.setExpandoBridgeAttributes(serviceContext);
503 }
504
505 @Override
506 public java.lang.Object clone() {
507 return new MBCategoryWrapper((MBCategory)_mbCategory.clone());
508 }
509
510 public int compareTo(
511 com.liferay.portlet.messageboards.model.MBCategory mbCategory) {
512 return _mbCategory.compareTo(mbCategory);
513 }
514
515 @Override
516 public int hashCode() {
517 return _mbCategory.hashCode();
518 }
519
520 public com.liferay.portal.model.CacheModel<com.liferay.portlet.messageboards.model.MBCategory> toCacheModel() {
521 return _mbCategory.toCacheModel();
522 }
523
524 public com.liferay.portlet.messageboards.model.MBCategory toEscapedModel() {
525 return new MBCategoryWrapper(_mbCategory.toEscapedModel());
526 }
527
528 public com.liferay.portlet.messageboards.model.MBCategory toUnescapedModel() {
529 return new MBCategoryWrapper(_mbCategory.toUnescapedModel());
530 }
531
532 @Override
533 public java.lang.String toString() {
534 return _mbCategory.toString();
535 }
536
537 public java.lang.String toXmlString() {
538 return _mbCategory.toXmlString();
539 }
540
541 public void persist()
542 throws com.liferay.portal.kernel.exception.SystemException {
543 _mbCategory.persist();
544 }
545
546 public java.util.List<java.lang.Long> getAncestorCategoryIds()
547 throws com.liferay.portal.kernel.exception.PortalException,
548 com.liferay.portal.kernel.exception.SystemException {
549 return _mbCategory.getAncestorCategoryIds();
550 }
551
552 public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getAncestors()
553 throws com.liferay.portal.kernel.exception.PortalException,
554 com.liferay.portal.kernel.exception.SystemException {
555 return _mbCategory.getAncestors();
556 }
557
558 public boolean isRoot() {
559 return _mbCategory.isRoot();
560 }
561
562 @Override
563 public boolean equals(Object obj) {
564 if (this == obj) {
565 return true;
566 }
567
568 if (!(obj instanceof MBCategoryWrapper)) {
569 return false;
570 }
571
572 MBCategoryWrapper mbCategoryWrapper = (MBCategoryWrapper)obj;
573
574 if (Validator.equals(_mbCategory, mbCategoryWrapper._mbCategory)) {
575 return true;
576 }
577
578 return false;
579 }
580
581
584 public MBCategory getWrappedMBCategory() {
585 return _mbCategory;
586 }
587
588 public MBCategory getWrappedModel() {
589 return _mbCategory;
590 }
591
592 public void resetOriginalValues() {
593 _mbCategory.resetOriginalValues();
594 }
595
596 private MBCategory _mbCategory;
597 }