001    /**
002     * Copyright (c) 2000-2012 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 java.util.HashMap;
018    import java.util.Map;
019    
020    /**
021     * <p>
022     * This class is a wrapper for {@link OrgGroupRole}.
023     * </p>
024     *
025     * @author    Brian Wing Shun Chan
026     * @see       OrgGroupRole
027     * @generated
028     */
029    public class OrgGroupRoleWrapper implements OrgGroupRole,
030            ModelWrapper<OrgGroupRole> {
031            public OrgGroupRoleWrapper(OrgGroupRole orgGroupRole) {
032                    _orgGroupRole = orgGroupRole;
033            }
034    
035            public Class<?> getModelClass() {
036                    return OrgGroupRole.class;
037            }
038    
039            public String getModelClassName() {
040                    return OrgGroupRole.class.getName();
041            }
042    
043            public Map<String, Object> getModelAttributes() {
044                    Map<String, Object> attributes = new HashMap<String, Object>();
045    
046                    attributes.put("organizationId", getOrganizationId());
047                    attributes.put("groupId", getGroupId());
048                    attributes.put("roleId", getRoleId());
049    
050                    return attributes;
051            }
052    
053            public void setModelAttributes(Map<String, Object> attributes) {
054                    Long organizationId = (Long)attributes.get("organizationId");
055    
056                    if (organizationId != null) {
057                            setOrganizationId(organizationId);
058                    }
059    
060                    Long groupId = (Long)attributes.get("groupId");
061    
062                    if (groupId != null) {
063                            setGroupId(groupId);
064                    }
065    
066                    Long roleId = (Long)attributes.get("roleId");
067    
068                    if (roleId != null) {
069                            setRoleId(roleId);
070                    }
071            }
072    
073            /**
074            * Returns the primary key of this org group role.
075            *
076            * @return the primary key of this org group role
077            */
078            public com.liferay.portal.service.persistence.OrgGroupRolePK getPrimaryKey() {
079                    return _orgGroupRole.getPrimaryKey();
080            }
081    
082            /**
083            * Sets the primary key of this org group role.
084            *
085            * @param primaryKey the primary key of this org group role
086            */
087            public void setPrimaryKey(
088                    com.liferay.portal.service.persistence.OrgGroupRolePK primaryKey) {
089                    _orgGroupRole.setPrimaryKey(primaryKey);
090            }
091    
092            /**
093            * Returns the organization ID of this org group role.
094            *
095            * @return the organization ID of this org group role
096            */
097            public long getOrganizationId() {
098                    return _orgGroupRole.getOrganizationId();
099            }
100    
101            /**
102            * Sets the organization ID of this org group role.
103            *
104            * @param organizationId the organization ID of this org group role
105            */
106            public void setOrganizationId(long organizationId) {
107                    _orgGroupRole.setOrganizationId(organizationId);
108            }
109    
110            /**
111            * Returns the group ID of this org group role.
112            *
113            * @return the group ID of this org group role
114            */
115            public long getGroupId() {
116                    return _orgGroupRole.getGroupId();
117            }
118    
119            /**
120            * Sets the group ID of this org group role.
121            *
122            * @param groupId the group ID of this org group role
123            */
124            public void setGroupId(long groupId) {
125                    _orgGroupRole.setGroupId(groupId);
126            }
127    
128            /**
129            * Returns the role ID of this org group role.
130            *
131            * @return the role ID of this org group role
132            */
133            public long getRoleId() {
134                    return _orgGroupRole.getRoleId();
135            }
136    
137            /**
138            * Sets the role ID of this org group role.
139            *
140            * @param roleId the role ID of this org group role
141            */
142            public void setRoleId(long roleId) {
143                    _orgGroupRole.setRoleId(roleId);
144            }
145    
146            public boolean isNew() {
147                    return _orgGroupRole.isNew();
148            }
149    
150            public void setNew(boolean n) {
151                    _orgGroupRole.setNew(n);
152            }
153    
154            public boolean isCachedModel() {
155                    return _orgGroupRole.isCachedModel();
156            }
157    
158            public void setCachedModel(boolean cachedModel) {
159                    _orgGroupRole.setCachedModel(cachedModel);
160            }
161    
162            public boolean isEscapedModel() {
163                    return _orgGroupRole.isEscapedModel();
164            }
165    
166            public java.io.Serializable getPrimaryKeyObj() {
167                    return _orgGroupRole.getPrimaryKeyObj();
168            }
169    
170            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
171                    _orgGroupRole.setPrimaryKeyObj(primaryKeyObj);
172            }
173    
174            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
175                    return _orgGroupRole.getExpandoBridge();
176            }
177    
178            public void setExpandoBridgeAttributes(
179                    com.liferay.portal.service.ServiceContext serviceContext) {
180                    _orgGroupRole.setExpandoBridgeAttributes(serviceContext);
181            }
182    
183            @Override
184            public java.lang.Object clone() {
185                    return new OrgGroupRoleWrapper((OrgGroupRole)_orgGroupRole.clone());
186            }
187    
188            public int compareTo(com.liferay.portal.model.OrgGroupRole orgGroupRole) {
189                    return _orgGroupRole.compareTo(orgGroupRole);
190            }
191    
192            @Override
193            public int hashCode() {
194                    return _orgGroupRole.hashCode();
195            }
196    
197            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.OrgGroupRole> toCacheModel() {
198                    return _orgGroupRole.toCacheModel();
199            }
200    
201            public com.liferay.portal.model.OrgGroupRole toEscapedModel() {
202                    return new OrgGroupRoleWrapper(_orgGroupRole.toEscapedModel());
203            }
204    
205            @Override
206            public java.lang.String toString() {
207                    return _orgGroupRole.toString();
208            }
209    
210            public java.lang.String toXmlString() {
211                    return _orgGroupRole.toXmlString();
212            }
213    
214            public boolean containsGroup(
215                    java.util.List<com.liferay.portal.model.Group> groups) {
216                    return _orgGroupRole.containsGroup(groups);
217            }
218    
219            public boolean containsOrganization(
220                    java.util.List<com.liferay.portal.model.Organization> organizations) {
221                    return _orgGroupRole.containsOrganization(organizations);
222            }
223    
224            /**
225             * @deprecated Renamed to {@link #getWrappedModel}
226             */
227            public OrgGroupRole getWrappedOrgGroupRole() {
228                    return _orgGroupRole;
229            }
230    
231            public OrgGroupRole getWrappedModel() {
232                    return _orgGroupRole;
233            }
234    
235            public void resetOriginalValues() {
236                    _orgGroupRole.resetOriginalValues();
237            }
238    
239            private OrgGroupRole _orgGroupRole;
240    }