001
014
015 package com.liferay.portal.model;
016
017 import java.util.HashMap;
018 import java.util.Map;
019
020
029 public class RoleWrapper implements Role, ModelWrapper<Role> {
030 public RoleWrapper(Role role) {
031 _role = role;
032 }
033
034 public Class<?> getModelClass() {
035 return Role.class;
036 }
037
038 public String getModelClassName() {
039 return Role.class.getName();
040 }
041
042 public Map<String, Object> getModelAttributes() {
043 Map<String, Object> attributes = new HashMap<String, Object>();
044
045 attributes.put("roleId", getRoleId());
046 attributes.put("companyId", getCompanyId());
047 attributes.put("classNameId", getClassNameId());
048 attributes.put("classPK", getClassPK());
049 attributes.put("name", getName());
050 attributes.put("title", getTitle());
051 attributes.put("description", getDescription());
052 attributes.put("type", getType());
053 attributes.put("subtype", getSubtype());
054
055 return attributes;
056 }
057
058 public void setModelAttributes(Map<String, Object> attributes) {
059 Long roleId = (Long)attributes.get("roleId");
060
061 if (roleId != null) {
062 setRoleId(roleId);
063 }
064
065 Long companyId = (Long)attributes.get("companyId");
066
067 if (companyId != null) {
068 setCompanyId(companyId);
069 }
070
071 Long classNameId = (Long)attributes.get("classNameId");
072
073 if (classNameId != null) {
074 setClassNameId(classNameId);
075 }
076
077 Long classPK = (Long)attributes.get("classPK");
078
079 if (classPK != null) {
080 setClassPK(classPK);
081 }
082
083 String name = (String)attributes.get("name");
084
085 if (name != null) {
086 setName(name);
087 }
088
089 String title = (String)attributes.get("title");
090
091 if (title != null) {
092 setTitle(title);
093 }
094
095 String description = (String)attributes.get("description");
096
097 if (description != null) {
098 setDescription(description);
099 }
100
101 Integer type = (Integer)attributes.get("type");
102
103 if (type != null) {
104 setType(type);
105 }
106
107 String subtype = (String)attributes.get("subtype");
108
109 if (subtype != null) {
110 setSubtype(subtype);
111 }
112 }
113
114
119 public long getPrimaryKey() {
120 return _role.getPrimaryKey();
121 }
122
123
128 public void setPrimaryKey(long primaryKey) {
129 _role.setPrimaryKey(primaryKey);
130 }
131
132
137 public long getRoleId() {
138 return _role.getRoleId();
139 }
140
141
146 public void setRoleId(long roleId) {
147 _role.setRoleId(roleId);
148 }
149
150
155 public long getCompanyId() {
156 return _role.getCompanyId();
157 }
158
159
164 public void setCompanyId(long companyId) {
165 _role.setCompanyId(companyId);
166 }
167
168
173 public java.lang.String getClassName() {
174 return _role.getClassName();
175 }
176
177 public void setClassName(java.lang.String className) {
178 _role.setClassName(className);
179 }
180
181
186 public long getClassNameId() {
187 return _role.getClassNameId();
188 }
189
190
195 public void setClassNameId(long classNameId) {
196 _role.setClassNameId(classNameId);
197 }
198
199
204 public long getClassPK() {
205 return _role.getClassPK();
206 }
207
208
213 public void setClassPK(long classPK) {
214 _role.setClassPK(classPK);
215 }
216
217
222 public java.lang.String getName() {
223 return _role.getName();
224 }
225
226
231 public void setName(java.lang.String name) {
232 _role.setName(name);
233 }
234
235
240 public java.lang.String getTitle() {
241 return _role.getTitle();
242 }
243
244
250 public java.lang.String getTitle(java.util.Locale locale) {
251 return _role.getTitle(locale);
252 }
253
254
261 public java.lang.String getTitle(java.util.Locale locale, boolean useDefault) {
262 return _role.getTitle(locale, useDefault);
263 }
264
265
271 public java.lang.String getTitle(java.lang.String languageId) {
272 return _role.getTitle(languageId);
273 }
274
275
282 public java.lang.String getTitle(java.lang.String languageId,
283 boolean useDefault) {
284 return _role.getTitle(languageId, useDefault);
285 }
286
287 public java.lang.String getTitleCurrentLanguageId() {
288 return _role.getTitleCurrentLanguageId();
289 }
290
291 public java.lang.String getTitleCurrentValue() {
292 return _role.getTitleCurrentValue();
293 }
294
295
300 public java.util.Map<java.util.Locale, java.lang.String> getTitleMap() {
301 return _role.getTitleMap();
302 }
303
304
309 public void setTitle(java.lang.String title) {
310 _role.setTitle(title);
311 }
312
313
319 public void setTitle(java.lang.String title, java.util.Locale locale) {
320 _role.setTitle(title, locale);
321 }
322
323
330 public void setTitle(java.lang.String title, java.util.Locale locale,
331 java.util.Locale defaultLocale) {
332 _role.setTitle(title, locale, defaultLocale);
333 }
334
335 public void setTitleCurrentLanguageId(java.lang.String languageId) {
336 _role.setTitleCurrentLanguageId(languageId);
337 }
338
339
344 public void setTitleMap(
345 java.util.Map<java.util.Locale, java.lang.String> titleMap) {
346 _role.setTitleMap(titleMap);
347 }
348
349
355 public void setTitleMap(
356 java.util.Map<java.util.Locale, java.lang.String> titleMap,
357 java.util.Locale defaultLocale) {
358 _role.setTitleMap(titleMap, defaultLocale);
359 }
360
361
366 public java.lang.String getDescription() {
367 return _role.getDescription();
368 }
369
370
376 public java.lang.String getDescription(java.util.Locale locale) {
377 return _role.getDescription(locale);
378 }
379
380
387 public java.lang.String getDescription(java.util.Locale locale,
388 boolean useDefault) {
389 return _role.getDescription(locale, useDefault);
390 }
391
392
398 public java.lang.String getDescription(java.lang.String languageId) {
399 return _role.getDescription(languageId);
400 }
401
402
409 public java.lang.String getDescription(java.lang.String languageId,
410 boolean useDefault) {
411 return _role.getDescription(languageId, useDefault);
412 }
413
414 public java.lang.String getDescriptionCurrentLanguageId() {
415 return _role.getDescriptionCurrentLanguageId();
416 }
417
418 public java.lang.String getDescriptionCurrentValue() {
419 return _role.getDescriptionCurrentValue();
420 }
421
422
427 public java.util.Map<java.util.Locale, java.lang.String> getDescriptionMap() {
428 return _role.getDescriptionMap();
429 }
430
431
436 public void setDescription(java.lang.String description) {
437 _role.setDescription(description);
438 }
439
440
446 public void setDescription(java.lang.String description,
447 java.util.Locale locale) {
448 _role.setDescription(description, locale);
449 }
450
451
458 public void setDescription(java.lang.String description,
459 java.util.Locale locale, java.util.Locale defaultLocale) {
460 _role.setDescription(description, locale, defaultLocale);
461 }
462
463 public void setDescriptionCurrentLanguageId(java.lang.String languageId) {
464 _role.setDescriptionCurrentLanguageId(languageId);
465 }
466
467
472 public void setDescriptionMap(
473 java.util.Map<java.util.Locale, java.lang.String> descriptionMap) {
474 _role.setDescriptionMap(descriptionMap);
475 }
476
477
483 public void setDescriptionMap(
484 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
485 java.util.Locale defaultLocale) {
486 _role.setDescriptionMap(descriptionMap, defaultLocale);
487 }
488
489
494 public int getType() {
495 return _role.getType();
496 }
497
498
503 public void setType(int type) {
504 _role.setType(type);
505 }
506
507
512 public java.lang.String getSubtype() {
513 return _role.getSubtype();
514 }
515
516
521 public void setSubtype(java.lang.String subtype) {
522 _role.setSubtype(subtype);
523 }
524
525 public boolean isNew() {
526 return _role.isNew();
527 }
528
529 public void setNew(boolean n) {
530 _role.setNew(n);
531 }
532
533 public boolean isCachedModel() {
534 return _role.isCachedModel();
535 }
536
537 public void setCachedModel(boolean cachedModel) {
538 _role.setCachedModel(cachedModel);
539 }
540
541 public boolean isEscapedModel() {
542 return _role.isEscapedModel();
543 }
544
545 public java.io.Serializable getPrimaryKeyObj() {
546 return _role.getPrimaryKeyObj();
547 }
548
549 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
550 _role.setPrimaryKeyObj(primaryKeyObj);
551 }
552
553 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
554 return _role.getExpandoBridge();
555 }
556
557 public void setExpandoBridgeAttributes(
558 com.liferay.portal.service.ServiceContext serviceContext) {
559 _role.setExpandoBridgeAttributes(serviceContext);
560 }
561
562 public void prepareLocalizedFieldsForImport(
563 java.util.Locale defaultImportLocale)
564 throws com.liferay.portal.LocaleException {
565 _role.prepareLocalizedFieldsForImport(defaultImportLocale);
566 }
567
568 @Override
569 public java.lang.Object clone() {
570 return new RoleWrapper((Role)_role.clone());
571 }
572
573 public int compareTo(com.liferay.portal.model.Role role) {
574 return _role.compareTo(role);
575 }
576
577 @Override
578 public int hashCode() {
579 return _role.hashCode();
580 }
581
582 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.Role> toCacheModel() {
583 return _role.toCacheModel();
584 }
585
586 public com.liferay.portal.model.Role toEscapedModel() {
587 return new RoleWrapper(_role.toEscapedModel());
588 }
589
590 public com.liferay.portal.model.Role toUnescapedModel() {
591 return new RoleWrapper(_role.toUnescapedModel());
592 }
593
594 @Override
595 public java.lang.String toString() {
596 return _role.toString();
597 }
598
599 public java.lang.String toXmlString() {
600 return _role.toXmlString();
601 }
602
603 public void persist()
604 throws com.liferay.portal.kernel.exception.SystemException {
605 _role.persist();
606 }
607
608 public java.lang.String getDescriptiveName()
609 throws com.liferay.portal.kernel.exception.PortalException,
610 com.liferay.portal.kernel.exception.SystemException {
611 return _role.getDescriptiveName();
612 }
613
614 public java.lang.String getTypeLabel() {
615 return _role.getTypeLabel();
616 }
617
618 public boolean isTeam() {
619 return _role.isTeam();
620 }
621
622
625 public Role getWrappedRole() {
626 return _role;
627 }
628
629 public Role getWrappedModel() {
630 return _role;
631 }
632
633 public void resetOriginalValues() {
634 _role.resetOriginalValues();
635 }
636
637 private Role _role;
638 }