001
014
015 package com.liferay.portal.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
022 import java.util.Date;
023 import java.util.HashMap;
024 import java.util.Map;
025
026
035 @ProviderType
036 public class RoleWrapper implements Role, ModelWrapper<Role> {
037 public RoleWrapper(Role role) {
038 _role = role;
039 }
040
041 @Override
042 public Class<?> getModelClass() {
043 return Role.class;
044 }
045
046 @Override
047 public String getModelClassName() {
048 return Role.class.getName();
049 }
050
051 @Override
052 public Map<String, Object> getModelAttributes() {
053 Map<String, Object> attributes = new HashMap<String, Object>();
054
055 attributes.put("mvccVersion", getMvccVersion());
056 attributes.put("uuid", getUuid());
057 attributes.put("roleId", getRoleId());
058 attributes.put("companyId", getCompanyId());
059 attributes.put("userId", getUserId());
060 attributes.put("userName", getUserName());
061 attributes.put("createDate", getCreateDate());
062 attributes.put("modifiedDate", getModifiedDate());
063 attributes.put("classNameId", getClassNameId());
064 attributes.put("classPK", getClassPK());
065 attributes.put("name", getName());
066 attributes.put("title", getTitle());
067 attributes.put("description", getDescription());
068 attributes.put("type", getType());
069 attributes.put("subtype", getSubtype());
070
071 return attributes;
072 }
073
074 @Override
075 public void setModelAttributes(Map<String, Object> attributes) {
076 Long mvccVersion = (Long)attributes.get("mvccVersion");
077
078 if (mvccVersion != null) {
079 setMvccVersion(mvccVersion);
080 }
081
082 String uuid = (String)attributes.get("uuid");
083
084 if (uuid != null) {
085 setUuid(uuid);
086 }
087
088 Long roleId = (Long)attributes.get("roleId");
089
090 if (roleId != null) {
091 setRoleId(roleId);
092 }
093
094 Long companyId = (Long)attributes.get("companyId");
095
096 if (companyId != null) {
097 setCompanyId(companyId);
098 }
099
100 Long userId = (Long)attributes.get("userId");
101
102 if (userId != null) {
103 setUserId(userId);
104 }
105
106 String userName = (String)attributes.get("userName");
107
108 if (userName != null) {
109 setUserName(userName);
110 }
111
112 Date createDate = (Date)attributes.get("createDate");
113
114 if (createDate != null) {
115 setCreateDate(createDate);
116 }
117
118 Date modifiedDate = (Date)attributes.get("modifiedDate");
119
120 if (modifiedDate != null) {
121 setModifiedDate(modifiedDate);
122 }
123
124 Long classNameId = (Long)attributes.get("classNameId");
125
126 if (classNameId != null) {
127 setClassNameId(classNameId);
128 }
129
130 Long classPK = (Long)attributes.get("classPK");
131
132 if (classPK != null) {
133 setClassPK(classPK);
134 }
135
136 String name = (String)attributes.get("name");
137
138 if (name != null) {
139 setName(name);
140 }
141
142 String title = (String)attributes.get("title");
143
144 if (title != null) {
145 setTitle(title);
146 }
147
148 String description = (String)attributes.get("description");
149
150 if (description != null) {
151 setDescription(description);
152 }
153
154 Integer type = (Integer)attributes.get("type");
155
156 if (type != null) {
157 setType(type);
158 }
159
160 String subtype = (String)attributes.get("subtype");
161
162 if (subtype != null) {
163 setSubtype(subtype);
164 }
165 }
166
167 @Override
168 public java.lang.Object clone() {
169 return new RoleWrapper((Role)_role.clone());
170 }
171
172 @Override
173 public int compareTo(com.liferay.portal.model.Role role) {
174 return _role.compareTo(role);
175 }
176
177 @Override
178 public java.lang.String[] getAvailableLanguageIds() {
179 return _role.getAvailableLanguageIds();
180 }
181
182
187 @Override
188 public java.lang.String getClassName() {
189 return _role.getClassName();
190 }
191
192
197 @Override
198 public long getClassNameId() {
199 return _role.getClassNameId();
200 }
201
202
207 @Override
208 public long getClassPK() {
209 return _role.getClassPK();
210 }
211
212
217 @Override
218 public long getCompanyId() {
219 return _role.getCompanyId();
220 }
221
222
227 @Override
228 public java.util.Date getCreateDate() {
229 return _role.getCreateDate();
230 }
231
232 @Override
233 public java.lang.String getDefaultLanguageId() {
234 return _role.getDefaultLanguageId();
235 }
236
237
242 @Override
243 public java.lang.String getDescription() {
244 return _role.getDescription();
245 }
246
247
253 @Override
254 public java.lang.String getDescription(java.lang.String languageId) {
255 return _role.getDescription(languageId);
256 }
257
258
265 @Override
266 public java.lang.String getDescription(java.lang.String languageId,
267 boolean useDefault) {
268 return _role.getDescription(languageId, useDefault);
269 }
270
271
277 @Override
278 public java.lang.String getDescription(java.util.Locale locale) {
279 return _role.getDescription(locale);
280 }
281
282
289 @Override
290 public java.lang.String getDescription(java.util.Locale locale,
291 boolean useDefault) {
292 return _role.getDescription(locale, useDefault);
293 }
294
295 @Override
296 public java.lang.String getDescriptionCurrentLanguageId() {
297 return _role.getDescriptionCurrentLanguageId();
298 }
299
300 @Override
301 public java.lang.String getDescriptionCurrentValue() {
302 return _role.getDescriptionCurrentValue();
303 }
304
305
310 @Override
311 public java.util.Map<java.util.Locale, java.lang.String> getDescriptionMap() {
312 return _role.getDescriptionMap();
313 }
314
315 @Override
316 public java.lang.String getDescriptiveName()
317 throws com.liferay.portal.kernel.exception.PortalException {
318 return _role.getDescriptiveName();
319 }
320
321 @Override
322 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
323 return _role.getExpandoBridge();
324 }
325
326
331 @Override
332 public java.util.Date getModifiedDate() {
333 return _role.getModifiedDate();
334 }
335
336
341 @Override
342 public long getMvccVersion() {
343 return _role.getMvccVersion();
344 }
345
346
351 @Override
352 public java.lang.String getName() {
353 return _role.getName();
354 }
355
356
361 @Override
362 public long getPrimaryKey() {
363 return _role.getPrimaryKey();
364 }
365
366 @Override
367 public java.io.Serializable getPrimaryKeyObj() {
368 return _role.getPrimaryKeyObj();
369 }
370
371
376 @Override
377 public long getRoleId() {
378 return _role.getRoleId();
379 }
380
381
386 @Override
387 public java.lang.String getSubtype() {
388 return _role.getSubtype();
389 }
390
391
396 @Override
397 public java.lang.String getTitle() {
398 return _role.getTitle();
399 }
400
401
407 @Override
408 public java.lang.String getTitle(java.lang.String languageId) {
409 return _role.getTitle(languageId);
410 }
411
412
419 @Override
420 public java.lang.String getTitle(java.lang.String languageId,
421 boolean useDefault) {
422 return _role.getTitle(languageId, useDefault);
423 }
424
425
431 @Override
432 public java.lang.String getTitle(java.util.Locale locale) {
433 return _role.getTitle(locale);
434 }
435
436
443 @Override
444 public java.lang.String getTitle(java.util.Locale locale, boolean useDefault) {
445 return _role.getTitle(locale, useDefault);
446 }
447
448 @Override
449 public java.lang.String getTitleCurrentLanguageId() {
450 return _role.getTitleCurrentLanguageId();
451 }
452
453 @Override
454 public java.lang.String getTitleCurrentValue() {
455 return _role.getTitleCurrentValue();
456 }
457
458
463 @Override
464 public java.util.Map<java.util.Locale, java.lang.String> getTitleMap() {
465 return _role.getTitleMap();
466 }
467
468
473 @Override
474 public int getType() {
475 return _role.getType();
476 }
477
478 @Override
479 public java.lang.String getTypeLabel() {
480 return _role.getTypeLabel();
481 }
482
483
488 @Override
489 public long getUserId() {
490 return _role.getUserId();
491 }
492
493
498 @Override
499 public java.lang.String getUserName() {
500 return _role.getUserName();
501 }
502
503
508 @Override
509 public java.lang.String getUserUuid() {
510 return _role.getUserUuid();
511 }
512
513
518 @Override
519 public java.lang.String getUuid() {
520 return _role.getUuid();
521 }
522
523 @Override
524 public int hashCode() {
525 return _role.hashCode();
526 }
527
528 @Override
529 public boolean isCachedModel() {
530 return _role.isCachedModel();
531 }
532
533 @Override
534 public boolean isEscapedModel() {
535 return _role.isEscapedModel();
536 }
537
538 @Override
539 public boolean isNew() {
540 return _role.isNew();
541 }
542
543 @Override
544 public boolean isTeam() {
545 return _role.isTeam();
546 }
547
548 @Override
549 public void persist() {
550 _role.persist();
551 }
552
553 @Override
554 public void prepareLocalizedFieldsForImport()
555 throws com.liferay.portal.LocaleException {
556 _role.prepareLocalizedFieldsForImport();
557 }
558
559 @Override
560 public void prepareLocalizedFieldsForImport(
561 java.util.Locale defaultImportLocale)
562 throws com.liferay.portal.LocaleException {
563 _role.prepareLocalizedFieldsForImport(defaultImportLocale);
564 }
565
566 @Override
567 public void setCachedModel(boolean cachedModel) {
568 _role.setCachedModel(cachedModel);
569 }
570
571 @Override
572 public void setClassName(java.lang.String className) {
573 _role.setClassName(className);
574 }
575
576
581 @Override
582 public void setClassNameId(long classNameId) {
583 _role.setClassNameId(classNameId);
584 }
585
586
591 @Override
592 public void setClassPK(long classPK) {
593 _role.setClassPK(classPK);
594 }
595
596
601 @Override
602 public void setCompanyId(long companyId) {
603 _role.setCompanyId(companyId);
604 }
605
606
611 @Override
612 public void setCreateDate(java.util.Date createDate) {
613 _role.setCreateDate(createDate);
614 }
615
616
621 @Override
622 public void setDescription(java.lang.String description) {
623 _role.setDescription(description);
624 }
625
626
632 @Override
633 public void setDescription(java.lang.String description,
634 java.util.Locale locale) {
635 _role.setDescription(description, locale);
636 }
637
638
645 @Override
646 public void setDescription(java.lang.String description,
647 java.util.Locale locale, java.util.Locale defaultLocale) {
648 _role.setDescription(description, locale, defaultLocale);
649 }
650
651 @Override
652 public void setDescriptionCurrentLanguageId(java.lang.String languageId) {
653 _role.setDescriptionCurrentLanguageId(languageId);
654 }
655
656
661 @Override
662 public void setDescriptionMap(
663 java.util.Map<java.util.Locale, java.lang.String> descriptionMap) {
664 _role.setDescriptionMap(descriptionMap);
665 }
666
667
673 @Override
674 public void setDescriptionMap(
675 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
676 java.util.Locale defaultLocale) {
677 _role.setDescriptionMap(descriptionMap, defaultLocale);
678 }
679
680 @Override
681 public void setExpandoBridgeAttributes(
682 com.liferay.portal.model.BaseModel<?> baseModel) {
683 _role.setExpandoBridgeAttributes(baseModel);
684 }
685
686 @Override
687 public void setExpandoBridgeAttributes(
688 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
689 _role.setExpandoBridgeAttributes(expandoBridge);
690 }
691
692 @Override
693 public void setExpandoBridgeAttributes(
694 com.liferay.portal.service.ServiceContext serviceContext) {
695 _role.setExpandoBridgeAttributes(serviceContext);
696 }
697
698
703 @Override
704 public void setModifiedDate(java.util.Date modifiedDate) {
705 _role.setModifiedDate(modifiedDate);
706 }
707
708
713 @Override
714 public void setMvccVersion(long mvccVersion) {
715 _role.setMvccVersion(mvccVersion);
716 }
717
718
723 @Override
724 public void setName(java.lang.String name) {
725 _role.setName(name);
726 }
727
728 @Override
729 public void setNew(boolean n) {
730 _role.setNew(n);
731 }
732
733
738 @Override
739 public void setPrimaryKey(long primaryKey) {
740 _role.setPrimaryKey(primaryKey);
741 }
742
743 @Override
744 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
745 _role.setPrimaryKeyObj(primaryKeyObj);
746 }
747
748
753 @Override
754 public void setRoleId(long roleId) {
755 _role.setRoleId(roleId);
756 }
757
758
763 @Override
764 public void setSubtype(java.lang.String subtype) {
765 _role.setSubtype(subtype);
766 }
767
768
773 @Override
774 public void setTitle(java.lang.String title) {
775 _role.setTitle(title);
776 }
777
778
784 @Override
785 public void setTitle(java.lang.String title, java.util.Locale locale) {
786 _role.setTitle(title, locale);
787 }
788
789
796 @Override
797 public void setTitle(java.lang.String title, java.util.Locale locale,
798 java.util.Locale defaultLocale) {
799 _role.setTitle(title, locale, defaultLocale);
800 }
801
802 @Override
803 public void setTitleCurrentLanguageId(java.lang.String languageId) {
804 _role.setTitleCurrentLanguageId(languageId);
805 }
806
807
812 @Override
813 public void setTitleMap(
814 java.util.Map<java.util.Locale, java.lang.String> titleMap) {
815 _role.setTitleMap(titleMap);
816 }
817
818
824 @Override
825 public void setTitleMap(
826 java.util.Map<java.util.Locale, java.lang.String> titleMap,
827 java.util.Locale defaultLocale) {
828 _role.setTitleMap(titleMap, defaultLocale);
829 }
830
831
836 @Override
837 public void setType(int type) {
838 _role.setType(type);
839 }
840
841
846 @Override
847 public void setUserId(long userId) {
848 _role.setUserId(userId);
849 }
850
851
856 @Override
857 public void setUserName(java.lang.String userName) {
858 _role.setUserName(userName);
859 }
860
861
866 @Override
867 public void setUserUuid(java.lang.String userUuid) {
868 _role.setUserUuid(userUuid);
869 }
870
871
876 @Override
877 public void setUuid(java.lang.String uuid) {
878 _role.setUuid(uuid);
879 }
880
881 @Override
882 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.Role> toCacheModel() {
883 return _role.toCacheModel();
884 }
885
886 @Override
887 public com.liferay.portal.model.Role toEscapedModel() {
888 return new RoleWrapper(_role.toEscapedModel());
889 }
890
891 @Override
892 public java.lang.String toString() {
893 return _role.toString();
894 }
895
896 @Override
897 public com.liferay.portal.model.Role toUnescapedModel() {
898 return new RoleWrapper(_role.toUnescapedModel());
899 }
900
901 @Override
902 public java.lang.String toXmlString() {
903 return _role.toXmlString();
904 }
905
906 @Override
907 public boolean equals(Object obj) {
908 if (this == obj) {
909 return true;
910 }
911
912 if (!(obj instanceof RoleWrapper)) {
913 return false;
914 }
915
916 RoleWrapper roleWrapper = (RoleWrapper)obj;
917
918 if (Validator.equals(_role, roleWrapper._role)) {
919 return true;
920 }
921
922 return false;
923 }
924
925 @Override
926 public StagedModelType getStagedModelType() {
927 return _role.getStagedModelType();
928 }
929
930
933 @Deprecated
934 public Role getWrappedRole() {
935 return _role;
936 }
937
938 @Override
939 public Role getWrappedModel() {
940 return _role;
941 }
942
943 @Override
944 public boolean isEntityCacheEnabled() {
945 return _role.isEntityCacheEnabled();
946 }
947
948 @Override
949 public boolean isFinderCacheEnabled() {
950 return _role.isFinderCacheEnabled();
951 }
952
953 @Override
954 public void resetOriginalValues() {
955 _role.resetOriginalValues();
956 }
957
958 private final Role _role;
959 }