001
014
015 package com.liferay.portlet.messageboards.model;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.lar.StagedModelType;
020 import com.liferay.portal.kernel.util.Validator;
021 import com.liferay.portal.model.ModelWrapper;
022
023 import java.util.Date;
024 import java.util.HashMap;
025 import java.util.Map;
026
027
036 @ProviderType
037 public class MBDiscussionWrapper implements MBDiscussion,
038 ModelWrapper<MBDiscussion> {
039 public MBDiscussionWrapper(MBDiscussion mbDiscussion) {
040 _mbDiscussion = mbDiscussion;
041 }
042
043 @Override
044 public Class<?> getModelClass() {
045 return MBDiscussion.class;
046 }
047
048 @Override
049 public String getModelClassName() {
050 return MBDiscussion.class.getName();
051 }
052
053 @Override
054 public Map<String, Object> getModelAttributes() {
055 Map<String, Object> attributes = new HashMap<String, Object>();
056
057 attributes.put("uuid", getUuid());
058 attributes.put("discussionId", getDiscussionId());
059 attributes.put("groupId", getGroupId());
060 attributes.put("companyId", getCompanyId());
061 attributes.put("userId", getUserId());
062 attributes.put("userName", getUserName());
063 attributes.put("createDate", getCreateDate());
064 attributes.put("modifiedDate", getModifiedDate());
065 attributes.put("classNameId", getClassNameId());
066 attributes.put("classPK", getClassPK());
067 attributes.put("threadId", getThreadId());
068
069 return attributes;
070 }
071
072 @Override
073 public void setModelAttributes(Map<String, Object> attributes) {
074 String uuid = (String)attributes.get("uuid");
075
076 if (uuid != null) {
077 setUuid(uuid);
078 }
079
080 Long discussionId = (Long)attributes.get("discussionId");
081
082 if (discussionId != null) {
083 setDiscussionId(discussionId);
084 }
085
086 Long groupId = (Long)attributes.get("groupId");
087
088 if (groupId != null) {
089 setGroupId(groupId);
090 }
091
092 Long companyId = (Long)attributes.get("companyId");
093
094 if (companyId != null) {
095 setCompanyId(companyId);
096 }
097
098 Long userId = (Long)attributes.get("userId");
099
100 if (userId != null) {
101 setUserId(userId);
102 }
103
104 String userName = (String)attributes.get("userName");
105
106 if (userName != null) {
107 setUserName(userName);
108 }
109
110 Date createDate = (Date)attributes.get("createDate");
111
112 if (createDate != null) {
113 setCreateDate(createDate);
114 }
115
116 Date modifiedDate = (Date)attributes.get("modifiedDate");
117
118 if (modifiedDate != null) {
119 setModifiedDate(modifiedDate);
120 }
121
122 Long classNameId = (Long)attributes.get("classNameId");
123
124 if (classNameId != null) {
125 setClassNameId(classNameId);
126 }
127
128 Long classPK = (Long)attributes.get("classPK");
129
130 if (classPK != null) {
131 setClassPK(classPK);
132 }
133
134 Long threadId = (Long)attributes.get("threadId");
135
136 if (threadId != null) {
137 setThreadId(threadId);
138 }
139 }
140
141
146 @Override
147 public long getPrimaryKey() {
148 return _mbDiscussion.getPrimaryKey();
149 }
150
151
156 @Override
157 public void setPrimaryKey(long primaryKey) {
158 _mbDiscussion.setPrimaryKey(primaryKey);
159 }
160
161
166 @Override
167 public java.lang.String getUuid() {
168 return _mbDiscussion.getUuid();
169 }
170
171
176 @Override
177 public void setUuid(java.lang.String uuid) {
178 _mbDiscussion.setUuid(uuid);
179 }
180
181
186 @Override
187 public long getDiscussionId() {
188 return _mbDiscussion.getDiscussionId();
189 }
190
191
196 @Override
197 public void setDiscussionId(long discussionId) {
198 _mbDiscussion.setDiscussionId(discussionId);
199 }
200
201
206 @Override
207 public long getGroupId() {
208 return _mbDiscussion.getGroupId();
209 }
210
211
216 @Override
217 public void setGroupId(long groupId) {
218 _mbDiscussion.setGroupId(groupId);
219 }
220
221
226 @Override
227 public long getCompanyId() {
228 return _mbDiscussion.getCompanyId();
229 }
230
231
236 @Override
237 public void setCompanyId(long companyId) {
238 _mbDiscussion.setCompanyId(companyId);
239 }
240
241
246 @Override
247 public long getUserId() {
248 return _mbDiscussion.getUserId();
249 }
250
251
256 @Override
257 public void setUserId(long userId) {
258 _mbDiscussion.setUserId(userId);
259 }
260
261
267 @Override
268 public java.lang.String getUserUuid()
269 throws com.liferay.portal.kernel.exception.SystemException {
270 return _mbDiscussion.getUserUuid();
271 }
272
273
278 @Override
279 public void setUserUuid(java.lang.String userUuid) {
280 _mbDiscussion.setUserUuid(userUuid);
281 }
282
283
288 @Override
289 public java.lang.String getUserName() {
290 return _mbDiscussion.getUserName();
291 }
292
293
298 @Override
299 public void setUserName(java.lang.String userName) {
300 _mbDiscussion.setUserName(userName);
301 }
302
303
308 @Override
309 public java.util.Date getCreateDate() {
310 return _mbDiscussion.getCreateDate();
311 }
312
313
318 @Override
319 public void setCreateDate(java.util.Date createDate) {
320 _mbDiscussion.setCreateDate(createDate);
321 }
322
323
328 @Override
329 public java.util.Date getModifiedDate() {
330 return _mbDiscussion.getModifiedDate();
331 }
332
333
338 @Override
339 public void setModifiedDate(java.util.Date modifiedDate) {
340 _mbDiscussion.setModifiedDate(modifiedDate);
341 }
342
343
348 @Override
349 public java.lang.String getClassName() {
350 return _mbDiscussion.getClassName();
351 }
352
353 @Override
354 public void setClassName(java.lang.String className) {
355 _mbDiscussion.setClassName(className);
356 }
357
358
363 @Override
364 public long getClassNameId() {
365 return _mbDiscussion.getClassNameId();
366 }
367
368
373 @Override
374 public void setClassNameId(long classNameId) {
375 _mbDiscussion.setClassNameId(classNameId);
376 }
377
378
383 @Override
384 public long getClassPK() {
385 return _mbDiscussion.getClassPK();
386 }
387
388
393 @Override
394 public void setClassPK(long classPK) {
395 _mbDiscussion.setClassPK(classPK);
396 }
397
398
403 @Override
404 public long getThreadId() {
405 return _mbDiscussion.getThreadId();
406 }
407
408
413 @Override
414 public void setThreadId(long threadId) {
415 _mbDiscussion.setThreadId(threadId);
416 }
417
418 @Override
419 public boolean isNew() {
420 return _mbDiscussion.isNew();
421 }
422
423 @Override
424 public void setNew(boolean n) {
425 _mbDiscussion.setNew(n);
426 }
427
428 @Override
429 public boolean isCachedModel() {
430 return _mbDiscussion.isCachedModel();
431 }
432
433 @Override
434 public void setCachedModel(boolean cachedModel) {
435 _mbDiscussion.setCachedModel(cachedModel);
436 }
437
438 @Override
439 public boolean isEscapedModel() {
440 return _mbDiscussion.isEscapedModel();
441 }
442
443 @Override
444 public java.io.Serializable getPrimaryKeyObj() {
445 return _mbDiscussion.getPrimaryKeyObj();
446 }
447
448 @Override
449 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
450 _mbDiscussion.setPrimaryKeyObj(primaryKeyObj);
451 }
452
453 @Override
454 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
455 return _mbDiscussion.getExpandoBridge();
456 }
457
458 @Override
459 public void setExpandoBridgeAttributes(
460 com.liferay.portal.model.BaseModel<?> baseModel) {
461 _mbDiscussion.setExpandoBridgeAttributes(baseModel);
462 }
463
464 @Override
465 public void setExpandoBridgeAttributes(
466 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
467 _mbDiscussion.setExpandoBridgeAttributes(expandoBridge);
468 }
469
470 @Override
471 public void setExpandoBridgeAttributes(
472 com.liferay.portal.service.ServiceContext serviceContext) {
473 _mbDiscussion.setExpandoBridgeAttributes(serviceContext);
474 }
475
476 @Override
477 public java.lang.Object clone() {
478 return new MBDiscussionWrapper((MBDiscussion)_mbDiscussion.clone());
479 }
480
481 @Override
482 public int compareTo(
483 com.liferay.portlet.messageboards.model.MBDiscussion mbDiscussion) {
484 return _mbDiscussion.compareTo(mbDiscussion);
485 }
486
487 @Override
488 public int hashCode() {
489 return _mbDiscussion.hashCode();
490 }
491
492 @Override
493 public com.liferay.portal.model.CacheModel<com.liferay.portlet.messageboards.model.MBDiscussion> toCacheModel() {
494 return _mbDiscussion.toCacheModel();
495 }
496
497 @Override
498 public com.liferay.portlet.messageboards.model.MBDiscussion toEscapedModel() {
499 return new MBDiscussionWrapper(_mbDiscussion.toEscapedModel());
500 }
501
502 @Override
503 public com.liferay.portlet.messageboards.model.MBDiscussion toUnescapedModel() {
504 return new MBDiscussionWrapper(_mbDiscussion.toUnescapedModel());
505 }
506
507 @Override
508 public java.lang.String toString() {
509 return _mbDiscussion.toString();
510 }
511
512 @Override
513 public java.lang.String toXmlString() {
514 return _mbDiscussion.toXmlString();
515 }
516
517 @Override
518 public void persist()
519 throws com.liferay.portal.kernel.exception.SystemException {
520 _mbDiscussion.persist();
521 }
522
523 @Override
524 public boolean equals(Object obj) {
525 if (this == obj) {
526 return true;
527 }
528
529 if (!(obj instanceof MBDiscussionWrapper)) {
530 return false;
531 }
532
533 MBDiscussionWrapper mbDiscussionWrapper = (MBDiscussionWrapper)obj;
534
535 if (Validator.equals(_mbDiscussion, mbDiscussionWrapper._mbDiscussion)) {
536 return true;
537 }
538
539 return false;
540 }
541
542 @Override
543 public StagedModelType getStagedModelType() {
544 return _mbDiscussion.getStagedModelType();
545 }
546
547
550 public MBDiscussion getWrappedMBDiscussion() {
551 return _mbDiscussion;
552 }
553
554 @Override
555 public MBDiscussion getWrappedModel() {
556 return _mbDiscussion;
557 }
558
559 @Override
560 public void resetOriginalValues() {
561 _mbDiscussion.resetOriginalValues();
562 }
563
564 private MBDiscussion _mbDiscussion;
565 }