001
014
015 package com.liferay.portlet.dynamicdatamapping.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 DDMContentWrapper implements DDMContent, ModelWrapper<DDMContent> {
038 public DDMContentWrapper(DDMContent ddmContent) {
039 _ddmContent = ddmContent;
040 }
041
042 @Override
043 public Class<?> getModelClass() {
044 return DDMContent.class;
045 }
046
047 @Override
048 public String getModelClassName() {
049 return DDMContent.class.getName();
050 }
051
052 @Override
053 public Map<String, Object> getModelAttributes() {
054 Map<String, Object> attributes = new HashMap<String, Object>();
055
056 attributes.put("uuid", getUuid());
057 attributes.put("contentId", getContentId());
058 attributes.put("groupId", getGroupId());
059 attributes.put("companyId", getCompanyId());
060 attributes.put("userId", getUserId());
061 attributes.put("userName", getUserName());
062 attributes.put("createDate", getCreateDate());
063 attributes.put("modifiedDate", getModifiedDate());
064 attributes.put("name", getName());
065 attributes.put("description", getDescription());
066 attributes.put("xml", getXml());
067
068 return attributes;
069 }
070
071 @Override
072 public void setModelAttributes(Map<String, Object> attributes) {
073 String uuid = (String)attributes.get("uuid");
074
075 if (uuid != null) {
076 setUuid(uuid);
077 }
078
079 Long contentId = (Long)attributes.get("contentId");
080
081 if (contentId != null) {
082 setContentId(contentId);
083 }
084
085 Long groupId = (Long)attributes.get("groupId");
086
087 if (groupId != null) {
088 setGroupId(groupId);
089 }
090
091 Long companyId = (Long)attributes.get("companyId");
092
093 if (companyId != null) {
094 setCompanyId(companyId);
095 }
096
097 Long userId = (Long)attributes.get("userId");
098
099 if (userId != null) {
100 setUserId(userId);
101 }
102
103 String userName = (String)attributes.get("userName");
104
105 if (userName != null) {
106 setUserName(userName);
107 }
108
109 Date createDate = (Date)attributes.get("createDate");
110
111 if (createDate != null) {
112 setCreateDate(createDate);
113 }
114
115 Date modifiedDate = (Date)attributes.get("modifiedDate");
116
117 if (modifiedDate != null) {
118 setModifiedDate(modifiedDate);
119 }
120
121 String name = (String)attributes.get("name");
122
123 if (name != null) {
124 setName(name);
125 }
126
127 String description = (String)attributes.get("description");
128
129 if (description != null) {
130 setDescription(description);
131 }
132
133 String xml = (String)attributes.get("xml");
134
135 if (xml != null) {
136 setXml(xml);
137 }
138 }
139
140
145 @Override
146 public long getPrimaryKey() {
147 return _ddmContent.getPrimaryKey();
148 }
149
150
155 @Override
156 public void setPrimaryKey(long primaryKey) {
157 _ddmContent.setPrimaryKey(primaryKey);
158 }
159
160
165 @Override
166 public java.lang.String getUuid() {
167 return _ddmContent.getUuid();
168 }
169
170
175 @Override
176 public void setUuid(java.lang.String uuid) {
177 _ddmContent.setUuid(uuid);
178 }
179
180
185 @Override
186 public long getContentId() {
187 return _ddmContent.getContentId();
188 }
189
190
195 @Override
196 public void setContentId(long contentId) {
197 _ddmContent.setContentId(contentId);
198 }
199
200
205 @Override
206 public long getGroupId() {
207 return _ddmContent.getGroupId();
208 }
209
210
215 @Override
216 public void setGroupId(long groupId) {
217 _ddmContent.setGroupId(groupId);
218 }
219
220
225 @Override
226 public long getCompanyId() {
227 return _ddmContent.getCompanyId();
228 }
229
230
235 @Override
236 public void setCompanyId(long companyId) {
237 _ddmContent.setCompanyId(companyId);
238 }
239
240
245 @Override
246 public long getUserId() {
247 return _ddmContent.getUserId();
248 }
249
250
255 @Override
256 public void setUserId(long userId) {
257 _ddmContent.setUserId(userId);
258 }
259
260
266 @Override
267 public java.lang.String getUserUuid()
268 throws com.liferay.portal.kernel.exception.SystemException {
269 return _ddmContent.getUserUuid();
270 }
271
272
277 @Override
278 public void setUserUuid(java.lang.String userUuid) {
279 _ddmContent.setUserUuid(userUuid);
280 }
281
282
287 @Override
288 public java.lang.String getUserName() {
289 return _ddmContent.getUserName();
290 }
291
292
297 @Override
298 public void setUserName(java.lang.String userName) {
299 _ddmContent.setUserName(userName);
300 }
301
302
307 @Override
308 public java.util.Date getCreateDate() {
309 return _ddmContent.getCreateDate();
310 }
311
312
317 @Override
318 public void setCreateDate(java.util.Date createDate) {
319 _ddmContent.setCreateDate(createDate);
320 }
321
322
327 @Override
328 public java.util.Date getModifiedDate() {
329 return _ddmContent.getModifiedDate();
330 }
331
332
337 @Override
338 public void setModifiedDate(java.util.Date modifiedDate) {
339 _ddmContent.setModifiedDate(modifiedDate);
340 }
341
342
347 @Override
348 public java.lang.String getName() {
349 return _ddmContent.getName();
350 }
351
352
358 @Override
359 public java.lang.String getName(java.util.Locale locale) {
360 return _ddmContent.getName(locale);
361 }
362
363
370 @Override
371 public java.lang.String getName(java.util.Locale locale, boolean useDefault) {
372 return _ddmContent.getName(locale, useDefault);
373 }
374
375
381 @Override
382 public java.lang.String getName(java.lang.String languageId) {
383 return _ddmContent.getName(languageId);
384 }
385
386
393 @Override
394 public java.lang.String getName(java.lang.String languageId,
395 boolean useDefault) {
396 return _ddmContent.getName(languageId, useDefault);
397 }
398
399 @Override
400 public java.lang.String getNameCurrentLanguageId() {
401 return _ddmContent.getNameCurrentLanguageId();
402 }
403
404 @Override
405 public java.lang.String getNameCurrentValue() {
406 return _ddmContent.getNameCurrentValue();
407 }
408
409
414 @Override
415 public java.util.Map<java.util.Locale, java.lang.String> getNameMap() {
416 return _ddmContent.getNameMap();
417 }
418
419
424 @Override
425 public void setName(java.lang.String name) {
426 _ddmContent.setName(name);
427 }
428
429
435 @Override
436 public void setName(java.lang.String name, java.util.Locale locale) {
437 _ddmContent.setName(name, locale);
438 }
439
440
447 @Override
448 public void setName(java.lang.String name, java.util.Locale locale,
449 java.util.Locale defaultLocale) {
450 _ddmContent.setName(name, locale, defaultLocale);
451 }
452
453 @Override
454 public void setNameCurrentLanguageId(java.lang.String languageId) {
455 _ddmContent.setNameCurrentLanguageId(languageId);
456 }
457
458
463 @Override
464 public void setNameMap(
465 java.util.Map<java.util.Locale, java.lang.String> nameMap) {
466 _ddmContent.setNameMap(nameMap);
467 }
468
469
475 @Override
476 public void setNameMap(
477 java.util.Map<java.util.Locale, java.lang.String> nameMap,
478 java.util.Locale defaultLocale) {
479 _ddmContent.setNameMap(nameMap, defaultLocale);
480 }
481
482
487 @Override
488 public java.lang.String getDescription() {
489 return _ddmContent.getDescription();
490 }
491
492
497 @Override
498 public void setDescription(java.lang.String description) {
499 _ddmContent.setDescription(description);
500 }
501
502
507 @Override
508 public java.lang.String getXml() {
509 return _ddmContent.getXml();
510 }
511
512
517 @Override
518 public void setXml(java.lang.String xml) {
519 _ddmContent.setXml(xml);
520 }
521
522 @Override
523 public boolean isNew() {
524 return _ddmContent.isNew();
525 }
526
527 @Override
528 public void setNew(boolean n) {
529 _ddmContent.setNew(n);
530 }
531
532 @Override
533 public boolean isCachedModel() {
534 return _ddmContent.isCachedModel();
535 }
536
537 @Override
538 public void setCachedModel(boolean cachedModel) {
539 _ddmContent.setCachedModel(cachedModel);
540 }
541
542 @Override
543 public boolean isEscapedModel() {
544 return _ddmContent.isEscapedModel();
545 }
546
547 @Override
548 public java.io.Serializable getPrimaryKeyObj() {
549 return _ddmContent.getPrimaryKeyObj();
550 }
551
552 @Override
553 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
554 _ddmContent.setPrimaryKeyObj(primaryKeyObj);
555 }
556
557 @Override
558 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
559 return _ddmContent.getExpandoBridge();
560 }
561
562 @Override
563 public void setExpandoBridgeAttributes(
564 com.liferay.portal.model.BaseModel<?> baseModel) {
565 _ddmContent.setExpandoBridgeAttributes(baseModel);
566 }
567
568 @Override
569 public void setExpandoBridgeAttributes(
570 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
571 _ddmContent.setExpandoBridgeAttributes(expandoBridge);
572 }
573
574 @Override
575 public void setExpandoBridgeAttributes(
576 com.liferay.portal.service.ServiceContext serviceContext) {
577 _ddmContent.setExpandoBridgeAttributes(serviceContext);
578 }
579
580 @Override
581 public java.lang.String[] getAvailableLanguageIds() {
582 return _ddmContent.getAvailableLanguageIds();
583 }
584
585 @Override
586 public java.lang.String getDefaultLanguageId() {
587 return _ddmContent.getDefaultLanguageId();
588 }
589
590 @Override
591 public void prepareLocalizedFieldsForImport()
592 throws com.liferay.portal.LocaleException {
593 _ddmContent.prepareLocalizedFieldsForImport();
594 }
595
596 @Override
597 public void prepareLocalizedFieldsForImport(
598 java.util.Locale defaultImportLocale)
599 throws com.liferay.portal.LocaleException {
600 _ddmContent.prepareLocalizedFieldsForImport(defaultImportLocale);
601 }
602
603 @Override
604 public java.lang.Object clone() {
605 return new DDMContentWrapper((DDMContent)_ddmContent.clone());
606 }
607
608 @Override
609 public int compareTo(
610 com.liferay.portlet.dynamicdatamapping.model.DDMContent ddmContent) {
611 return _ddmContent.compareTo(ddmContent);
612 }
613
614 @Override
615 public int hashCode() {
616 return _ddmContent.hashCode();
617 }
618
619 @Override
620 public com.liferay.portal.model.CacheModel<com.liferay.portlet.dynamicdatamapping.model.DDMContent> toCacheModel() {
621 return _ddmContent.toCacheModel();
622 }
623
624 @Override
625 public com.liferay.portlet.dynamicdatamapping.model.DDMContent toEscapedModel() {
626 return new DDMContentWrapper(_ddmContent.toEscapedModel());
627 }
628
629 @Override
630 public com.liferay.portlet.dynamicdatamapping.model.DDMContent toUnescapedModel() {
631 return new DDMContentWrapper(_ddmContent.toUnescapedModel());
632 }
633
634 @Override
635 public java.lang.String toString() {
636 return _ddmContent.toString();
637 }
638
639 @Override
640 public java.lang.String toXmlString() {
641 return _ddmContent.toXmlString();
642 }
643
644 @Override
645 public void persist()
646 throws com.liferay.portal.kernel.exception.SystemException {
647 _ddmContent.persist();
648 }
649
650 @Override
651 public boolean equals(Object obj) {
652 if (this == obj) {
653 return true;
654 }
655
656 if (!(obj instanceof DDMContentWrapper)) {
657 return false;
658 }
659
660 DDMContentWrapper ddmContentWrapper = (DDMContentWrapper)obj;
661
662 if (Validator.equals(_ddmContent, ddmContentWrapper._ddmContent)) {
663 return true;
664 }
665
666 return false;
667 }
668
669 @Override
670 public StagedModelType getStagedModelType() {
671 return _ddmContent.getStagedModelType();
672 }
673
674
677 public DDMContent getWrappedDDMContent() {
678 return _ddmContent;
679 }
680
681 @Override
682 public DDMContent getWrappedModel() {
683 return _ddmContent;
684 }
685
686 @Override
687 public void resetOriginalValues() {
688 _ddmContent.resetOriginalValues();
689 }
690
691 private DDMContent _ddmContent;
692 }