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