001
014
015 package com.liferay.portlet.mobiledevicerules.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 MDRRuleWrapper implements MDRRule, ModelWrapper<MDRRule> {
034 public MDRRuleWrapper(MDRRule mdrRule) {
035 _mdrRule = mdrRule;
036 }
037
038 public Class<?> getModelClass() {
039 return MDRRule.class;
040 }
041
042 public String getModelClassName() {
043 return MDRRule.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("ruleId", getRuleId());
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("ruleGroupId", getRuleGroupId());
058 attributes.put("name", getName());
059 attributes.put("description", getDescription());
060 attributes.put("type", getType());
061 attributes.put("typeSettings", getTypeSettings());
062
063 return attributes;
064 }
065
066 public void setModelAttributes(Map<String, Object> attributes) {
067 String uuid = (String)attributes.get("uuid");
068
069 if (uuid != null) {
070 setUuid(uuid);
071 }
072
073 Long ruleId = (Long)attributes.get("ruleId");
074
075 if (ruleId != null) {
076 setRuleId(ruleId);
077 }
078
079 Long groupId = (Long)attributes.get("groupId");
080
081 if (groupId != null) {
082 setGroupId(groupId);
083 }
084
085 Long companyId = (Long)attributes.get("companyId");
086
087 if (companyId != null) {
088 setCompanyId(companyId);
089 }
090
091 Long userId = (Long)attributes.get("userId");
092
093 if (userId != null) {
094 setUserId(userId);
095 }
096
097 String userName = (String)attributes.get("userName");
098
099 if (userName != null) {
100 setUserName(userName);
101 }
102
103 Date createDate = (Date)attributes.get("createDate");
104
105 if (createDate != null) {
106 setCreateDate(createDate);
107 }
108
109 Date modifiedDate = (Date)attributes.get("modifiedDate");
110
111 if (modifiedDate != null) {
112 setModifiedDate(modifiedDate);
113 }
114
115 Long ruleGroupId = (Long)attributes.get("ruleGroupId");
116
117 if (ruleGroupId != null) {
118 setRuleGroupId(ruleGroupId);
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 type = (String)attributes.get("type");
134
135 if (type != null) {
136 setType(type);
137 }
138
139 String typeSettings = (String)attributes.get("typeSettings");
140
141 if (typeSettings != null) {
142 setTypeSettings(typeSettings);
143 }
144 }
145
146
151 public long getPrimaryKey() {
152 return _mdrRule.getPrimaryKey();
153 }
154
155
160 public void setPrimaryKey(long primaryKey) {
161 _mdrRule.setPrimaryKey(primaryKey);
162 }
163
164
169 public java.lang.String getUuid() {
170 return _mdrRule.getUuid();
171 }
172
173
178 public void setUuid(java.lang.String uuid) {
179 _mdrRule.setUuid(uuid);
180 }
181
182
187 public long getRuleId() {
188 return _mdrRule.getRuleId();
189 }
190
191
196 public void setRuleId(long ruleId) {
197 _mdrRule.setRuleId(ruleId);
198 }
199
200
205 public long getGroupId() {
206 return _mdrRule.getGroupId();
207 }
208
209
214 public void setGroupId(long groupId) {
215 _mdrRule.setGroupId(groupId);
216 }
217
218
223 public long getCompanyId() {
224 return _mdrRule.getCompanyId();
225 }
226
227
232 public void setCompanyId(long companyId) {
233 _mdrRule.setCompanyId(companyId);
234 }
235
236
241 public long getUserId() {
242 return _mdrRule.getUserId();
243 }
244
245
250 public void setUserId(long userId) {
251 _mdrRule.setUserId(userId);
252 }
253
254
260 public java.lang.String getUserUuid()
261 throws com.liferay.portal.kernel.exception.SystemException {
262 return _mdrRule.getUserUuid();
263 }
264
265
270 public void setUserUuid(java.lang.String userUuid) {
271 _mdrRule.setUserUuid(userUuid);
272 }
273
274
279 public java.lang.String getUserName() {
280 return _mdrRule.getUserName();
281 }
282
283
288 public void setUserName(java.lang.String userName) {
289 _mdrRule.setUserName(userName);
290 }
291
292
297 public java.util.Date getCreateDate() {
298 return _mdrRule.getCreateDate();
299 }
300
301
306 public void setCreateDate(java.util.Date createDate) {
307 _mdrRule.setCreateDate(createDate);
308 }
309
310
315 public java.util.Date getModifiedDate() {
316 return _mdrRule.getModifiedDate();
317 }
318
319
324 public void setModifiedDate(java.util.Date modifiedDate) {
325 _mdrRule.setModifiedDate(modifiedDate);
326 }
327
328
333 public long getRuleGroupId() {
334 return _mdrRule.getRuleGroupId();
335 }
336
337
342 public void setRuleGroupId(long ruleGroupId) {
343 _mdrRule.setRuleGroupId(ruleGroupId);
344 }
345
346
351 public java.lang.String getName() {
352 return _mdrRule.getName();
353 }
354
355
361 public java.lang.String getName(java.util.Locale locale) {
362 return _mdrRule.getName(locale);
363 }
364
365
372 public java.lang.String getName(java.util.Locale locale, boolean useDefault) {
373 return _mdrRule.getName(locale, useDefault);
374 }
375
376
382 public java.lang.String getName(java.lang.String languageId) {
383 return _mdrRule.getName(languageId);
384 }
385
386
393 public java.lang.String getName(java.lang.String languageId,
394 boolean useDefault) {
395 return _mdrRule.getName(languageId, useDefault);
396 }
397
398 public java.lang.String getNameCurrentLanguageId() {
399 return _mdrRule.getNameCurrentLanguageId();
400 }
401
402 public java.lang.String getNameCurrentValue() {
403 return _mdrRule.getNameCurrentValue();
404 }
405
406
411 public java.util.Map<java.util.Locale, java.lang.String> getNameMap() {
412 return _mdrRule.getNameMap();
413 }
414
415
420 public void setName(java.lang.String name) {
421 _mdrRule.setName(name);
422 }
423
424
430 public void setName(java.lang.String name, java.util.Locale locale) {
431 _mdrRule.setName(name, locale);
432 }
433
434
441 public void setName(java.lang.String name, java.util.Locale locale,
442 java.util.Locale defaultLocale) {
443 _mdrRule.setName(name, locale, defaultLocale);
444 }
445
446 public void setNameCurrentLanguageId(java.lang.String languageId) {
447 _mdrRule.setNameCurrentLanguageId(languageId);
448 }
449
450
455 public void setNameMap(
456 java.util.Map<java.util.Locale, java.lang.String> nameMap) {
457 _mdrRule.setNameMap(nameMap);
458 }
459
460
466 public void setNameMap(
467 java.util.Map<java.util.Locale, java.lang.String> nameMap,
468 java.util.Locale defaultLocale) {
469 _mdrRule.setNameMap(nameMap, defaultLocale);
470 }
471
472
477 public java.lang.String getDescription() {
478 return _mdrRule.getDescription();
479 }
480
481
487 public java.lang.String getDescription(java.util.Locale locale) {
488 return _mdrRule.getDescription(locale);
489 }
490
491
498 public java.lang.String getDescription(java.util.Locale locale,
499 boolean useDefault) {
500 return _mdrRule.getDescription(locale, useDefault);
501 }
502
503
509 public java.lang.String getDescription(java.lang.String languageId) {
510 return _mdrRule.getDescription(languageId);
511 }
512
513
520 public java.lang.String getDescription(java.lang.String languageId,
521 boolean useDefault) {
522 return _mdrRule.getDescription(languageId, useDefault);
523 }
524
525 public java.lang.String getDescriptionCurrentLanguageId() {
526 return _mdrRule.getDescriptionCurrentLanguageId();
527 }
528
529 public java.lang.String getDescriptionCurrentValue() {
530 return _mdrRule.getDescriptionCurrentValue();
531 }
532
533
538 public java.util.Map<java.util.Locale, java.lang.String> getDescriptionMap() {
539 return _mdrRule.getDescriptionMap();
540 }
541
542
547 public void setDescription(java.lang.String description) {
548 _mdrRule.setDescription(description);
549 }
550
551
557 public void setDescription(java.lang.String description,
558 java.util.Locale locale) {
559 _mdrRule.setDescription(description, locale);
560 }
561
562
569 public void setDescription(java.lang.String description,
570 java.util.Locale locale, java.util.Locale defaultLocale) {
571 _mdrRule.setDescription(description, locale, defaultLocale);
572 }
573
574 public void setDescriptionCurrentLanguageId(java.lang.String languageId) {
575 _mdrRule.setDescriptionCurrentLanguageId(languageId);
576 }
577
578
583 public void setDescriptionMap(
584 java.util.Map<java.util.Locale, java.lang.String> descriptionMap) {
585 _mdrRule.setDescriptionMap(descriptionMap);
586 }
587
588
594 public void setDescriptionMap(
595 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
596 java.util.Locale defaultLocale) {
597 _mdrRule.setDescriptionMap(descriptionMap, defaultLocale);
598 }
599
600
605 public java.lang.String getType() {
606 return _mdrRule.getType();
607 }
608
609
614 public void setType(java.lang.String type) {
615 _mdrRule.setType(type);
616 }
617
618
623 public java.lang.String getTypeSettings() {
624 return _mdrRule.getTypeSettings();
625 }
626
627
632 public void setTypeSettings(java.lang.String typeSettings) {
633 _mdrRule.setTypeSettings(typeSettings);
634 }
635
636 public boolean isNew() {
637 return _mdrRule.isNew();
638 }
639
640 public void setNew(boolean n) {
641 _mdrRule.setNew(n);
642 }
643
644 public boolean isCachedModel() {
645 return _mdrRule.isCachedModel();
646 }
647
648 public void setCachedModel(boolean cachedModel) {
649 _mdrRule.setCachedModel(cachedModel);
650 }
651
652 public boolean isEscapedModel() {
653 return _mdrRule.isEscapedModel();
654 }
655
656 public java.io.Serializable getPrimaryKeyObj() {
657 return _mdrRule.getPrimaryKeyObj();
658 }
659
660 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
661 _mdrRule.setPrimaryKeyObj(primaryKeyObj);
662 }
663
664 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
665 return _mdrRule.getExpandoBridge();
666 }
667
668 public void setExpandoBridgeAttributes(
669 com.liferay.portal.service.ServiceContext serviceContext) {
670 _mdrRule.setExpandoBridgeAttributes(serviceContext);
671 }
672
673 public void prepareLocalizedFieldsForImport(
674 java.util.Locale defaultImportLocale)
675 throws com.liferay.portal.LocaleException {
676 _mdrRule.prepareLocalizedFieldsForImport(defaultImportLocale);
677 }
678
679 @Override
680 public java.lang.Object clone() {
681 return new MDRRuleWrapper((MDRRule)_mdrRule.clone());
682 }
683
684 public int compareTo(
685 com.liferay.portlet.mobiledevicerules.model.MDRRule mdrRule) {
686 return _mdrRule.compareTo(mdrRule);
687 }
688
689 @Override
690 public int hashCode() {
691 return _mdrRule.hashCode();
692 }
693
694 public com.liferay.portal.model.CacheModel<com.liferay.portlet.mobiledevicerules.model.MDRRule> toCacheModel() {
695 return _mdrRule.toCacheModel();
696 }
697
698 public com.liferay.portlet.mobiledevicerules.model.MDRRule toEscapedModel() {
699 return new MDRRuleWrapper(_mdrRule.toEscapedModel());
700 }
701
702 public com.liferay.portlet.mobiledevicerules.model.MDRRule toUnescapedModel() {
703 return new MDRRuleWrapper(_mdrRule.toUnescapedModel());
704 }
705
706 @Override
707 public java.lang.String toString() {
708 return _mdrRule.toString();
709 }
710
711 public java.lang.String toXmlString() {
712 return _mdrRule.toXmlString();
713 }
714
715 public void persist()
716 throws com.liferay.portal.kernel.exception.SystemException {
717 _mdrRule.persist();
718 }
719
720 public com.liferay.portal.kernel.util.UnicodeProperties getTypeSettingsProperties() {
721 return _mdrRule.getTypeSettingsProperties();
722 }
723
724 public void setTypeSettingsProperties(
725 com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties) {
726 _mdrRule.setTypeSettingsProperties(typeSettingsProperties);
727 }
728
729 @Override
730 public boolean equals(Object obj) {
731 if (this == obj) {
732 return true;
733 }
734
735 if (!(obj instanceof MDRRuleWrapper)) {
736 return false;
737 }
738
739 MDRRuleWrapper mdrRuleWrapper = (MDRRuleWrapper)obj;
740
741 if (Validator.equals(_mdrRule, mdrRuleWrapper._mdrRule)) {
742 return true;
743 }
744
745 return false;
746 }
747
748
751 public MDRRule getWrappedMDRRule() {
752 return _mdrRule;
753 }
754
755 public MDRRule getWrappedModel() {
756 return _mdrRule;
757 }
758
759 public void resetOriginalValues() {
760 _mdrRule.resetOriginalValues();
761 }
762
763 private MDRRule _mdrRule;
764 }