001
014
015 package com.liferay.portlet.wiki.model;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.util.Validator;
020 import com.liferay.portal.model.ModelWrapper;
021
022 import java.util.HashMap;
023 import java.util.Map;
024
025
034 @ProviderType
035 public class WikiPageResourceWrapper implements WikiPageResource,
036 ModelWrapper<WikiPageResource> {
037 public WikiPageResourceWrapper(WikiPageResource wikiPageResource) {
038 _wikiPageResource = wikiPageResource;
039 }
040
041 @Override
042 public Class<?> getModelClass() {
043 return WikiPageResource.class;
044 }
045
046 @Override
047 public String getModelClassName() {
048 return WikiPageResource.class.getName();
049 }
050
051 @Override
052 public Map<String, Object> getModelAttributes() {
053 Map<String, Object> attributes = new HashMap<String, Object>();
054
055 attributes.put("uuid", getUuid());
056 attributes.put("resourcePrimKey", getResourcePrimKey());
057 attributes.put("nodeId", getNodeId());
058 attributes.put("title", getTitle());
059
060 return attributes;
061 }
062
063 @Override
064 public void setModelAttributes(Map<String, Object> attributes) {
065 String uuid = (String)attributes.get("uuid");
066
067 if (uuid != null) {
068 setUuid(uuid);
069 }
070
071 Long resourcePrimKey = (Long)attributes.get("resourcePrimKey");
072
073 if (resourcePrimKey != null) {
074 setResourcePrimKey(resourcePrimKey);
075 }
076
077 Long nodeId = (Long)attributes.get("nodeId");
078
079 if (nodeId != null) {
080 setNodeId(nodeId);
081 }
082
083 String title = (String)attributes.get("title");
084
085 if (title != null) {
086 setTitle(title);
087 }
088 }
089
090
095 @Override
096 public long getPrimaryKey() {
097 return _wikiPageResource.getPrimaryKey();
098 }
099
100
105 @Override
106 public void setPrimaryKey(long primaryKey) {
107 _wikiPageResource.setPrimaryKey(primaryKey);
108 }
109
110
115 @Override
116 public java.lang.String getUuid() {
117 return _wikiPageResource.getUuid();
118 }
119
120
125 @Override
126 public void setUuid(java.lang.String uuid) {
127 _wikiPageResource.setUuid(uuid);
128 }
129
130
135 @Override
136 public long getResourcePrimKey() {
137 return _wikiPageResource.getResourcePrimKey();
138 }
139
140
145 @Override
146 public void setResourcePrimKey(long resourcePrimKey) {
147 _wikiPageResource.setResourcePrimKey(resourcePrimKey);
148 }
149
150
155 @Override
156 public long getNodeId() {
157 return _wikiPageResource.getNodeId();
158 }
159
160
165 @Override
166 public void setNodeId(long nodeId) {
167 _wikiPageResource.setNodeId(nodeId);
168 }
169
170
175 @Override
176 public java.lang.String getTitle() {
177 return _wikiPageResource.getTitle();
178 }
179
180
185 @Override
186 public void setTitle(java.lang.String title) {
187 _wikiPageResource.setTitle(title);
188 }
189
190 @Override
191 public boolean isNew() {
192 return _wikiPageResource.isNew();
193 }
194
195 @Override
196 public void setNew(boolean n) {
197 _wikiPageResource.setNew(n);
198 }
199
200 @Override
201 public boolean isCachedModel() {
202 return _wikiPageResource.isCachedModel();
203 }
204
205 @Override
206 public void setCachedModel(boolean cachedModel) {
207 _wikiPageResource.setCachedModel(cachedModel);
208 }
209
210 @Override
211 public boolean isEscapedModel() {
212 return _wikiPageResource.isEscapedModel();
213 }
214
215 @Override
216 public java.io.Serializable getPrimaryKeyObj() {
217 return _wikiPageResource.getPrimaryKeyObj();
218 }
219
220 @Override
221 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
222 _wikiPageResource.setPrimaryKeyObj(primaryKeyObj);
223 }
224
225 @Override
226 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
227 return _wikiPageResource.getExpandoBridge();
228 }
229
230 @Override
231 public void setExpandoBridgeAttributes(
232 com.liferay.portal.model.BaseModel<?> baseModel) {
233 _wikiPageResource.setExpandoBridgeAttributes(baseModel);
234 }
235
236 @Override
237 public void setExpandoBridgeAttributes(
238 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
239 _wikiPageResource.setExpandoBridgeAttributes(expandoBridge);
240 }
241
242 @Override
243 public void setExpandoBridgeAttributes(
244 com.liferay.portal.service.ServiceContext serviceContext) {
245 _wikiPageResource.setExpandoBridgeAttributes(serviceContext);
246 }
247
248 @Override
249 public java.lang.Object clone() {
250 return new WikiPageResourceWrapper((WikiPageResource)_wikiPageResource.clone());
251 }
252
253 @Override
254 public int compareTo(
255 com.liferay.portlet.wiki.model.WikiPageResource wikiPageResource) {
256 return _wikiPageResource.compareTo(wikiPageResource);
257 }
258
259 @Override
260 public int hashCode() {
261 return _wikiPageResource.hashCode();
262 }
263
264 @Override
265 public com.liferay.portal.model.CacheModel<com.liferay.portlet.wiki.model.WikiPageResource> toCacheModel() {
266 return _wikiPageResource.toCacheModel();
267 }
268
269 @Override
270 public com.liferay.portlet.wiki.model.WikiPageResource toEscapedModel() {
271 return new WikiPageResourceWrapper(_wikiPageResource.toEscapedModel());
272 }
273
274 @Override
275 public com.liferay.portlet.wiki.model.WikiPageResource toUnescapedModel() {
276 return new WikiPageResourceWrapper(_wikiPageResource.toUnescapedModel());
277 }
278
279 @Override
280 public java.lang.String toString() {
281 return _wikiPageResource.toString();
282 }
283
284 @Override
285 public java.lang.String toXmlString() {
286 return _wikiPageResource.toXmlString();
287 }
288
289 @Override
290 public void persist()
291 throws com.liferay.portal.kernel.exception.SystemException {
292 _wikiPageResource.persist();
293 }
294
295 @Override
296 public boolean equals(Object obj) {
297 if (this == obj) {
298 return true;
299 }
300
301 if (!(obj instanceof WikiPageResourceWrapper)) {
302 return false;
303 }
304
305 WikiPageResourceWrapper wikiPageResourceWrapper = (WikiPageResourceWrapper)obj;
306
307 if (Validator.equals(_wikiPageResource,
308 wikiPageResourceWrapper._wikiPageResource)) {
309 return true;
310 }
311
312 return false;
313 }
314
315
318 public WikiPageResource getWrappedWikiPageResource() {
319 return _wikiPageResource;
320 }
321
322 @Override
323 public WikiPageResource getWrappedModel() {
324 return _wikiPageResource;
325 }
326
327 @Override
328 public void resetOriginalValues() {
329 _wikiPageResource.resetOriginalValues();
330 }
331
332 private WikiPageResource _wikiPageResource;
333 }