001
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
031 public class ResourceActionWrapper implements ResourceAction,
032 ModelWrapper<ResourceAction> {
033 public ResourceActionWrapper(ResourceAction resourceAction) {
034 _resourceAction = resourceAction;
035 }
036
037 public Class<?> getModelClass() {
038 return ResourceAction.class;
039 }
040
041 public String getModelClassName() {
042 return ResourceAction.class.getName();
043 }
044
045 public Map<String, Object> getModelAttributes() {
046 Map<String, Object> attributes = new HashMap<String, Object>();
047
048 attributes.put("resourceActionId", getResourceActionId());
049 attributes.put("name", getName());
050 attributes.put("actionId", getActionId());
051 attributes.put("bitwiseValue", getBitwiseValue());
052
053 return attributes;
054 }
055
056 public void setModelAttributes(Map<String, Object> attributes) {
057 Long resourceActionId = (Long)attributes.get("resourceActionId");
058
059 if (resourceActionId != null) {
060 setResourceActionId(resourceActionId);
061 }
062
063 String name = (String)attributes.get("name");
064
065 if (name != null) {
066 setName(name);
067 }
068
069 String actionId = (String)attributes.get("actionId");
070
071 if (actionId != null) {
072 setActionId(actionId);
073 }
074
075 Long bitwiseValue = (Long)attributes.get("bitwiseValue");
076
077 if (bitwiseValue != null) {
078 setBitwiseValue(bitwiseValue);
079 }
080 }
081
082
087 public long getPrimaryKey() {
088 return _resourceAction.getPrimaryKey();
089 }
090
091
096 public void setPrimaryKey(long primaryKey) {
097 _resourceAction.setPrimaryKey(primaryKey);
098 }
099
100
105 public long getResourceActionId() {
106 return _resourceAction.getResourceActionId();
107 }
108
109
114 public void setResourceActionId(long resourceActionId) {
115 _resourceAction.setResourceActionId(resourceActionId);
116 }
117
118
123 public java.lang.String getName() {
124 return _resourceAction.getName();
125 }
126
127
132 public void setName(java.lang.String name) {
133 _resourceAction.setName(name);
134 }
135
136
141 public java.lang.String getActionId() {
142 return _resourceAction.getActionId();
143 }
144
145
150 public void setActionId(java.lang.String actionId) {
151 _resourceAction.setActionId(actionId);
152 }
153
154
159 public long getBitwiseValue() {
160 return _resourceAction.getBitwiseValue();
161 }
162
163
168 public void setBitwiseValue(long bitwiseValue) {
169 _resourceAction.setBitwiseValue(bitwiseValue);
170 }
171
172 public boolean isNew() {
173 return _resourceAction.isNew();
174 }
175
176 public void setNew(boolean n) {
177 _resourceAction.setNew(n);
178 }
179
180 public boolean isCachedModel() {
181 return _resourceAction.isCachedModel();
182 }
183
184 public void setCachedModel(boolean cachedModel) {
185 _resourceAction.setCachedModel(cachedModel);
186 }
187
188 public boolean isEscapedModel() {
189 return _resourceAction.isEscapedModel();
190 }
191
192 public java.io.Serializable getPrimaryKeyObj() {
193 return _resourceAction.getPrimaryKeyObj();
194 }
195
196 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
197 _resourceAction.setPrimaryKeyObj(primaryKeyObj);
198 }
199
200 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
201 return _resourceAction.getExpandoBridge();
202 }
203
204 public void setExpandoBridgeAttributes(
205 com.liferay.portal.service.ServiceContext serviceContext) {
206 _resourceAction.setExpandoBridgeAttributes(serviceContext);
207 }
208
209 @Override
210 public java.lang.Object clone() {
211 return new ResourceActionWrapper((ResourceAction)_resourceAction.clone());
212 }
213
214 public int compareTo(com.liferay.portal.model.ResourceAction resourceAction) {
215 return _resourceAction.compareTo(resourceAction);
216 }
217
218 @Override
219 public int hashCode() {
220 return _resourceAction.hashCode();
221 }
222
223 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.ResourceAction> toCacheModel() {
224 return _resourceAction.toCacheModel();
225 }
226
227 public com.liferay.portal.model.ResourceAction toEscapedModel() {
228 return new ResourceActionWrapper(_resourceAction.toEscapedModel());
229 }
230
231 public com.liferay.portal.model.ResourceAction toUnescapedModel() {
232 return new ResourceActionWrapper(_resourceAction.toUnescapedModel());
233 }
234
235 @Override
236 public java.lang.String toString() {
237 return _resourceAction.toString();
238 }
239
240 public java.lang.String toXmlString() {
241 return _resourceAction.toXmlString();
242 }
243
244 public void persist()
245 throws com.liferay.portal.kernel.exception.SystemException {
246 _resourceAction.persist();
247 }
248
249 @Override
250 public boolean equals(Object obj) {
251 if (this == obj) {
252 return true;
253 }
254
255 if (!(obj instanceof ResourceActionWrapper)) {
256 return false;
257 }
258
259 ResourceActionWrapper resourceActionWrapper = (ResourceActionWrapper)obj;
260
261 if (Validator.equals(_resourceAction,
262 resourceActionWrapper._resourceAction)) {
263 return true;
264 }
265
266 return false;
267 }
268
269
272 public ResourceAction getWrappedResourceAction() {
273 return _resourceAction;
274 }
275
276 public ResourceAction getWrappedModel() {
277 return _resourceAction;
278 }
279
280 public void resetOriginalValues() {
281 _resourceAction.resetOriginalValues();
282 }
283
284 private ResourceAction _resourceAction;
285 }