001    /**
002     * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.util.Validator;
020    
021    import java.util.HashMap;
022    import java.util.Map;
023    
024    /**
025     * <p>
026     * This class is a wrapper for {@link OrgGroupRole}.
027     * </p>
028     *
029     * @author Brian Wing Shun Chan
030     * @see OrgGroupRole
031     * @generated
032     */
033    @ProviderType
034    public class OrgGroupRoleWrapper implements OrgGroupRole,
035            ModelWrapper<OrgGroupRole> {
036            public OrgGroupRoleWrapper(OrgGroupRole orgGroupRole) {
037                    _orgGroupRole = orgGroupRole;
038            }
039    
040            @Override
041            public Class<?> getModelClass() {
042                    return OrgGroupRole.class;
043            }
044    
045            @Override
046            public String getModelClassName() {
047                    return OrgGroupRole.class.getName();
048            }
049    
050            @Override
051            public Map<String, Object> getModelAttributes() {
052                    Map<String, Object> attributes = new HashMap<String, Object>();
053    
054                    attributes.put("mvccVersion", getMvccVersion());
055                    attributes.put("organizationId", getOrganizationId());
056                    attributes.put("groupId", getGroupId());
057                    attributes.put("roleId", getRoleId());
058    
059                    return attributes;
060            }
061    
062            @Override
063            public void setModelAttributes(Map<String, Object> attributes) {
064                    Long mvccVersion = (Long)attributes.get("mvccVersion");
065    
066                    if (mvccVersion != null) {
067                            setMvccVersion(mvccVersion);
068                    }
069    
070                    Long organizationId = (Long)attributes.get("organizationId");
071    
072                    if (organizationId != null) {
073                            setOrganizationId(organizationId);
074                    }
075    
076                    Long groupId = (Long)attributes.get("groupId");
077    
078                    if (groupId != null) {
079                            setGroupId(groupId);
080                    }
081    
082                    Long roleId = (Long)attributes.get("roleId");
083    
084                    if (roleId != null) {
085                            setRoleId(roleId);
086                    }
087            }
088    
089            @Override
090            public java.lang.Object clone() {
091                    return new OrgGroupRoleWrapper((OrgGroupRole)_orgGroupRole.clone());
092            }
093    
094            @Override
095            public int compareTo(com.liferay.portal.model.OrgGroupRole orgGroupRole) {
096                    return _orgGroupRole.compareTo(orgGroupRole);
097            }
098    
099            @Override
100            public boolean containsGroup(
101                    java.util.List<com.liferay.portal.model.Group> groups) {
102                    return _orgGroupRole.containsGroup(groups);
103            }
104    
105            @Override
106            public boolean containsOrganization(
107                    java.util.List<com.liferay.portal.model.Organization> organizations) {
108                    return _orgGroupRole.containsOrganization(organizations);
109            }
110    
111            @Override
112            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
113                    return _orgGroupRole.getExpandoBridge();
114            }
115    
116            /**
117            * Returns the group ID of this org group role.
118            *
119            * @return the group ID of this org group role
120            */
121            @Override
122            public long getGroupId() {
123                    return _orgGroupRole.getGroupId();
124            }
125    
126            /**
127            * Returns the mvcc version of this org group role.
128            *
129            * @return the mvcc version of this org group role
130            */
131            @Override
132            public long getMvccVersion() {
133                    return _orgGroupRole.getMvccVersion();
134            }
135    
136            /**
137            * Returns the organization ID of this org group role.
138            *
139            * @return the organization ID of this org group role
140            */
141            @Override
142            public long getOrganizationId() {
143                    return _orgGroupRole.getOrganizationId();
144            }
145    
146            /**
147            * Returns the primary key of this org group role.
148            *
149            * @return the primary key of this org group role
150            */
151            @Override
152            public com.liferay.portal.service.persistence.OrgGroupRolePK getPrimaryKey() {
153                    return _orgGroupRole.getPrimaryKey();
154            }
155    
156            @Override
157            public java.io.Serializable getPrimaryKeyObj() {
158                    return _orgGroupRole.getPrimaryKeyObj();
159            }
160    
161            /**
162            * Returns the role ID of this org group role.
163            *
164            * @return the role ID of this org group role
165            */
166            @Override
167            public long getRoleId() {
168                    return _orgGroupRole.getRoleId();
169            }
170    
171            @Override
172            public int hashCode() {
173                    return _orgGroupRole.hashCode();
174            }
175    
176            @Override
177            public boolean isCachedModel() {
178                    return _orgGroupRole.isCachedModel();
179            }
180    
181            @Override
182            public boolean isEscapedModel() {
183                    return _orgGroupRole.isEscapedModel();
184            }
185    
186            @Override
187            public boolean isNew() {
188                    return _orgGroupRole.isNew();
189            }
190    
191            @Override
192            public void setCachedModel(boolean cachedModel) {
193                    _orgGroupRole.setCachedModel(cachedModel);
194            }
195    
196            @Override
197            public void setExpandoBridgeAttributes(
198                    com.liferay.portal.model.BaseModel<?> baseModel) {
199                    _orgGroupRole.setExpandoBridgeAttributes(baseModel);
200            }
201    
202            @Override
203            public void setExpandoBridgeAttributes(
204                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
205                    _orgGroupRole.setExpandoBridgeAttributes(expandoBridge);
206            }
207    
208            @Override
209            public void setExpandoBridgeAttributes(
210                    com.liferay.portal.service.ServiceContext serviceContext) {
211                    _orgGroupRole.setExpandoBridgeAttributes(serviceContext);
212            }
213    
214            /**
215            * Sets the group ID of this org group role.
216            *
217            * @param groupId the group ID of this org group role
218            */
219            @Override
220            public void setGroupId(long groupId) {
221                    _orgGroupRole.setGroupId(groupId);
222            }
223    
224            /**
225            * Sets the mvcc version of this org group role.
226            *
227            * @param mvccVersion the mvcc version of this org group role
228            */
229            @Override
230            public void setMvccVersion(long mvccVersion) {
231                    _orgGroupRole.setMvccVersion(mvccVersion);
232            }
233    
234            @Override
235            public void setNew(boolean n) {
236                    _orgGroupRole.setNew(n);
237            }
238    
239            /**
240            * Sets the organization ID of this org group role.
241            *
242            * @param organizationId the organization ID of this org group role
243            */
244            @Override
245            public void setOrganizationId(long organizationId) {
246                    _orgGroupRole.setOrganizationId(organizationId);
247            }
248    
249            /**
250            * Sets the primary key of this org group role.
251            *
252            * @param primaryKey the primary key of this org group role
253            */
254            @Override
255            public void setPrimaryKey(
256                    com.liferay.portal.service.persistence.OrgGroupRolePK primaryKey) {
257                    _orgGroupRole.setPrimaryKey(primaryKey);
258            }
259    
260            @Override
261            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
262                    _orgGroupRole.setPrimaryKeyObj(primaryKeyObj);
263            }
264    
265            /**
266            * Sets the role ID of this org group role.
267            *
268            * @param roleId the role ID of this org group role
269            */
270            @Override
271            public void setRoleId(long roleId) {
272                    _orgGroupRole.setRoleId(roleId);
273            }
274    
275            @Override
276            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.OrgGroupRole> toCacheModel() {
277                    return _orgGroupRole.toCacheModel();
278            }
279    
280            @Override
281            public com.liferay.portal.model.OrgGroupRole toEscapedModel() {
282                    return new OrgGroupRoleWrapper(_orgGroupRole.toEscapedModel());
283            }
284    
285            @Override
286            public java.lang.String toString() {
287                    return _orgGroupRole.toString();
288            }
289    
290            @Override
291            public com.liferay.portal.model.OrgGroupRole toUnescapedModel() {
292                    return new OrgGroupRoleWrapper(_orgGroupRole.toUnescapedModel());
293            }
294    
295            @Override
296            public java.lang.String toXmlString() {
297                    return _orgGroupRole.toXmlString();
298            }
299    
300            @Override
301            public boolean equals(Object obj) {
302                    if (this == obj) {
303                            return true;
304                    }
305    
306                    if (!(obj instanceof OrgGroupRoleWrapper)) {
307                            return false;
308                    }
309    
310                    OrgGroupRoleWrapper orgGroupRoleWrapper = (OrgGroupRoleWrapper)obj;
311    
312                    if (Validator.equals(_orgGroupRole, orgGroupRoleWrapper._orgGroupRole)) {
313                            return true;
314                    }
315    
316                    return false;
317            }
318    
319            /**
320             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
321             */
322            @Deprecated
323            public OrgGroupRole getWrappedOrgGroupRole() {
324                    return _orgGroupRole;
325            }
326    
327            @Override
328            public OrgGroupRole getWrappedModel() {
329                    return _orgGroupRole;
330            }
331    
332            @Override
333            public boolean isEntityCacheEnabled() {
334                    return _orgGroupRole.isEntityCacheEnabled();
335            }
336    
337            @Override
338            public boolean isFinderCacheEnabled() {
339                    return _orgGroupRole.isFinderCacheEnabled();
340            }
341    
342            @Override
343            public void resetOriginalValues() {
344                    _orgGroupRole.resetOriginalValues();
345            }
346    
347            private final OrgGroupRole _orgGroupRole;
348    }