001
014
015 package com.liferay.portal.model;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.util.Validator;
020 import com.liferay.portal.service.ServiceContext;
021
022 import com.liferay.portlet.expando.model.ExpandoBridge;
023
024 import java.io.Serializable;
025
026 import java.util.HashMap;
027 import java.util.Map;
028
029
038 @ProviderType
039 public class ResourceActionWrapper implements ResourceAction,
040 ModelWrapper<ResourceAction> {
041 public ResourceActionWrapper(ResourceAction resourceAction) {
042 _resourceAction = resourceAction;
043 }
044
045 @Override
046 public Class<?> getModelClass() {
047 return ResourceAction.class;
048 }
049
050 @Override
051 public String getModelClassName() {
052 return ResourceAction.class.getName();
053 }
054
055 @Override
056 public Map<String, Object> getModelAttributes() {
057 Map<String, Object> attributes = new HashMap<String, Object>();
058
059 attributes.put("mvccVersion", getMvccVersion());
060 attributes.put("resourceActionId", getResourceActionId());
061 attributes.put("name", getName());
062 attributes.put("actionId", getActionId());
063 attributes.put("bitwiseValue", getBitwiseValue());
064
065 return attributes;
066 }
067
068 @Override
069 public void setModelAttributes(Map<String, Object> attributes) {
070 Long mvccVersion = (Long)attributes.get("mvccVersion");
071
072 if (mvccVersion != null) {
073 setMvccVersion(mvccVersion);
074 }
075
076 Long resourceActionId = (Long)attributes.get("resourceActionId");
077
078 if (resourceActionId != null) {
079 setResourceActionId(resourceActionId);
080 }
081
082 String name = (String)attributes.get("name");
083
084 if (name != null) {
085 setName(name);
086 }
087
088 String actionId = (String)attributes.get("actionId");
089
090 if (actionId != null) {
091 setActionId(actionId);
092 }
093
094 Long bitwiseValue = (Long)attributes.get("bitwiseValue");
095
096 if (bitwiseValue != null) {
097 setBitwiseValue(bitwiseValue);
098 }
099 }
100
101 @Override
102 public java.lang.Object clone() {
103 return new ResourceActionWrapper((ResourceAction)_resourceAction.clone());
104 }
105
106 @Override
107 public int compareTo(com.liferay.portal.model.ResourceAction resourceAction) {
108 return _resourceAction.compareTo(resourceAction);
109 }
110
111
116 @Override
117 public java.lang.String getActionId() {
118 return _resourceAction.getActionId();
119 }
120
121
126 @Override
127 public long getBitwiseValue() {
128 return _resourceAction.getBitwiseValue();
129 }
130
131 @Override
132 public ExpandoBridge getExpandoBridge() {
133 return _resourceAction.getExpandoBridge();
134 }
135
136
141 @Override
142 public long getMvccVersion() {
143 return _resourceAction.getMvccVersion();
144 }
145
146
151 @Override
152 public java.lang.String getName() {
153 return _resourceAction.getName();
154 }
155
156
161 @Override
162 public long getPrimaryKey() {
163 return _resourceAction.getPrimaryKey();
164 }
165
166 @Override
167 public Serializable getPrimaryKeyObj() {
168 return _resourceAction.getPrimaryKeyObj();
169 }
170
171
176 @Override
177 public long getResourceActionId() {
178 return _resourceAction.getResourceActionId();
179 }
180
181 @Override
182 public int hashCode() {
183 return _resourceAction.hashCode();
184 }
185
186 @Override
187 public boolean isCachedModel() {
188 return _resourceAction.isCachedModel();
189 }
190
191 @Override
192 public boolean isEscapedModel() {
193 return _resourceAction.isEscapedModel();
194 }
195
196 @Override
197 public boolean isNew() {
198 return _resourceAction.isNew();
199 }
200
201 @Override
202 public void persist() {
203 _resourceAction.persist();
204 }
205
206
211 @Override
212 public void setActionId(java.lang.String actionId) {
213 _resourceAction.setActionId(actionId);
214 }
215
216
221 @Override
222 public void setBitwiseValue(long bitwiseValue) {
223 _resourceAction.setBitwiseValue(bitwiseValue);
224 }
225
226 @Override
227 public void setCachedModel(boolean cachedModel) {
228 _resourceAction.setCachedModel(cachedModel);
229 }
230
231 @Override
232 public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
233 _resourceAction.setExpandoBridgeAttributes(baseModel);
234 }
235
236 @Override
237 public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
238 _resourceAction.setExpandoBridgeAttributes(expandoBridge);
239 }
240
241 @Override
242 public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
243 _resourceAction.setExpandoBridgeAttributes(serviceContext);
244 }
245
246
251 @Override
252 public void setMvccVersion(long mvccVersion) {
253 _resourceAction.setMvccVersion(mvccVersion);
254 }
255
256
261 @Override
262 public void setName(java.lang.String name) {
263 _resourceAction.setName(name);
264 }
265
266 @Override
267 public void setNew(boolean n) {
268 _resourceAction.setNew(n);
269 }
270
271
276 @Override
277 public void setPrimaryKey(long primaryKey) {
278 _resourceAction.setPrimaryKey(primaryKey);
279 }
280
281 @Override
282 public void setPrimaryKeyObj(Serializable primaryKeyObj) {
283 _resourceAction.setPrimaryKeyObj(primaryKeyObj);
284 }
285
286
291 @Override
292 public void setResourceActionId(long resourceActionId) {
293 _resourceAction.setResourceActionId(resourceActionId);
294 }
295
296 @Override
297 public CacheModel<com.liferay.portal.model.ResourceAction> toCacheModel() {
298 return _resourceAction.toCacheModel();
299 }
300
301 @Override
302 public com.liferay.portal.model.ResourceAction toEscapedModel() {
303 return new ResourceActionWrapper(_resourceAction.toEscapedModel());
304 }
305
306 @Override
307 public java.lang.String toString() {
308 return _resourceAction.toString();
309 }
310
311 @Override
312 public com.liferay.portal.model.ResourceAction toUnescapedModel() {
313 return new ResourceActionWrapper(_resourceAction.toUnescapedModel());
314 }
315
316 @Override
317 public java.lang.String toXmlString() {
318 return _resourceAction.toXmlString();
319 }
320
321 @Override
322 public boolean equals(Object obj) {
323 if (this == obj) {
324 return true;
325 }
326
327 if (!(obj instanceof ResourceActionWrapper)) {
328 return false;
329 }
330
331 ResourceActionWrapper resourceActionWrapper = (ResourceActionWrapper)obj;
332
333 if (Validator.equals(_resourceAction,
334 resourceActionWrapper._resourceAction)) {
335 return true;
336 }
337
338 return false;
339 }
340
341 @Override
342 public ResourceAction getWrappedModel() {
343 return _resourceAction;
344 }
345
346 @Override
347 public boolean isEntityCacheEnabled() {
348 return _resourceAction.isEntityCacheEnabled();
349 }
350
351 @Override
352 public boolean isFinderCacheEnabled() {
353 return _resourceAction.isFinderCacheEnabled();
354 }
355
356 @Override
357 public void resetOriginalValues() {
358 _resourceAction.resetOriginalValues();
359 }
360
361 private final ResourceAction _resourceAction;
362 }