001
014
015 package com.liferay.portlet.wiki.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018 import com.liferay.portal.model.ModelWrapper;
019
020 import java.util.HashMap;
021 import java.util.Map;
022
023
032 public class WikiPageResourceWrapper implements WikiPageResource,
033 ModelWrapper<WikiPageResource> {
034 public WikiPageResourceWrapper(WikiPageResource wikiPageResource) {
035 _wikiPageResource = wikiPageResource;
036 }
037
038 public Class<?> getModelClass() {
039 return WikiPageResource.class;
040 }
041
042 public String getModelClassName() {
043 return WikiPageResource.class.getName();
044 }
045
046 public Map<String, Object> getModelAttributes() {
047 Map<String, Object> attributes = new HashMap<String, Object>();
048
049 attributes.put("uuid", getUuid());
050 attributes.put("resourcePrimKey", getResourcePrimKey());
051 attributes.put("nodeId", getNodeId());
052 attributes.put("title", getTitle());
053
054 return attributes;
055 }
056
057 public void setModelAttributes(Map<String, Object> attributes) {
058 String uuid = (String)attributes.get("uuid");
059
060 if (uuid != null) {
061 setUuid(uuid);
062 }
063
064 Long resourcePrimKey = (Long)attributes.get("resourcePrimKey");
065
066 if (resourcePrimKey != null) {
067 setResourcePrimKey(resourcePrimKey);
068 }
069
070 Long nodeId = (Long)attributes.get("nodeId");
071
072 if (nodeId != null) {
073 setNodeId(nodeId);
074 }
075
076 String title = (String)attributes.get("title");
077
078 if (title != null) {
079 setTitle(title);
080 }
081 }
082
083
088 public long getPrimaryKey() {
089 return _wikiPageResource.getPrimaryKey();
090 }
091
092
097 public void setPrimaryKey(long primaryKey) {
098 _wikiPageResource.setPrimaryKey(primaryKey);
099 }
100
101
106 public java.lang.String getUuid() {
107 return _wikiPageResource.getUuid();
108 }
109
110
115 public void setUuid(java.lang.String uuid) {
116 _wikiPageResource.setUuid(uuid);
117 }
118
119
124 public long getResourcePrimKey() {
125 return _wikiPageResource.getResourcePrimKey();
126 }
127
128
133 public void setResourcePrimKey(long resourcePrimKey) {
134 _wikiPageResource.setResourcePrimKey(resourcePrimKey);
135 }
136
137
142 public long getNodeId() {
143 return _wikiPageResource.getNodeId();
144 }
145
146
151 public void setNodeId(long nodeId) {
152 _wikiPageResource.setNodeId(nodeId);
153 }
154
155
160 public java.lang.String getTitle() {
161 return _wikiPageResource.getTitle();
162 }
163
164
169 public void setTitle(java.lang.String title) {
170 _wikiPageResource.setTitle(title);
171 }
172
173 public boolean isNew() {
174 return _wikiPageResource.isNew();
175 }
176
177 public void setNew(boolean n) {
178 _wikiPageResource.setNew(n);
179 }
180
181 public boolean isCachedModel() {
182 return _wikiPageResource.isCachedModel();
183 }
184
185 public void setCachedModel(boolean cachedModel) {
186 _wikiPageResource.setCachedModel(cachedModel);
187 }
188
189 public boolean isEscapedModel() {
190 return _wikiPageResource.isEscapedModel();
191 }
192
193 public java.io.Serializable getPrimaryKeyObj() {
194 return _wikiPageResource.getPrimaryKeyObj();
195 }
196
197 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
198 _wikiPageResource.setPrimaryKeyObj(primaryKeyObj);
199 }
200
201 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
202 return _wikiPageResource.getExpandoBridge();
203 }
204
205 public void setExpandoBridgeAttributes(
206 com.liferay.portal.service.ServiceContext serviceContext) {
207 _wikiPageResource.setExpandoBridgeAttributes(serviceContext);
208 }
209
210 @Override
211 public java.lang.Object clone() {
212 return new WikiPageResourceWrapper((WikiPageResource)_wikiPageResource.clone());
213 }
214
215 public int compareTo(
216 com.liferay.portlet.wiki.model.WikiPageResource wikiPageResource) {
217 return _wikiPageResource.compareTo(wikiPageResource);
218 }
219
220 @Override
221 public int hashCode() {
222 return _wikiPageResource.hashCode();
223 }
224
225 public com.liferay.portal.model.CacheModel<com.liferay.portlet.wiki.model.WikiPageResource> toCacheModel() {
226 return _wikiPageResource.toCacheModel();
227 }
228
229 public com.liferay.portlet.wiki.model.WikiPageResource toEscapedModel() {
230 return new WikiPageResourceWrapper(_wikiPageResource.toEscapedModel());
231 }
232
233 public com.liferay.portlet.wiki.model.WikiPageResource toUnescapedModel() {
234 return new WikiPageResourceWrapper(_wikiPageResource.toUnescapedModel());
235 }
236
237 @Override
238 public java.lang.String toString() {
239 return _wikiPageResource.toString();
240 }
241
242 public java.lang.String toXmlString() {
243 return _wikiPageResource.toXmlString();
244 }
245
246 public void persist()
247 throws com.liferay.portal.kernel.exception.SystemException {
248 _wikiPageResource.persist();
249 }
250
251 @Override
252 public boolean equals(Object obj) {
253 if (this == obj) {
254 return true;
255 }
256
257 if (!(obj instanceof WikiPageResourceWrapper)) {
258 return false;
259 }
260
261 WikiPageResourceWrapper wikiPageResourceWrapper = (WikiPageResourceWrapper)obj;
262
263 if (Validator.equals(_wikiPageResource,
264 wikiPageResourceWrapper._wikiPageResource)) {
265 return true;
266 }
267
268 return false;
269 }
270
271
274 public WikiPageResource getWrappedWikiPageResource() {
275 return _wikiPageResource;
276 }
277
278 public WikiPageResource getWrappedModel() {
279 return _wikiPageResource;
280 }
281
282 public void resetOriginalValues() {
283 _wikiPageResource.resetOriginalValues();
284 }
285
286 private WikiPageResource _wikiPageResource;
287 }