001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portlet.wiki.model;
016    
017    import com.liferay.portal.model.ModelWrapper;
018    
019    import java.util.Date;
020    import java.util.HashMap;
021    import java.util.Map;
022    
023    /**
024     * <p>
025     * This class is a wrapper for {@link WikiNode}.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       WikiNode
030     * @generated
031     */
032    public class WikiNodeWrapper implements WikiNode, ModelWrapper<WikiNode> {
033            public WikiNodeWrapper(WikiNode wikiNode) {
034                    _wikiNode = wikiNode;
035            }
036    
037            public Class<?> getModelClass() {
038                    return WikiNode.class;
039            }
040    
041            public String getModelClassName() {
042                    return WikiNode.class.getName();
043            }
044    
045            public Map<String, Object> getModelAttributes() {
046                    Map<String, Object> attributes = new HashMap<String, Object>();
047    
048                    attributes.put("uuid", getUuid());
049                    attributes.put("nodeId", getNodeId());
050                    attributes.put("groupId", getGroupId());
051                    attributes.put("companyId", getCompanyId());
052                    attributes.put("userId", getUserId());
053                    attributes.put("userName", getUserName());
054                    attributes.put("createDate", getCreateDate());
055                    attributes.put("modifiedDate", getModifiedDate());
056                    attributes.put("name", getName());
057                    attributes.put("description", getDescription());
058                    attributes.put("lastPostDate", getLastPostDate());
059    
060                    return attributes;
061            }
062    
063            public void setModelAttributes(Map<String, Object> attributes) {
064                    String uuid = (String)attributes.get("uuid");
065    
066                    if (uuid != null) {
067                            setUuid(uuid);
068                    }
069    
070                    Long nodeId = (Long)attributes.get("nodeId");
071    
072                    if (nodeId != null) {
073                            setNodeId(nodeId);
074                    }
075    
076                    Long groupId = (Long)attributes.get("groupId");
077    
078                    if (groupId != null) {
079                            setGroupId(groupId);
080                    }
081    
082                    Long companyId = (Long)attributes.get("companyId");
083    
084                    if (companyId != null) {
085                            setCompanyId(companyId);
086                    }
087    
088                    Long userId = (Long)attributes.get("userId");
089    
090                    if (userId != null) {
091                            setUserId(userId);
092                    }
093    
094                    String userName = (String)attributes.get("userName");
095    
096                    if (userName != null) {
097                            setUserName(userName);
098                    }
099    
100                    Date createDate = (Date)attributes.get("createDate");
101    
102                    if (createDate != null) {
103                            setCreateDate(createDate);
104                    }
105    
106                    Date modifiedDate = (Date)attributes.get("modifiedDate");
107    
108                    if (modifiedDate != null) {
109                            setModifiedDate(modifiedDate);
110                    }
111    
112                    String name = (String)attributes.get("name");
113    
114                    if (name != null) {
115                            setName(name);
116                    }
117    
118                    String description = (String)attributes.get("description");
119    
120                    if (description != null) {
121                            setDescription(description);
122                    }
123    
124                    Date lastPostDate = (Date)attributes.get("lastPostDate");
125    
126                    if (lastPostDate != null) {
127                            setLastPostDate(lastPostDate);
128                    }
129            }
130    
131            /**
132            * Returns the primary key of this wiki node.
133            *
134            * @return the primary key of this wiki node
135            */
136            public long getPrimaryKey() {
137                    return _wikiNode.getPrimaryKey();
138            }
139    
140            /**
141            * Sets the primary key of this wiki node.
142            *
143            * @param primaryKey the primary key of this wiki node
144            */
145            public void setPrimaryKey(long primaryKey) {
146                    _wikiNode.setPrimaryKey(primaryKey);
147            }
148    
149            /**
150            * Returns the uuid of this wiki node.
151            *
152            * @return the uuid of this wiki node
153            */
154            public java.lang.String getUuid() {
155                    return _wikiNode.getUuid();
156            }
157    
158            /**
159            * Sets the uuid of this wiki node.
160            *
161            * @param uuid the uuid of this wiki node
162            */
163            public void setUuid(java.lang.String uuid) {
164                    _wikiNode.setUuid(uuid);
165            }
166    
167            /**
168            * Returns the node ID of this wiki node.
169            *
170            * @return the node ID of this wiki node
171            */
172            public long getNodeId() {
173                    return _wikiNode.getNodeId();
174            }
175    
176            /**
177            * Sets the node ID of this wiki node.
178            *
179            * @param nodeId the node ID of this wiki node
180            */
181            public void setNodeId(long nodeId) {
182                    _wikiNode.setNodeId(nodeId);
183            }
184    
185            /**
186            * Returns the group ID of this wiki node.
187            *
188            * @return the group ID of this wiki node
189            */
190            public long getGroupId() {
191                    return _wikiNode.getGroupId();
192            }
193    
194            /**
195            * Sets the group ID of this wiki node.
196            *
197            * @param groupId the group ID of this wiki node
198            */
199            public void setGroupId(long groupId) {
200                    _wikiNode.setGroupId(groupId);
201            }
202    
203            /**
204            * Returns the company ID of this wiki node.
205            *
206            * @return the company ID of this wiki node
207            */
208            public long getCompanyId() {
209                    return _wikiNode.getCompanyId();
210            }
211    
212            /**
213            * Sets the company ID of this wiki node.
214            *
215            * @param companyId the company ID of this wiki node
216            */
217            public void setCompanyId(long companyId) {
218                    _wikiNode.setCompanyId(companyId);
219            }
220    
221            /**
222            * Returns the user ID of this wiki node.
223            *
224            * @return the user ID of this wiki node
225            */
226            public long getUserId() {
227                    return _wikiNode.getUserId();
228            }
229    
230            /**
231            * Sets the user ID of this wiki node.
232            *
233            * @param userId the user ID of this wiki node
234            */
235            public void setUserId(long userId) {
236                    _wikiNode.setUserId(userId);
237            }
238    
239            /**
240            * Returns the user uuid of this wiki node.
241            *
242            * @return the user uuid of this wiki node
243            * @throws SystemException if a system exception occurred
244            */
245            public java.lang.String getUserUuid()
246                    throws com.liferay.portal.kernel.exception.SystemException {
247                    return _wikiNode.getUserUuid();
248            }
249    
250            /**
251            * Sets the user uuid of this wiki node.
252            *
253            * @param userUuid the user uuid of this wiki node
254            */
255            public void setUserUuid(java.lang.String userUuid) {
256                    _wikiNode.setUserUuid(userUuid);
257            }
258    
259            /**
260            * Returns the user name of this wiki node.
261            *
262            * @return the user name of this wiki node
263            */
264            public java.lang.String getUserName() {
265                    return _wikiNode.getUserName();
266            }
267    
268            /**
269            * Sets the user name of this wiki node.
270            *
271            * @param userName the user name of this wiki node
272            */
273            public void setUserName(java.lang.String userName) {
274                    _wikiNode.setUserName(userName);
275            }
276    
277            /**
278            * Returns the create date of this wiki node.
279            *
280            * @return the create date of this wiki node
281            */
282            public java.util.Date getCreateDate() {
283                    return _wikiNode.getCreateDate();
284            }
285    
286            /**
287            * Sets the create date of this wiki node.
288            *
289            * @param createDate the create date of this wiki node
290            */
291            public void setCreateDate(java.util.Date createDate) {
292                    _wikiNode.setCreateDate(createDate);
293            }
294    
295            /**
296            * Returns the modified date of this wiki node.
297            *
298            * @return the modified date of this wiki node
299            */
300            public java.util.Date getModifiedDate() {
301                    return _wikiNode.getModifiedDate();
302            }
303    
304            /**
305            * Sets the modified date of this wiki node.
306            *
307            * @param modifiedDate the modified date of this wiki node
308            */
309            public void setModifiedDate(java.util.Date modifiedDate) {
310                    _wikiNode.setModifiedDate(modifiedDate);
311            }
312    
313            /**
314            * Returns the name of this wiki node.
315            *
316            * @return the name of this wiki node
317            */
318            public java.lang.String getName() {
319                    return _wikiNode.getName();
320            }
321    
322            /**
323            * Sets the name of this wiki node.
324            *
325            * @param name the name of this wiki node
326            */
327            public void setName(java.lang.String name) {
328                    _wikiNode.setName(name);
329            }
330    
331            /**
332            * Returns the description of this wiki node.
333            *
334            * @return the description of this wiki node
335            */
336            public java.lang.String getDescription() {
337                    return _wikiNode.getDescription();
338            }
339    
340            /**
341            * Sets the description of this wiki node.
342            *
343            * @param description the description of this wiki node
344            */
345            public void setDescription(java.lang.String description) {
346                    _wikiNode.setDescription(description);
347            }
348    
349            /**
350            * Returns the last post date of this wiki node.
351            *
352            * @return the last post date of this wiki node
353            */
354            public java.util.Date getLastPostDate() {
355                    return _wikiNode.getLastPostDate();
356            }
357    
358            /**
359            * Sets the last post date of this wiki node.
360            *
361            * @param lastPostDate the last post date of this wiki node
362            */
363            public void setLastPostDate(java.util.Date lastPostDate) {
364                    _wikiNode.setLastPostDate(lastPostDate);
365            }
366    
367            public boolean isNew() {
368                    return _wikiNode.isNew();
369            }
370    
371            public void setNew(boolean n) {
372                    _wikiNode.setNew(n);
373            }
374    
375            public boolean isCachedModel() {
376                    return _wikiNode.isCachedModel();
377            }
378    
379            public void setCachedModel(boolean cachedModel) {
380                    _wikiNode.setCachedModel(cachedModel);
381            }
382    
383            public boolean isEscapedModel() {
384                    return _wikiNode.isEscapedModel();
385            }
386    
387            public java.io.Serializable getPrimaryKeyObj() {
388                    return _wikiNode.getPrimaryKeyObj();
389            }
390    
391            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
392                    _wikiNode.setPrimaryKeyObj(primaryKeyObj);
393            }
394    
395            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
396                    return _wikiNode.getExpandoBridge();
397            }
398    
399            public void setExpandoBridgeAttributes(
400                    com.liferay.portal.service.ServiceContext serviceContext) {
401                    _wikiNode.setExpandoBridgeAttributes(serviceContext);
402            }
403    
404            @Override
405            public java.lang.Object clone() {
406                    return new WikiNodeWrapper((WikiNode)_wikiNode.clone());
407            }
408    
409            public int compareTo(com.liferay.portlet.wiki.model.WikiNode wikiNode) {
410                    return _wikiNode.compareTo(wikiNode);
411            }
412    
413            @Override
414            public int hashCode() {
415                    return _wikiNode.hashCode();
416            }
417    
418            public com.liferay.portal.model.CacheModel<com.liferay.portlet.wiki.model.WikiNode> toCacheModel() {
419                    return _wikiNode.toCacheModel();
420            }
421    
422            public com.liferay.portlet.wiki.model.WikiNode toEscapedModel() {
423                    return new WikiNodeWrapper(_wikiNode.toEscapedModel());
424            }
425    
426            @Override
427            public java.lang.String toString() {
428                    return _wikiNode.toString();
429            }
430    
431            public java.lang.String toXmlString() {
432                    return _wikiNode.toXmlString();
433            }
434    
435            public void persist()
436                    throws com.liferay.portal.kernel.exception.SystemException {
437                    _wikiNode.persist();
438            }
439    
440            /**
441             * @deprecated Renamed to {@link #getWrappedModel}
442             */
443            public WikiNode getWrappedWikiNode() {
444                    return _wikiNode;
445            }
446    
447            public WikiNode getWrappedModel() {
448                    return _wikiNode;
449            }
450    
451            public void resetOriginalValues() {
452                    _wikiNode.resetOriginalValues();
453            }
454    
455            private WikiNode _wikiNode;
456    }