001
014
015 package com.liferay.portal.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018
019 import java.util.HashMap;
020 import java.util.Map;
021
022
031 public class GroupWrapper implements Group, ModelWrapper<Group> {
032 public GroupWrapper(Group group) {
033 _group = group;
034 }
035
036 public Class<?> getModelClass() {
037 return Group.class;
038 }
039
040 public String getModelClassName() {
041 return Group.class.getName();
042 }
043
044 public Map<String, Object> getModelAttributes() {
045 Map<String, Object> attributes = new HashMap<String, Object>();
046
047 attributes.put("groupId", getGroupId());
048 attributes.put("companyId", getCompanyId());
049 attributes.put("creatorUserId", getCreatorUserId());
050 attributes.put("classNameId", getClassNameId());
051 attributes.put("classPK", getClassPK());
052 attributes.put("parentGroupId", getParentGroupId());
053 attributes.put("liveGroupId", getLiveGroupId());
054 attributes.put("name", getName());
055 attributes.put("description", getDescription());
056 attributes.put("type", getType());
057 attributes.put("typeSettings", getTypeSettings());
058 attributes.put("friendlyURL", getFriendlyURL());
059 attributes.put("site", getSite());
060 attributes.put("active", getActive());
061
062 return attributes;
063 }
064
065 public void setModelAttributes(Map<String, Object> attributes) {
066 Long groupId = (Long)attributes.get("groupId");
067
068 if (groupId != null) {
069 setGroupId(groupId);
070 }
071
072 Long companyId = (Long)attributes.get("companyId");
073
074 if (companyId != null) {
075 setCompanyId(companyId);
076 }
077
078 Long creatorUserId = (Long)attributes.get("creatorUserId");
079
080 if (creatorUserId != null) {
081 setCreatorUserId(creatorUserId);
082 }
083
084 Long classNameId = (Long)attributes.get("classNameId");
085
086 if (classNameId != null) {
087 setClassNameId(classNameId);
088 }
089
090 Long classPK = (Long)attributes.get("classPK");
091
092 if (classPK != null) {
093 setClassPK(classPK);
094 }
095
096 Long parentGroupId = (Long)attributes.get("parentGroupId");
097
098 if (parentGroupId != null) {
099 setParentGroupId(parentGroupId);
100 }
101
102 Long liveGroupId = (Long)attributes.get("liveGroupId");
103
104 if (liveGroupId != null) {
105 setLiveGroupId(liveGroupId);
106 }
107
108 String name = (String)attributes.get("name");
109
110 if (name != null) {
111 setName(name);
112 }
113
114 String description = (String)attributes.get("description");
115
116 if (description != null) {
117 setDescription(description);
118 }
119
120 Integer type = (Integer)attributes.get("type");
121
122 if (type != null) {
123 setType(type);
124 }
125
126 String typeSettings = (String)attributes.get("typeSettings");
127
128 if (typeSettings != null) {
129 setTypeSettings(typeSettings);
130 }
131
132 String friendlyURL = (String)attributes.get("friendlyURL");
133
134 if (friendlyURL != null) {
135 setFriendlyURL(friendlyURL);
136 }
137
138 Boolean site = (Boolean)attributes.get("site");
139
140 if (site != null) {
141 setSite(site);
142 }
143
144 Boolean active = (Boolean)attributes.get("active");
145
146 if (active != null) {
147 setActive(active);
148 }
149 }
150
151
156 public long getPrimaryKey() {
157 return _group.getPrimaryKey();
158 }
159
160
165 public void setPrimaryKey(long primaryKey) {
166 _group.setPrimaryKey(primaryKey);
167 }
168
169
174 public long getGroupId() {
175 return _group.getGroupId();
176 }
177
178
183 public void setGroupId(long groupId) {
184 _group.setGroupId(groupId);
185 }
186
187
192 public long getCompanyId() {
193 return _group.getCompanyId();
194 }
195
196
201 public void setCompanyId(long companyId) {
202 _group.setCompanyId(companyId);
203 }
204
205
210 public long getCreatorUserId() {
211 return _group.getCreatorUserId();
212 }
213
214
219 public void setCreatorUserId(long creatorUserId) {
220 _group.setCreatorUserId(creatorUserId);
221 }
222
223
229 public java.lang.String getCreatorUserUuid()
230 throws com.liferay.portal.kernel.exception.SystemException {
231 return _group.getCreatorUserUuid();
232 }
233
234
239 public void setCreatorUserUuid(java.lang.String creatorUserUuid) {
240 _group.setCreatorUserUuid(creatorUserUuid);
241 }
242
243
248 public java.lang.String getClassName() {
249 return _group.getClassName();
250 }
251
252 public void setClassName(java.lang.String className) {
253 _group.setClassName(className);
254 }
255
256
261 public long getClassNameId() {
262 return _group.getClassNameId();
263 }
264
265
270 public void setClassNameId(long classNameId) {
271 _group.setClassNameId(classNameId);
272 }
273
274
279 public long getClassPK() {
280 return _group.getClassPK();
281 }
282
283
288 public void setClassPK(long classPK) {
289 _group.setClassPK(classPK);
290 }
291
292
297 public long getParentGroupId() {
298 return _group.getParentGroupId();
299 }
300
301
306 public void setParentGroupId(long parentGroupId) {
307 _group.setParentGroupId(parentGroupId);
308 }
309
310
315 public long getLiveGroupId() {
316 return _group.getLiveGroupId();
317 }
318
319
324 public void setLiveGroupId(long liveGroupId) {
325 _group.setLiveGroupId(liveGroupId);
326 }
327
328
333 public java.lang.String getName() {
334 return _group.getName();
335 }
336
337
342 public void setName(java.lang.String name) {
343 _group.setName(name);
344 }
345
346
351 public java.lang.String getDescription() {
352 return _group.getDescription();
353 }
354
355
360 public void setDescription(java.lang.String description) {
361 _group.setDescription(description);
362 }
363
364
369 public int getType() {
370 return _group.getType();
371 }
372
373
378 public void setType(int type) {
379 _group.setType(type);
380 }
381
382
387 public java.lang.String getTypeSettings() {
388 return _group.getTypeSettings();
389 }
390
391
396 public void setTypeSettings(java.lang.String typeSettings) {
397 _group.setTypeSettings(typeSettings);
398 }
399
400
405 public java.lang.String getFriendlyURL() {
406 return _group.getFriendlyURL();
407 }
408
409
414 public void setFriendlyURL(java.lang.String friendlyURL) {
415 _group.setFriendlyURL(friendlyURL);
416 }
417
418
423 public boolean getSite() {
424 return _group.getSite();
425 }
426
427
432 public boolean isSite() {
433 return _group.isSite();
434 }
435
436
441 public void setSite(boolean site) {
442 _group.setSite(site);
443 }
444
445
450 public boolean getActive() {
451 return _group.getActive();
452 }
453
454
459 public boolean isActive() {
460 return _group.isActive();
461 }
462
463
468 public void setActive(boolean active) {
469 _group.setActive(active);
470 }
471
472 public boolean isNew() {
473 return _group.isNew();
474 }
475
476 public void setNew(boolean n) {
477 _group.setNew(n);
478 }
479
480 public boolean isCachedModel() {
481 return _group.isCachedModel();
482 }
483
484 public void setCachedModel(boolean cachedModel) {
485 _group.setCachedModel(cachedModel);
486 }
487
488 public boolean isEscapedModel() {
489 return _group.isEscapedModel();
490 }
491
492 public java.io.Serializable getPrimaryKeyObj() {
493 return _group.getPrimaryKeyObj();
494 }
495
496 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
497 _group.setPrimaryKeyObj(primaryKeyObj);
498 }
499
500 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
501 return _group.getExpandoBridge();
502 }
503
504 public void setExpandoBridgeAttributes(
505 com.liferay.portal.service.ServiceContext serviceContext) {
506 _group.setExpandoBridgeAttributes(serviceContext);
507 }
508
509 @Override
510 public java.lang.Object clone() {
511 return new GroupWrapper((Group)_group.clone());
512 }
513
514 public int compareTo(com.liferay.portal.model.Group group) {
515 return _group.compareTo(group);
516 }
517
518 @Override
519 public int hashCode() {
520 return _group.hashCode();
521 }
522
523 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.Group> toCacheModel() {
524 return _group.toCacheModel();
525 }
526
527 public com.liferay.portal.model.Group toEscapedModel() {
528 return new GroupWrapper(_group.toEscapedModel());
529 }
530
531 public com.liferay.portal.model.Group toUnescapedModel() {
532 return new GroupWrapper(_group.toUnescapedModel());
533 }
534
535 @Override
536 public java.lang.String toString() {
537 return _group.toString();
538 }
539
540 public java.lang.String toXmlString() {
541 return _group.toXmlString();
542 }
543
544 public void persist()
545 throws com.liferay.portal.kernel.exception.SystemException {
546 _group.persist();
547 }
548
549 public long getDefaultPrivatePlid() {
550 return _group.getDefaultPrivatePlid();
551 }
552
553 public long getDefaultPublicPlid() {
554 return _group.getDefaultPublicPlid();
555 }
556
557 public java.lang.String getDescriptiveName()
558 throws com.liferay.portal.kernel.exception.PortalException,
559 com.liferay.portal.kernel.exception.SystemException {
560 return _group.getDescriptiveName();
561 }
562
563 public java.lang.String getDescriptiveName(java.util.Locale locale)
564 throws com.liferay.portal.kernel.exception.PortalException,
565 com.liferay.portal.kernel.exception.SystemException {
566 return _group.getDescriptiveName(locale);
567 }
568
569 public com.liferay.portal.model.Group getLiveGroup() {
570 return _group.getLiveGroup();
571 }
572
573 public long getOrganizationId() {
574 return _group.getOrganizationId();
575 }
576
577 public com.liferay.portal.model.Group getParentGroup()
578 throws com.liferay.portal.kernel.exception.PortalException,
579 com.liferay.portal.kernel.exception.SystemException {
580 return _group.getParentGroup();
581 }
582
583 public java.lang.String getPathFriendlyURL(boolean privateLayout,
584 com.liferay.portal.theme.ThemeDisplay themeDisplay) {
585 return _group.getPathFriendlyURL(privateLayout, themeDisplay);
586 }
587
588 public com.liferay.portal.model.LayoutSet getPrivateLayoutSet() {
589 return _group.getPrivateLayoutSet();
590 }
591
592 public int getPrivateLayoutsPageCount() {
593 return _group.getPrivateLayoutsPageCount();
594 }
595
596 public com.liferay.portal.model.LayoutSet getPublicLayoutSet() {
597 return _group.getPublicLayoutSet();
598 }
599
600 public int getPublicLayoutsPageCount() {
601 return _group.getPublicLayoutsPageCount();
602 }
603
604 public com.liferay.portal.model.Group getStagingGroup() {
605 return _group.getStagingGroup();
606 }
607
608 public java.lang.String getTypeLabel() {
609 return _group.getTypeLabel();
610 }
611
612 public com.liferay.portal.kernel.util.UnicodeProperties getTypeSettingsProperties() {
613 return _group.getTypeSettingsProperties();
614 }
615
616 public java.lang.String getTypeSettingsProperty(java.lang.String key) {
617 return _group.getTypeSettingsProperty(key);
618 }
619
620 public boolean hasPrivateLayouts() {
621 return _group.hasPrivateLayouts();
622 }
623
624 public boolean hasPublicLayouts() {
625 return _group.hasPublicLayouts();
626 }
627
628 public boolean hasStagingGroup() {
629 return _group.hasStagingGroup();
630 }
631
632
635 public boolean isCommunity() {
636 return _group.isCommunity();
637 }
638
639 public boolean isCompany() {
640 return _group.isCompany();
641 }
642
643 public boolean isControlPanel() {
644 return _group.isControlPanel();
645 }
646
647 public boolean isGuest() {
648 return _group.isGuest();
649 }
650
651 public boolean isInStagingPortlet(java.lang.String portletId) {
652 return _group.isInStagingPortlet(portletId);
653 }
654
655 public boolean isLayout() {
656 return _group.isLayout();
657 }
658
659 public boolean isLayoutPrototype() {
660 return _group.isLayoutPrototype();
661 }
662
663 public boolean isLayoutSetPrototype() {
664 return _group.isLayoutSetPrototype();
665 }
666
667 public boolean isOrganization() {
668 return _group.isOrganization();
669 }
670
671 public boolean isRegularSite() {
672 return _group.isRegularSite();
673 }
674
675 public boolean isShowSite(
676 com.liferay.portal.security.permission.PermissionChecker permissionChecker,
677 boolean privateSite)
678 throws com.liferay.portal.kernel.exception.PortalException,
679 com.liferay.portal.kernel.exception.SystemException {
680 return _group.isShowSite(permissionChecker, privateSite);
681 }
682
683 public boolean isStaged() {
684 return _group.isStaged();
685 }
686
687 public boolean isStagedPortlet(java.lang.String portletId) {
688 return _group.isStagedPortlet(portletId);
689 }
690
691 public boolean isStagedRemotely() {
692 return _group.isStagedRemotely();
693 }
694
695 public boolean isStagingGroup() {
696 return _group.isStagingGroup();
697 }
698
699 public boolean isUser() {
700 return _group.isUser();
701 }
702
703 public boolean isUserGroup() {
704 return _group.isUserGroup();
705 }
706
707 public boolean isUserPersonalSite() {
708 return _group.isUserPersonalSite();
709 }
710
711 public void setTypeSettingsProperties(
712 com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties) {
713 _group.setTypeSettingsProperties(typeSettingsProperties);
714 }
715
716 @Override
717 public boolean equals(Object obj) {
718 if (this == obj) {
719 return true;
720 }
721
722 if (!(obj instanceof GroupWrapper)) {
723 return false;
724 }
725
726 GroupWrapper groupWrapper = (GroupWrapper)obj;
727
728 if (Validator.equals(_group, groupWrapper._group)) {
729 return true;
730 }
731
732 return false;
733 }
734
735
738 public Group getWrappedGroup() {
739 return _group;
740 }
741
742 public Group getWrappedModel() {
743 return _group;
744 }
745
746 public void resetOriginalValues() {
747 _group.resetOriginalValues();
748 }
749
750 private Group _group;
751 }