001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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 OrgGroupPermission}.
023     * </p>
024     *
025     * @author    Brian Wing Shun Chan
026     * @see       OrgGroupPermission
027     * @generated
028     */
029    public class OrgGroupPermissionWrapper implements OrgGroupPermission,
030            ModelWrapper<OrgGroupPermission> {
031            public OrgGroupPermissionWrapper(OrgGroupPermission orgGroupPermission) {
032                    _orgGroupPermission = orgGroupPermission;
033            }
034    
035            public Class<?> getModelClass() {
036                    return OrgGroupPermission.class;
037            }
038    
039            public String getModelClassName() {
040                    return OrgGroupPermission.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("permissionId", getPermissionId());
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 permissionId = (Long)attributes.get("permissionId");
067    
068                    if (permissionId != null) {
069                            setPermissionId(permissionId);
070                    }
071            }
072    
073            /**
074            * Returns the primary key of this org group permission.
075            *
076            * @return the primary key of this org group permission
077            */
078            public com.liferay.portal.service.persistence.OrgGroupPermissionPK getPrimaryKey() {
079                    return _orgGroupPermission.getPrimaryKey();
080            }
081    
082            /**
083            * Sets the primary key of this org group permission.
084            *
085            * @param primaryKey the primary key of this org group permission
086            */
087            public void setPrimaryKey(
088                    com.liferay.portal.service.persistence.OrgGroupPermissionPK primaryKey) {
089                    _orgGroupPermission.setPrimaryKey(primaryKey);
090            }
091    
092            /**
093            * Returns the organization ID of this org group permission.
094            *
095            * @return the organization ID of this org group permission
096            */
097            public long getOrganizationId() {
098                    return _orgGroupPermission.getOrganizationId();
099            }
100    
101            /**
102            * Sets the organization ID of this org group permission.
103            *
104            * @param organizationId the organization ID of this org group permission
105            */
106            public void setOrganizationId(long organizationId) {
107                    _orgGroupPermission.setOrganizationId(organizationId);
108            }
109    
110            /**
111            * Returns the group ID of this org group permission.
112            *
113            * @return the group ID of this org group permission
114            */
115            public long getGroupId() {
116                    return _orgGroupPermission.getGroupId();
117            }
118    
119            /**
120            * Sets the group ID of this org group permission.
121            *
122            * @param groupId the group ID of this org group permission
123            */
124            public void setGroupId(long groupId) {
125                    _orgGroupPermission.setGroupId(groupId);
126            }
127    
128            /**
129            * Returns the permission ID of this org group permission.
130            *
131            * @return the permission ID of this org group permission
132            */
133            public long getPermissionId() {
134                    return _orgGroupPermission.getPermissionId();
135            }
136    
137            /**
138            * Sets the permission ID of this org group permission.
139            *
140            * @param permissionId the permission ID of this org group permission
141            */
142            public void setPermissionId(long permissionId) {
143                    _orgGroupPermission.setPermissionId(permissionId);
144            }
145    
146            public boolean isNew() {
147                    return _orgGroupPermission.isNew();
148            }
149    
150            public void setNew(boolean n) {
151                    _orgGroupPermission.setNew(n);
152            }
153    
154            public boolean isCachedModel() {
155                    return _orgGroupPermission.isCachedModel();
156            }
157    
158            public void setCachedModel(boolean cachedModel) {
159                    _orgGroupPermission.setCachedModel(cachedModel);
160            }
161    
162            public boolean isEscapedModel() {
163                    return _orgGroupPermission.isEscapedModel();
164            }
165    
166            public java.io.Serializable getPrimaryKeyObj() {
167                    return _orgGroupPermission.getPrimaryKeyObj();
168            }
169    
170            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
171                    _orgGroupPermission.setPrimaryKeyObj(primaryKeyObj);
172            }
173    
174            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
175                    return _orgGroupPermission.getExpandoBridge();
176            }
177    
178            public void setExpandoBridgeAttributes(
179                    com.liferay.portal.service.ServiceContext serviceContext) {
180                    _orgGroupPermission.setExpandoBridgeAttributes(serviceContext);
181            }
182    
183            @Override
184            public java.lang.Object clone() {
185                    return new OrgGroupPermissionWrapper((OrgGroupPermission)_orgGroupPermission.clone());
186            }
187    
188            public int compareTo(
189                    com.liferay.portal.model.OrgGroupPermission orgGroupPermission) {
190                    return _orgGroupPermission.compareTo(orgGroupPermission);
191            }
192    
193            @Override
194            public int hashCode() {
195                    return _orgGroupPermission.hashCode();
196            }
197    
198            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.OrgGroupPermission> toCacheModel() {
199                    return _orgGroupPermission.toCacheModel();
200            }
201    
202            public com.liferay.portal.model.OrgGroupPermission toEscapedModel() {
203                    return new OrgGroupPermissionWrapper(_orgGroupPermission.toEscapedModel());
204            }
205    
206            @Override
207            public java.lang.String toString() {
208                    return _orgGroupPermission.toString();
209            }
210    
211            public java.lang.String toXmlString() {
212                    return _orgGroupPermission.toXmlString();
213            }
214    
215            public boolean containsGroup(
216                    java.util.List<com.liferay.portal.model.Group> groups) {
217                    return _orgGroupPermission.containsGroup(groups);
218            }
219    
220            public boolean containsOrganization(
221                    java.util.List<com.liferay.portal.model.Organization> organizations) {
222                    return _orgGroupPermission.containsOrganization(organizations);
223            }
224    
225            /**
226             * @deprecated Renamed to {@link #getWrappedModel}
227             */
228            public OrgGroupPermission getWrappedOrgGroupPermission() {
229                    return _orgGroupPermission;
230            }
231    
232            public OrgGroupPermission getWrappedModel() {
233                    return _orgGroupPermission;
234            }
235    
236            public void resetOriginalValues() {
237                    _orgGroupPermission.resetOriginalValues();
238            }
239    
240            private OrgGroupPermission _orgGroupPermission;
241    }