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 ResourceAction}.
023     * </p>
024     *
025     * @author    Brian Wing Shun Chan
026     * @see       ResourceAction
027     * @generated
028     */
029    public class ResourceActionWrapper implements ResourceAction,
030            ModelWrapper<ResourceAction> {
031            public ResourceActionWrapper(ResourceAction resourceAction) {
032                    _resourceAction = resourceAction;
033            }
034    
035            public Class<?> getModelClass() {
036                    return ResourceAction.class;
037            }
038    
039            public String getModelClassName() {
040                    return ResourceAction.class.getName();
041            }
042    
043            public Map<String, Object> getModelAttributes() {
044                    Map<String, Object> attributes = new HashMap<String, Object>();
045    
046                    attributes.put("resourceActionId", getResourceActionId());
047                    attributes.put("name", getName());
048                    attributes.put("actionId", getActionId());
049                    attributes.put("bitwiseValue", getBitwiseValue());
050    
051                    return attributes;
052            }
053    
054            public void setModelAttributes(Map<String, Object> attributes) {
055                    Long resourceActionId = (Long)attributes.get("resourceActionId");
056    
057                    if (resourceActionId != null) {
058                            setResourceActionId(resourceActionId);
059                    }
060    
061                    String name = (String)attributes.get("name");
062    
063                    if (name != null) {
064                            setName(name);
065                    }
066    
067                    String actionId = (String)attributes.get("actionId");
068    
069                    if (actionId != null) {
070                            setActionId(actionId);
071                    }
072    
073                    Long bitwiseValue = (Long)attributes.get("bitwiseValue");
074    
075                    if (bitwiseValue != null) {
076                            setBitwiseValue(bitwiseValue);
077                    }
078            }
079    
080            /**
081            * Returns the primary key of this resource action.
082            *
083            * @return the primary key of this resource action
084            */
085            public long getPrimaryKey() {
086                    return _resourceAction.getPrimaryKey();
087            }
088    
089            /**
090            * Sets the primary key of this resource action.
091            *
092            * @param primaryKey the primary key of this resource action
093            */
094            public void setPrimaryKey(long primaryKey) {
095                    _resourceAction.setPrimaryKey(primaryKey);
096            }
097    
098            /**
099            * Returns the resource action ID of this resource action.
100            *
101            * @return the resource action ID of this resource action
102            */
103            public long getResourceActionId() {
104                    return _resourceAction.getResourceActionId();
105            }
106    
107            /**
108            * Sets the resource action ID of this resource action.
109            *
110            * @param resourceActionId the resource action ID of this resource action
111            */
112            public void setResourceActionId(long resourceActionId) {
113                    _resourceAction.setResourceActionId(resourceActionId);
114            }
115    
116            /**
117            * Returns the name of this resource action.
118            *
119            * @return the name of this resource action
120            */
121            public java.lang.String getName() {
122                    return _resourceAction.getName();
123            }
124    
125            /**
126            * Sets the name of this resource action.
127            *
128            * @param name the name of this resource action
129            */
130            public void setName(java.lang.String name) {
131                    _resourceAction.setName(name);
132            }
133    
134            /**
135            * Returns the action ID of this resource action.
136            *
137            * @return the action ID of this resource action
138            */
139            public java.lang.String getActionId() {
140                    return _resourceAction.getActionId();
141            }
142    
143            /**
144            * Sets the action ID of this resource action.
145            *
146            * @param actionId the action ID of this resource action
147            */
148            public void setActionId(java.lang.String actionId) {
149                    _resourceAction.setActionId(actionId);
150            }
151    
152            /**
153            * Returns the bitwise value of this resource action.
154            *
155            * @return the bitwise value of this resource action
156            */
157            public long getBitwiseValue() {
158                    return _resourceAction.getBitwiseValue();
159            }
160    
161            /**
162            * Sets the bitwise value of this resource action.
163            *
164            * @param bitwiseValue the bitwise value of this resource action
165            */
166            public void setBitwiseValue(long bitwiseValue) {
167                    _resourceAction.setBitwiseValue(bitwiseValue);
168            }
169    
170            public boolean isNew() {
171                    return _resourceAction.isNew();
172            }
173    
174            public void setNew(boolean n) {
175                    _resourceAction.setNew(n);
176            }
177    
178            public boolean isCachedModel() {
179                    return _resourceAction.isCachedModel();
180            }
181    
182            public void setCachedModel(boolean cachedModel) {
183                    _resourceAction.setCachedModel(cachedModel);
184            }
185    
186            public boolean isEscapedModel() {
187                    return _resourceAction.isEscapedModel();
188            }
189    
190            public java.io.Serializable getPrimaryKeyObj() {
191                    return _resourceAction.getPrimaryKeyObj();
192            }
193    
194            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
195                    _resourceAction.setPrimaryKeyObj(primaryKeyObj);
196            }
197    
198            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
199                    return _resourceAction.getExpandoBridge();
200            }
201    
202            public void setExpandoBridgeAttributes(
203                    com.liferay.portal.service.ServiceContext serviceContext) {
204                    _resourceAction.setExpandoBridgeAttributes(serviceContext);
205            }
206    
207            @Override
208            public java.lang.Object clone() {
209                    return new ResourceActionWrapper((ResourceAction)_resourceAction.clone());
210            }
211    
212            public int compareTo(com.liferay.portal.model.ResourceAction resourceAction) {
213                    return _resourceAction.compareTo(resourceAction);
214            }
215    
216            @Override
217            public int hashCode() {
218                    return _resourceAction.hashCode();
219            }
220    
221            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.ResourceAction> toCacheModel() {
222                    return _resourceAction.toCacheModel();
223            }
224    
225            public com.liferay.portal.model.ResourceAction toEscapedModel() {
226                    return new ResourceActionWrapper(_resourceAction.toEscapedModel());
227            }
228    
229            @Override
230            public java.lang.String toString() {
231                    return _resourceAction.toString();
232            }
233    
234            public java.lang.String toXmlString() {
235                    return _resourceAction.toXmlString();
236            }
237    
238            public void persist()
239                    throws com.liferay.portal.kernel.exception.SystemException {
240                    _resourceAction.persist();
241            }
242    
243            /**
244             * @deprecated Renamed to {@link #getWrappedModel}
245             */
246            public ResourceAction getWrappedResourceAction() {
247                    return _resourceAction;
248            }
249    
250            public ResourceAction getWrappedModel() {
251                    return _resourceAction;
252            }
253    
254            public void resetOriginalValues() {
255                    _resourceAction.resetOriginalValues();
256            }
257    
258            private ResourceAction _resourceAction;
259    }