001
014
015 package com.liferay.portlet.dynamicdatamapping.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 DDMContentWrapper implements DDMContent, ModelWrapper<DDMContent> {
034 public DDMContentWrapper(DDMContent ddmContent) {
035 _ddmContent = ddmContent;
036 }
037
038 public Class<?> getModelClass() {
039 return DDMContent.class;
040 }
041
042 public String getModelClassName() {
043 return DDMContent.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("contentId", getContentId());
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("xml", getXml());
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 contentId = (Long)attributes.get("contentId");
072
073 if (contentId != null) {
074 setContentId(contentId);
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 String xml = (String)attributes.get("xml");
126
127 if (xml != null) {
128 setXml(xml);
129 }
130 }
131
132
137 public long getPrimaryKey() {
138 return _ddmContent.getPrimaryKey();
139 }
140
141
146 public void setPrimaryKey(long primaryKey) {
147 _ddmContent.setPrimaryKey(primaryKey);
148 }
149
150
155 public java.lang.String getUuid() {
156 return _ddmContent.getUuid();
157 }
158
159
164 public void setUuid(java.lang.String uuid) {
165 _ddmContent.setUuid(uuid);
166 }
167
168
173 public long getContentId() {
174 return _ddmContent.getContentId();
175 }
176
177
182 public void setContentId(long contentId) {
183 _ddmContent.setContentId(contentId);
184 }
185
186
191 public long getGroupId() {
192 return _ddmContent.getGroupId();
193 }
194
195
200 public void setGroupId(long groupId) {
201 _ddmContent.setGroupId(groupId);
202 }
203
204
209 public long getCompanyId() {
210 return _ddmContent.getCompanyId();
211 }
212
213
218 public void setCompanyId(long companyId) {
219 _ddmContent.setCompanyId(companyId);
220 }
221
222
227 public long getUserId() {
228 return _ddmContent.getUserId();
229 }
230
231
236 public void setUserId(long userId) {
237 _ddmContent.setUserId(userId);
238 }
239
240
246 public java.lang.String getUserUuid()
247 throws com.liferay.portal.kernel.exception.SystemException {
248 return _ddmContent.getUserUuid();
249 }
250
251
256 public void setUserUuid(java.lang.String userUuid) {
257 _ddmContent.setUserUuid(userUuid);
258 }
259
260
265 public java.lang.String getUserName() {
266 return _ddmContent.getUserName();
267 }
268
269
274 public void setUserName(java.lang.String userName) {
275 _ddmContent.setUserName(userName);
276 }
277
278
283 public java.util.Date getCreateDate() {
284 return _ddmContent.getCreateDate();
285 }
286
287
292 public void setCreateDate(java.util.Date createDate) {
293 _ddmContent.setCreateDate(createDate);
294 }
295
296
301 public java.util.Date getModifiedDate() {
302 return _ddmContent.getModifiedDate();
303 }
304
305
310 public void setModifiedDate(java.util.Date modifiedDate) {
311 _ddmContent.setModifiedDate(modifiedDate);
312 }
313
314
319 public java.lang.String getName() {
320 return _ddmContent.getName();
321 }
322
323
329 public java.lang.String getName(java.util.Locale locale) {
330 return _ddmContent.getName(locale);
331 }
332
333
340 public java.lang.String getName(java.util.Locale locale, boolean useDefault) {
341 return _ddmContent.getName(locale, useDefault);
342 }
343
344
350 public java.lang.String getName(java.lang.String languageId) {
351 return _ddmContent.getName(languageId);
352 }
353
354
361 public java.lang.String getName(java.lang.String languageId,
362 boolean useDefault) {
363 return _ddmContent.getName(languageId, useDefault);
364 }
365
366 public java.lang.String getNameCurrentLanguageId() {
367 return _ddmContent.getNameCurrentLanguageId();
368 }
369
370 public java.lang.String getNameCurrentValue() {
371 return _ddmContent.getNameCurrentValue();
372 }
373
374
379 public java.util.Map<java.util.Locale, java.lang.String> getNameMap() {
380 return _ddmContent.getNameMap();
381 }
382
383
388 public void setName(java.lang.String name) {
389 _ddmContent.setName(name);
390 }
391
392
398 public void setName(java.lang.String name, java.util.Locale locale) {
399 _ddmContent.setName(name, locale);
400 }
401
402
409 public void setName(java.lang.String name, java.util.Locale locale,
410 java.util.Locale defaultLocale) {
411 _ddmContent.setName(name, locale, defaultLocale);
412 }
413
414 public void setNameCurrentLanguageId(java.lang.String languageId) {
415 _ddmContent.setNameCurrentLanguageId(languageId);
416 }
417
418
423 public void setNameMap(
424 java.util.Map<java.util.Locale, java.lang.String> nameMap) {
425 _ddmContent.setNameMap(nameMap);
426 }
427
428
434 public void setNameMap(
435 java.util.Map<java.util.Locale, java.lang.String> nameMap,
436 java.util.Locale defaultLocale) {
437 _ddmContent.setNameMap(nameMap, defaultLocale);
438 }
439
440
445 public java.lang.String getDescription() {
446 return _ddmContent.getDescription();
447 }
448
449
454 public void setDescription(java.lang.String description) {
455 _ddmContent.setDescription(description);
456 }
457
458
463 public java.lang.String getXml() {
464 return _ddmContent.getXml();
465 }
466
467
472 public void setXml(java.lang.String xml) {
473 _ddmContent.setXml(xml);
474 }
475
476 public boolean isNew() {
477 return _ddmContent.isNew();
478 }
479
480 public void setNew(boolean n) {
481 _ddmContent.setNew(n);
482 }
483
484 public boolean isCachedModel() {
485 return _ddmContent.isCachedModel();
486 }
487
488 public void setCachedModel(boolean cachedModel) {
489 _ddmContent.setCachedModel(cachedModel);
490 }
491
492 public boolean isEscapedModel() {
493 return _ddmContent.isEscapedModel();
494 }
495
496 public java.io.Serializable getPrimaryKeyObj() {
497 return _ddmContent.getPrimaryKeyObj();
498 }
499
500 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
501 _ddmContent.setPrimaryKeyObj(primaryKeyObj);
502 }
503
504 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
505 return _ddmContent.getExpandoBridge();
506 }
507
508 public void setExpandoBridgeAttributes(
509 com.liferay.portal.service.ServiceContext serviceContext) {
510 _ddmContent.setExpandoBridgeAttributes(serviceContext);
511 }
512
513 public void prepareLocalizedFieldsForImport(
514 java.util.Locale defaultImportLocale)
515 throws com.liferay.portal.LocaleException {
516 _ddmContent.prepareLocalizedFieldsForImport(defaultImportLocale);
517 }
518
519 @Override
520 public java.lang.Object clone() {
521 return new DDMContentWrapper((DDMContent)_ddmContent.clone());
522 }
523
524 public int compareTo(
525 com.liferay.portlet.dynamicdatamapping.model.DDMContent ddmContent) {
526 return _ddmContent.compareTo(ddmContent);
527 }
528
529 @Override
530 public int hashCode() {
531 return _ddmContent.hashCode();
532 }
533
534 public com.liferay.portal.model.CacheModel<com.liferay.portlet.dynamicdatamapping.model.DDMContent> toCacheModel() {
535 return _ddmContent.toCacheModel();
536 }
537
538 public com.liferay.portlet.dynamicdatamapping.model.DDMContent toEscapedModel() {
539 return new DDMContentWrapper(_ddmContent.toEscapedModel());
540 }
541
542 public com.liferay.portlet.dynamicdatamapping.model.DDMContent toUnescapedModel() {
543 return new DDMContentWrapper(_ddmContent.toUnescapedModel());
544 }
545
546 @Override
547 public java.lang.String toString() {
548 return _ddmContent.toString();
549 }
550
551 public java.lang.String toXmlString() {
552 return _ddmContent.toXmlString();
553 }
554
555 public void persist()
556 throws com.liferay.portal.kernel.exception.SystemException {
557 _ddmContent.persist();
558 }
559
560 @Override
561 public boolean equals(Object obj) {
562 if (this == obj) {
563 return true;
564 }
565
566 if (!(obj instanceof DDMContentWrapper)) {
567 return false;
568 }
569
570 DDMContentWrapper ddmContentWrapper = (DDMContentWrapper)obj;
571
572 if (Validator.equals(_ddmContent, ddmContentWrapper._ddmContent)) {
573 return true;
574 }
575
576 return false;
577 }
578
579
582 public DDMContent getWrappedDDMContent() {
583 return _ddmContent;
584 }
585
586 public DDMContent getWrappedModel() {
587 return _ddmContent;
588 }
589
590 public void resetOriginalValues() {
591 _ddmContent.resetOriginalValues();
592 }
593
594 private DDMContent _ddmContent;
595 }