001
014
015 package com.liferay.portal.model;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.util.Validator;
020 import com.liferay.portal.service.ServiceContext;
021
022 import com.liferay.portlet.expando.model.ExpandoBridge;
023 import com.liferay.portlet.exportimport.lar.StagedModelType;
024
025 import java.io.Serializable;
026
027 import java.util.Date;
028 import java.util.HashMap;
029 import java.util.Map;
030
031
040 @ProviderType
041 public class RoleWrapper implements Role, ModelWrapper<Role> {
042 public RoleWrapper(Role role) {
043 _role = role;
044 }
045
046 @Override
047 public Class<?> getModelClass() {
048 return Role.class;
049 }
050
051 @Override
052 public String getModelClassName() {
053 return Role.class.getName();
054 }
055
056 @Override
057 public Map<String, Object> getModelAttributes() {
058 Map<String, Object> attributes = new HashMap<String, Object>();
059
060 attributes.put("mvccVersion", getMvccVersion());
061 attributes.put("uuid", getUuid());
062 attributes.put("roleId", getRoleId());
063 attributes.put("companyId", getCompanyId());
064 attributes.put("userId", getUserId());
065 attributes.put("userName", getUserName());
066 attributes.put("createDate", getCreateDate());
067 attributes.put("modifiedDate", getModifiedDate());
068 attributes.put("classNameId", getClassNameId());
069 attributes.put("classPK", getClassPK());
070 attributes.put("name", getName());
071 attributes.put("title", getTitle());
072 attributes.put("description", getDescription());
073 attributes.put("type", getType());
074 attributes.put("subtype", getSubtype());
075
076 return attributes;
077 }
078
079 @Override
080 public void setModelAttributes(Map<String, Object> attributes) {
081 Long mvccVersion = (Long)attributes.get("mvccVersion");
082
083 if (mvccVersion != null) {
084 setMvccVersion(mvccVersion);
085 }
086
087 String uuid = (String)attributes.get("uuid");
088
089 if (uuid != null) {
090 setUuid(uuid);
091 }
092
093 Long roleId = (Long)attributes.get("roleId");
094
095 if (roleId != null) {
096 setRoleId(roleId);
097 }
098
099 Long companyId = (Long)attributes.get("companyId");
100
101 if (companyId != null) {
102 setCompanyId(companyId);
103 }
104
105 Long userId = (Long)attributes.get("userId");
106
107 if (userId != null) {
108 setUserId(userId);
109 }
110
111 String userName = (String)attributes.get("userName");
112
113 if (userName != null) {
114 setUserName(userName);
115 }
116
117 Date createDate = (Date)attributes.get("createDate");
118
119 if (createDate != null) {
120 setCreateDate(createDate);
121 }
122
123 Date modifiedDate = (Date)attributes.get("modifiedDate");
124
125 if (modifiedDate != null) {
126 setModifiedDate(modifiedDate);
127 }
128
129 Long classNameId = (Long)attributes.get("classNameId");
130
131 if (classNameId != null) {
132 setClassNameId(classNameId);
133 }
134
135 Long classPK = (Long)attributes.get("classPK");
136
137 if (classPK != null) {
138 setClassPK(classPK);
139 }
140
141 String name = (String)attributes.get("name");
142
143 if (name != null) {
144 setName(name);
145 }
146
147 String title = (String)attributes.get("title");
148
149 if (title != null) {
150 setTitle(title);
151 }
152
153 String description = (String)attributes.get("description");
154
155 if (description != null) {
156 setDescription(description);
157 }
158
159 Integer type = (Integer)attributes.get("type");
160
161 if (type != null) {
162 setType(type);
163 }
164
165 String subtype = (String)attributes.get("subtype");
166
167 if (subtype != null) {
168 setSubtype(subtype);
169 }
170 }
171
172 @Override
173 public java.lang.Object clone() {
174 return new RoleWrapper((Role)_role.clone());
175 }
176
177 @Override
178 public int compareTo(com.liferay.portal.model.Role role) {
179 return _role.compareTo(role);
180 }
181
182 @Override
183 public java.lang.String[] getAvailableLanguageIds() {
184 return _role.getAvailableLanguageIds();
185 }
186
187
192 @Override
193 public java.lang.String getClassName() {
194 return _role.getClassName();
195 }
196
197
202 @Override
203 public long getClassNameId() {
204 return _role.getClassNameId();
205 }
206
207
212 @Override
213 public long getClassPK() {
214 return _role.getClassPK();
215 }
216
217
222 @Override
223 public long getCompanyId() {
224 return _role.getCompanyId();
225 }
226
227
232 @Override
233 public Date getCreateDate() {
234 return _role.getCreateDate();
235 }
236
237 @Override
238 public java.lang.String getDefaultLanguageId() {
239 return _role.getDefaultLanguageId();
240 }
241
242
247 @Override
248 public java.lang.String getDescription() {
249 return _role.getDescription();
250 }
251
252
258 @Override
259 public java.lang.String getDescription(java.lang.String languageId) {
260 return _role.getDescription(languageId);
261 }
262
263
270 @Override
271 public java.lang.String getDescription(java.lang.String languageId,
272 boolean useDefault) {
273 return _role.getDescription(languageId, useDefault);
274 }
275
276
282 @Override
283 public java.lang.String getDescription(java.util.Locale locale) {
284 return _role.getDescription(locale);
285 }
286
287
294 @Override
295 public java.lang.String getDescription(java.util.Locale locale,
296 boolean useDefault) {
297 return _role.getDescription(locale, useDefault);
298 }
299
300 @Override
301 public java.lang.String getDescriptionCurrentLanguageId() {
302 return _role.getDescriptionCurrentLanguageId();
303 }
304
305 @Override
306 public java.lang.String getDescriptionCurrentValue() {
307 return _role.getDescriptionCurrentValue();
308 }
309
310
315 @Override
316 public Map<java.util.Locale, java.lang.String> getDescriptionMap() {
317 return _role.getDescriptionMap();
318 }
319
320 @Override
321 public java.lang.String getDescriptiveName()
322 throws com.liferay.portal.kernel.exception.PortalException {
323 return _role.getDescriptiveName();
324 }
325
326 @Override
327 public ExpandoBridge getExpandoBridge() {
328 return _role.getExpandoBridge();
329 }
330
331
336 @Override
337 public Date getModifiedDate() {
338 return _role.getModifiedDate();
339 }
340
341
346 @Override
347 public long getMvccVersion() {
348 return _role.getMvccVersion();
349 }
350
351
356 @Override
357 public java.lang.String getName() {
358 return _role.getName();
359 }
360
361
366 @Override
367 public long getPrimaryKey() {
368 return _role.getPrimaryKey();
369 }
370
371 @Override
372 public Serializable getPrimaryKeyObj() {
373 return _role.getPrimaryKeyObj();
374 }
375
376
381 @Override
382 public long getRoleId() {
383 return _role.getRoleId();
384 }
385
386
391 @Override
392 public java.lang.String getSubtype() {
393 return _role.getSubtype();
394 }
395
396
401 @Override
402 public java.lang.String getTitle() {
403 return _role.getTitle();
404 }
405
406
412 @Override
413 public java.lang.String getTitle(java.lang.String languageId) {
414 return _role.getTitle(languageId);
415 }
416
417
424 @Override
425 public java.lang.String getTitle(java.lang.String languageId,
426 boolean useDefault) {
427 return _role.getTitle(languageId, useDefault);
428 }
429
430
436 @Override
437 public java.lang.String getTitle(java.util.Locale locale) {
438 return _role.getTitle(locale);
439 }
440
441
448 @Override
449 public java.lang.String getTitle(java.util.Locale locale, boolean useDefault) {
450 return _role.getTitle(locale, useDefault);
451 }
452
453 @Override
454 public java.lang.String getTitleCurrentLanguageId() {
455 return _role.getTitleCurrentLanguageId();
456 }
457
458 @Override
459 public java.lang.String getTitleCurrentValue() {
460 return _role.getTitleCurrentValue();
461 }
462
463
468 @Override
469 public Map<java.util.Locale, java.lang.String> getTitleMap() {
470 return _role.getTitleMap();
471 }
472
473
478 @Override
479 public int getType() {
480 return _role.getType();
481 }
482
483 @Override
484 public java.lang.String getTypeLabel() {
485 return _role.getTypeLabel();
486 }
487
488
493 @Override
494 public long getUserId() {
495 return _role.getUserId();
496 }
497
498
503 @Override
504 public java.lang.String getUserName() {
505 return _role.getUserName();
506 }
507
508
513 @Override
514 public java.lang.String getUserUuid() {
515 return _role.getUserUuid();
516 }
517
518
523 @Override
524 public java.lang.String getUuid() {
525 return _role.getUuid();
526 }
527
528 @Override
529 public int hashCode() {
530 return _role.hashCode();
531 }
532
533 @Override
534 public boolean isCachedModel() {
535 return _role.isCachedModel();
536 }
537
538 @Override
539 public boolean isEscapedModel() {
540 return _role.isEscapedModel();
541 }
542
543 @Override
544 public boolean isNew() {
545 return _role.isNew();
546 }
547
548 @Override
549 public boolean isSystem() {
550 return _role.isSystem();
551 }
552
553 @Override
554 public boolean isTeam() {
555 return _role.isTeam();
556 }
557
558 @Override
559 public void persist() {
560 _role.persist();
561 }
562
563 @Override
564 public void prepareLocalizedFieldsForImport()
565 throws com.liferay.portal.LocaleException {
566 _role.prepareLocalizedFieldsForImport();
567 }
568
569 @Override
570 public void prepareLocalizedFieldsForImport(
571 java.util.Locale defaultImportLocale)
572 throws com.liferay.portal.LocaleException {
573 _role.prepareLocalizedFieldsForImport(defaultImportLocale);
574 }
575
576 @Override
577 public void setCachedModel(boolean cachedModel) {
578 _role.setCachedModel(cachedModel);
579 }
580
581 @Override
582 public void setClassName(java.lang.String className) {
583 _role.setClassName(className);
584 }
585
586
591 @Override
592 public void setClassNameId(long classNameId) {
593 _role.setClassNameId(classNameId);
594 }
595
596
601 @Override
602 public void setClassPK(long classPK) {
603 _role.setClassPK(classPK);
604 }
605
606
611 @Override
612 public void setCompanyId(long companyId) {
613 _role.setCompanyId(companyId);
614 }
615
616
621 @Override
622 public void setCreateDate(Date createDate) {
623 _role.setCreateDate(createDate);
624 }
625
626
631 @Override
632 public void setDescription(java.lang.String description) {
633 _role.setDescription(description);
634 }
635
636
642 @Override
643 public void setDescription(java.lang.String description,
644 java.util.Locale locale) {
645 _role.setDescription(description, locale);
646 }
647
648
655 @Override
656 public void setDescription(java.lang.String description,
657 java.util.Locale locale, java.util.Locale defaultLocale) {
658 _role.setDescription(description, locale, defaultLocale);
659 }
660
661 @Override
662 public void setDescriptionCurrentLanguageId(java.lang.String languageId) {
663 _role.setDescriptionCurrentLanguageId(languageId);
664 }
665
666
671 @Override
672 public void setDescriptionMap(
673 Map<java.util.Locale, java.lang.String> descriptionMap) {
674 _role.setDescriptionMap(descriptionMap);
675 }
676
677
683 @Override
684 public void setDescriptionMap(
685 Map<java.util.Locale, java.lang.String> descriptionMap,
686 java.util.Locale defaultLocale) {
687 _role.setDescriptionMap(descriptionMap, defaultLocale);
688 }
689
690 @Override
691 public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
692 _role.setExpandoBridgeAttributes(baseModel);
693 }
694
695 @Override
696 public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
697 _role.setExpandoBridgeAttributes(expandoBridge);
698 }
699
700 @Override
701 public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
702 _role.setExpandoBridgeAttributes(serviceContext);
703 }
704
705
710 @Override
711 public void setModifiedDate(Date modifiedDate) {
712 _role.setModifiedDate(modifiedDate);
713 }
714
715
720 @Override
721 public void setMvccVersion(long mvccVersion) {
722 _role.setMvccVersion(mvccVersion);
723 }
724
725
730 @Override
731 public void setName(java.lang.String name) {
732 _role.setName(name);
733 }
734
735 @Override
736 public void setNew(boolean n) {
737 _role.setNew(n);
738 }
739
740
745 @Override
746 public void setPrimaryKey(long primaryKey) {
747 _role.setPrimaryKey(primaryKey);
748 }
749
750 @Override
751 public void setPrimaryKeyObj(Serializable primaryKeyObj) {
752 _role.setPrimaryKeyObj(primaryKeyObj);
753 }
754
755
760 @Override
761 public void setRoleId(long roleId) {
762 _role.setRoleId(roleId);
763 }
764
765
770 @Override
771 public void setSubtype(java.lang.String subtype) {
772 _role.setSubtype(subtype);
773 }
774
775
780 @Override
781 public void setTitle(java.lang.String title) {
782 _role.setTitle(title);
783 }
784
785
791 @Override
792 public void setTitle(java.lang.String title, java.util.Locale locale) {
793 _role.setTitle(title, locale);
794 }
795
796
803 @Override
804 public void setTitle(java.lang.String title, java.util.Locale locale,
805 java.util.Locale defaultLocale) {
806 _role.setTitle(title, locale, defaultLocale);
807 }
808
809 @Override
810 public void setTitleCurrentLanguageId(java.lang.String languageId) {
811 _role.setTitleCurrentLanguageId(languageId);
812 }
813
814
819 @Override
820 public void setTitleMap(Map<java.util.Locale, java.lang.String> titleMap) {
821 _role.setTitleMap(titleMap);
822 }
823
824
830 @Override
831 public void setTitleMap(Map<java.util.Locale, java.lang.String> titleMap,
832 java.util.Locale defaultLocale) {
833 _role.setTitleMap(titleMap, defaultLocale);
834 }
835
836
841 @Override
842 public void setType(int type) {
843 _role.setType(type);
844 }
845
846
851 @Override
852 public void setUserId(long userId) {
853 _role.setUserId(userId);
854 }
855
856
861 @Override
862 public void setUserName(java.lang.String userName) {
863 _role.setUserName(userName);
864 }
865
866
871 @Override
872 public void setUserUuid(java.lang.String userUuid) {
873 _role.setUserUuid(userUuid);
874 }
875
876
881 @Override
882 public void setUuid(java.lang.String uuid) {
883 _role.setUuid(uuid);
884 }
885
886 @Override
887 public CacheModel<com.liferay.portal.model.Role> toCacheModel() {
888 return _role.toCacheModel();
889 }
890
891 @Override
892 public com.liferay.portal.model.Role toEscapedModel() {
893 return new RoleWrapper(_role.toEscapedModel());
894 }
895
896 @Override
897 public java.lang.String toString() {
898 return _role.toString();
899 }
900
901 @Override
902 public com.liferay.portal.model.Role toUnescapedModel() {
903 return new RoleWrapper(_role.toUnescapedModel());
904 }
905
906 @Override
907 public java.lang.String toXmlString() {
908 return _role.toXmlString();
909 }
910
911 @Override
912 public boolean equals(Object obj) {
913 if (this == obj) {
914 return true;
915 }
916
917 if (!(obj instanceof RoleWrapper)) {
918 return false;
919 }
920
921 RoleWrapper roleWrapper = (RoleWrapper)obj;
922
923 if (Validator.equals(_role, roleWrapper._role)) {
924 return true;
925 }
926
927 return false;
928 }
929
930 @Override
931 public StagedModelType getStagedModelType() {
932 return _role.getStagedModelType();
933 }
934
935 @Override
936 public Role getWrappedModel() {
937 return _role;
938 }
939
940 @Override
941 public boolean isEntityCacheEnabled() {
942 return _role.isEntityCacheEnabled();
943 }
944
945 @Override
946 public boolean isFinderCacheEnabled() {
947 return _role.isFinderCacheEnabled();
948 }
949
950 @Override
951 public void resetOriginalValues() {
952 _role.resetOriginalValues();
953 }
954
955 private final Role _role;
956 }