001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
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    /**
023     * <p>
024     * This class is a wrapper for {@link Group}.
025     * </p>
026     *
027     * @author    Brian Wing Shun Chan
028     * @see       Group
029     * @generated
030     */
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            /**
152            * Returns the primary key of this group.
153            *
154            * @return the primary key of this group
155            */
156            public long getPrimaryKey() {
157                    return _group.getPrimaryKey();
158            }
159    
160            /**
161            * Sets the primary key of this group.
162            *
163            * @param primaryKey the primary key of this group
164            */
165            public void setPrimaryKey(long primaryKey) {
166                    _group.setPrimaryKey(primaryKey);
167            }
168    
169            /**
170            * Returns the group ID of this group.
171            *
172            * @return the group ID of this group
173            */
174            public long getGroupId() {
175                    return _group.getGroupId();
176            }
177    
178            /**
179            * Sets the group ID of this group.
180            *
181            * @param groupId the group ID of this group
182            */
183            public void setGroupId(long groupId) {
184                    _group.setGroupId(groupId);
185            }
186    
187            /**
188            * Returns the company ID of this group.
189            *
190            * @return the company ID of this group
191            */
192            public long getCompanyId() {
193                    return _group.getCompanyId();
194            }
195    
196            /**
197            * Sets the company ID of this group.
198            *
199            * @param companyId the company ID of this group
200            */
201            public void setCompanyId(long companyId) {
202                    _group.setCompanyId(companyId);
203            }
204    
205            /**
206            * Returns the creator user ID of this group.
207            *
208            * @return the creator user ID of this group
209            */
210            public long getCreatorUserId() {
211                    return _group.getCreatorUserId();
212            }
213    
214            /**
215            * Sets the creator user ID of this group.
216            *
217            * @param creatorUserId the creator user ID of this group
218            */
219            public void setCreatorUserId(long creatorUserId) {
220                    _group.setCreatorUserId(creatorUserId);
221            }
222    
223            /**
224            * Returns the creator user uuid of this group.
225            *
226            * @return the creator user uuid of this group
227            * @throws SystemException if a system exception occurred
228            */
229            public java.lang.String getCreatorUserUuid()
230                    throws com.liferay.portal.kernel.exception.SystemException {
231                    return _group.getCreatorUserUuid();
232            }
233    
234            /**
235            * Sets the creator user uuid of this group.
236            *
237            * @param creatorUserUuid the creator user uuid of this group
238            */
239            public void setCreatorUserUuid(java.lang.String creatorUserUuid) {
240                    _group.setCreatorUserUuid(creatorUserUuid);
241            }
242    
243            /**
244            * Returns the fully qualified class name of this group.
245            *
246            * @return the fully qualified class name of this group
247            */
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            /**
257            * Returns the class name ID of this group.
258            *
259            * @return the class name ID of this group
260            */
261            public long getClassNameId() {
262                    return _group.getClassNameId();
263            }
264    
265            /**
266            * Sets the class name ID of this group.
267            *
268            * @param classNameId the class name ID of this group
269            */
270            public void setClassNameId(long classNameId) {
271                    _group.setClassNameId(classNameId);
272            }
273    
274            /**
275            * Returns the class p k of this group.
276            *
277            * @return the class p k of this group
278            */
279            public long getClassPK() {
280                    return _group.getClassPK();
281            }
282    
283            /**
284            * Sets the class p k of this group.
285            *
286            * @param classPK the class p k of this group
287            */
288            public void setClassPK(long classPK) {
289                    _group.setClassPK(classPK);
290            }
291    
292            /**
293            * Returns the parent group ID of this group.
294            *
295            * @return the parent group ID of this group
296            */
297            public long getParentGroupId() {
298                    return _group.getParentGroupId();
299            }
300    
301            /**
302            * Sets the parent group ID of this group.
303            *
304            * @param parentGroupId the parent group ID of this group
305            */
306            public void setParentGroupId(long parentGroupId) {
307                    _group.setParentGroupId(parentGroupId);
308            }
309    
310            /**
311            * Returns the live group ID of this group.
312            *
313            * @return the live group ID of this group
314            */
315            public long getLiveGroupId() {
316                    return _group.getLiveGroupId();
317            }
318    
319            /**
320            * Sets the live group ID of this group.
321            *
322            * @param liveGroupId the live group ID of this group
323            */
324            public void setLiveGroupId(long liveGroupId) {
325                    _group.setLiveGroupId(liveGroupId);
326            }
327    
328            /**
329            * Returns the name of this group.
330            *
331            * @return the name of this group
332            */
333            public java.lang.String getName() {
334                    return _group.getName();
335            }
336    
337            /**
338            * Sets the name of this group.
339            *
340            * @param name the name of this group
341            */
342            public void setName(java.lang.String name) {
343                    _group.setName(name);
344            }
345    
346            /**
347            * Returns the description of this group.
348            *
349            * @return the description of this group
350            */
351            public java.lang.String getDescription() {
352                    return _group.getDescription();
353            }
354    
355            /**
356            * Sets the description of this group.
357            *
358            * @param description the description of this group
359            */
360            public void setDescription(java.lang.String description) {
361                    _group.setDescription(description);
362            }
363    
364            /**
365            * Returns the type of this group.
366            *
367            * @return the type of this group
368            */
369            public int getType() {
370                    return _group.getType();
371            }
372    
373            /**
374            * Sets the type of this group.
375            *
376            * @param type the type of this group
377            */
378            public void setType(int type) {
379                    _group.setType(type);
380            }
381    
382            /**
383            * Returns the type settings of this group.
384            *
385            * @return the type settings of this group
386            */
387            public java.lang.String getTypeSettings() {
388                    return _group.getTypeSettings();
389            }
390    
391            /**
392            * Sets the type settings of this group.
393            *
394            * @param typeSettings the type settings of this group
395            */
396            public void setTypeSettings(java.lang.String typeSettings) {
397                    _group.setTypeSettings(typeSettings);
398            }
399    
400            /**
401            * Returns the friendly u r l of this group.
402            *
403            * @return the friendly u r l of this group
404            */
405            public java.lang.String getFriendlyURL() {
406                    return _group.getFriendlyURL();
407            }
408    
409            /**
410            * Sets the friendly u r l of this group.
411            *
412            * @param friendlyURL the friendly u r l of this group
413            */
414            public void setFriendlyURL(java.lang.String friendlyURL) {
415                    _group.setFriendlyURL(friendlyURL);
416            }
417    
418            /**
419            * Returns the site of this group.
420            *
421            * @return the site of this group
422            */
423            public boolean getSite() {
424                    return _group.getSite();
425            }
426    
427            /**
428            * Returns <code>true</code> if this group is site.
429            *
430            * @return <code>true</code> if this group is site; <code>false</code> otherwise
431            */
432            public boolean isSite() {
433                    return _group.isSite();
434            }
435    
436            /**
437            * Sets whether this group is site.
438            *
439            * @param site the site of this group
440            */
441            public void setSite(boolean site) {
442                    _group.setSite(site);
443            }
444    
445            /**
446            * Returns the active of this group.
447            *
448            * @return the active of this group
449            */
450            public boolean getActive() {
451                    return _group.getActive();
452            }
453    
454            /**
455            * Returns <code>true</code> if this group is active.
456            *
457            * @return <code>true</code> if this group is active; <code>false</code> otherwise
458            */
459            public boolean isActive() {
460                    return _group.isActive();
461            }
462    
463            /**
464            * Sets whether this group is active.
465            *
466            * @param active the active of this group
467            */
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            /**
633            * @deprecated As of 6.1.0, renamed to {@link #isRegularSite}
634            */
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            /**
736             * @deprecated Renamed to {@link #getWrappedModel}
737             */
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    }