001
014
015 package com.liferay.portlet.wiki.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 WikiNodeWrapper implements WikiNode, ModelWrapper<WikiNode> {
034 public WikiNodeWrapper(WikiNode wikiNode) {
035 _wikiNode = wikiNode;
036 }
037
038 public Class<?> getModelClass() {
039 return WikiNode.class;
040 }
041
042 public String getModelClassName() {
043 return WikiNode.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("nodeId", getNodeId());
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("name", getName());
058 attributes.put("description", getDescription());
059 attributes.put("lastPostDate", getLastPostDate());
060
061 return attributes;
062 }
063
064 public void setModelAttributes(Map<String, Object> attributes) {
065 String uuid = (String)attributes.get("uuid");
066
067 if (uuid != null) {
068 setUuid(uuid);
069 }
070
071 Long nodeId = (Long)attributes.get("nodeId");
072
073 if (nodeId != null) {
074 setNodeId(nodeId);
075 }
076
077 Long groupId = (Long)attributes.get("groupId");
078
079 if (groupId != null) {
080 setGroupId(groupId);
081 }
082
083 Long companyId = (Long)attributes.get("companyId");
084
085 if (companyId != null) {
086 setCompanyId(companyId);
087 }
088
089 Long userId = (Long)attributes.get("userId");
090
091 if (userId != null) {
092 setUserId(userId);
093 }
094
095 String userName = (String)attributes.get("userName");
096
097 if (userName != null) {
098 setUserName(userName);
099 }
100
101 Date createDate = (Date)attributes.get("createDate");
102
103 if (createDate != null) {
104 setCreateDate(createDate);
105 }
106
107 Date modifiedDate = (Date)attributes.get("modifiedDate");
108
109 if (modifiedDate != null) {
110 setModifiedDate(modifiedDate);
111 }
112
113 String name = (String)attributes.get("name");
114
115 if (name != null) {
116 setName(name);
117 }
118
119 String description = (String)attributes.get("description");
120
121 if (description != null) {
122 setDescription(description);
123 }
124
125 Date lastPostDate = (Date)attributes.get("lastPostDate");
126
127 if (lastPostDate != null) {
128 setLastPostDate(lastPostDate);
129 }
130 }
131
132
137 public long getPrimaryKey() {
138 return _wikiNode.getPrimaryKey();
139 }
140
141
146 public void setPrimaryKey(long primaryKey) {
147 _wikiNode.setPrimaryKey(primaryKey);
148 }
149
150
155 public java.lang.String getUuid() {
156 return _wikiNode.getUuid();
157 }
158
159
164 public void setUuid(java.lang.String uuid) {
165 _wikiNode.setUuid(uuid);
166 }
167
168
173 public long getNodeId() {
174 return _wikiNode.getNodeId();
175 }
176
177
182 public void setNodeId(long nodeId) {
183 _wikiNode.setNodeId(nodeId);
184 }
185
186
191 public long getGroupId() {
192 return _wikiNode.getGroupId();
193 }
194
195
200 public void setGroupId(long groupId) {
201 _wikiNode.setGroupId(groupId);
202 }
203
204
209 public long getCompanyId() {
210 return _wikiNode.getCompanyId();
211 }
212
213
218 public void setCompanyId(long companyId) {
219 _wikiNode.setCompanyId(companyId);
220 }
221
222
227 public long getUserId() {
228 return _wikiNode.getUserId();
229 }
230
231
236 public void setUserId(long userId) {
237 _wikiNode.setUserId(userId);
238 }
239
240
246 public java.lang.String getUserUuid()
247 throws com.liferay.portal.kernel.exception.SystemException {
248 return _wikiNode.getUserUuid();
249 }
250
251
256 public void setUserUuid(java.lang.String userUuid) {
257 _wikiNode.setUserUuid(userUuid);
258 }
259
260
265 public java.lang.String getUserName() {
266 return _wikiNode.getUserName();
267 }
268
269
274 public void setUserName(java.lang.String userName) {
275 _wikiNode.setUserName(userName);
276 }
277
278
283 public java.util.Date getCreateDate() {
284 return _wikiNode.getCreateDate();
285 }
286
287
292 public void setCreateDate(java.util.Date createDate) {
293 _wikiNode.setCreateDate(createDate);
294 }
295
296
301 public java.util.Date getModifiedDate() {
302 return _wikiNode.getModifiedDate();
303 }
304
305
310 public void setModifiedDate(java.util.Date modifiedDate) {
311 _wikiNode.setModifiedDate(modifiedDate);
312 }
313
314
319 public java.lang.String getName() {
320 return _wikiNode.getName();
321 }
322
323
328 public void setName(java.lang.String name) {
329 _wikiNode.setName(name);
330 }
331
332
337 public java.lang.String getDescription() {
338 return _wikiNode.getDescription();
339 }
340
341
346 public void setDescription(java.lang.String description) {
347 _wikiNode.setDescription(description);
348 }
349
350
355 public java.util.Date getLastPostDate() {
356 return _wikiNode.getLastPostDate();
357 }
358
359
364 public void setLastPostDate(java.util.Date lastPostDate) {
365 _wikiNode.setLastPostDate(lastPostDate);
366 }
367
368 public boolean isNew() {
369 return _wikiNode.isNew();
370 }
371
372 public void setNew(boolean n) {
373 _wikiNode.setNew(n);
374 }
375
376 public boolean isCachedModel() {
377 return _wikiNode.isCachedModel();
378 }
379
380 public void setCachedModel(boolean cachedModel) {
381 _wikiNode.setCachedModel(cachedModel);
382 }
383
384 public boolean isEscapedModel() {
385 return _wikiNode.isEscapedModel();
386 }
387
388 public java.io.Serializable getPrimaryKeyObj() {
389 return _wikiNode.getPrimaryKeyObj();
390 }
391
392 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
393 _wikiNode.setPrimaryKeyObj(primaryKeyObj);
394 }
395
396 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
397 return _wikiNode.getExpandoBridge();
398 }
399
400 public void setExpandoBridgeAttributes(
401 com.liferay.portal.service.ServiceContext serviceContext) {
402 _wikiNode.setExpandoBridgeAttributes(serviceContext);
403 }
404
405 @Override
406 public java.lang.Object clone() {
407 return new WikiNodeWrapper((WikiNode)_wikiNode.clone());
408 }
409
410 public int compareTo(com.liferay.portlet.wiki.model.WikiNode wikiNode) {
411 return _wikiNode.compareTo(wikiNode);
412 }
413
414 @Override
415 public int hashCode() {
416 return _wikiNode.hashCode();
417 }
418
419 public com.liferay.portal.model.CacheModel<com.liferay.portlet.wiki.model.WikiNode> toCacheModel() {
420 return _wikiNode.toCacheModel();
421 }
422
423 public com.liferay.portlet.wiki.model.WikiNode toEscapedModel() {
424 return new WikiNodeWrapper(_wikiNode.toEscapedModel());
425 }
426
427 public com.liferay.portlet.wiki.model.WikiNode toUnescapedModel() {
428 return new WikiNodeWrapper(_wikiNode.toUnescapedModel());
429 }
430
431 @Override
432 public java.lang.String toString() {
433 return _wikiNode.toString();
434 }
435
436 public java.lang.String toXmlString() {
437 return _wikiNode.toXmlString();
438 }
439
440 public void persist()
441 throws com.liferay.portal.kernel.exception.SystemException {
442 _wikiNode.persist();
443 }
444
445 @Override
446 public boolean equals(Object obj) {
447 if (this == obj) {
448 return true;
449 }
450
451 if (!(obj instanceof WikiNodeWrapper)) {
452 return false;
453 }
454
455 WikiNodeWrapper wikiNodeWrapper = (WikiNodeWrapper)obj;
456
457 if (Validator.equals(_wikiNode, wikiNodeWrapper._wikiNode)) {
458 return true;
459 }
460
461 return false;
462 }
463
464
467 public WikiNode getWrappedWikiNode() {
468 return _wikiNode;
469 }
470
471 public WikiNode getWrappedModel() {
472 return _wikiNode;
473 }
474
475 public void resetOriginalValues() {
476 _wikiNode.resetOriginalValues();
477 }
478
479 private WikiNode _wikiNode;
480 }