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.lar.StagedModelType;
018    import com.liferay.portal.kernel.util.Validator;
019    import com.liferay.portal.model.ModelWrapper;
020    
021    import java.util.Date;
022    import java.util.HashMap;
023    import java.util.Map;
024    
025    /**
026     * <p>
027     * This class is a wrapper for {@link WikiNode}.
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see WikiNode
032     * @generated
033     */
034    public class WikiNodeWrapper implements WikiNode, ModelWrapper<WikiNode> {
035            public WikiNodeWrapper(WikiNode wikiNode) {
036                    _wikiNode = wikiNode;
037            }
038    
039            @Override
040            public Class<?> getModelClass() {
041                    return WikiNode.class;
042            }
043    
044            @Override
045            public String getModelClassName() {
046                    return WikiNode.class.getName();
047            }
048    
049            @Override
050            public Map<String, Object> getModelAttributes() {
051                    Map<String, Object> attributes = new HashMap<String, Object>();
052    
053                    attributes.put("uuid", getUuid());
054                    attributes.put("nodeId", getNodeId());
055                    attributes.put("groupId", getGroupId());
056                    attributes.put("companyId", getCompanyId());
057                    attributes.put("userId", getUserId());
058                    attributes.put("userName", getUserName());
059                    attributes.put("createDate", getCreateDate());
060                    attributes.put("modifiedDate", getModifiedDate());
061                    attributes.put("name", getName());
062                    attributes.put("description", getDescription());
063                    attributes.put("lastPostDate", getLastPostDate());
064                    attributes.put("status", getStatus());
065                    attributes.put("statusByUserId", getStatusByUserId());
066                    attributes.put("statusByUserName", getStatusByUserName());
067                    attributes.put("statusDate", getStatusDate());
068    
069                    return attributes;
070            }
071    
072            @Override
073            public void setModelAttributes(Map<String, Object> attributes) {
074                    String uuid = (String)attributes.get("uuid");
075    
076                    if (uuid != null) {
077                            setUuid(uuid);
078                    }
079    
080                    Long nodeId = (Long)attributes.get("nodeId");
081    
082                    if (nodeId != null) {
083                            setNodeId(nodeId);
084                    }
085    
086                    Long groupId = (Long)attributes.get("groupId");
087    
088                    if (groupId != null) {
089                            setGroupId(groupId);
090                    }
091    
092                    Long companyId = (Long)attributes.get("companyId");
093    
094                    if (companyId != null) {
095                            setCompanyId(companyId);
096                    }
097    
098                    Long userId = (Long)attributes.get("userId");
099    
100                    if (userId != null) {
101                            setUserId(userId);
102                    }
103    
104                    String userName = (String)attributes.get("userName");
105    
106                    if (userName != null) {
107                            setUserName(userName);
108                    }
109    
110                    Date createDate = (Date)attributes.get("createDate");
111    
112                    if (createDate != null) {
113                            setCreateDate(createDate);
114                    }
115    
116                    Date modifiedDate = (Date)attributes.get("modifiedDate");
117    
118                    if (modifiedDate != null) {
119                            setModifiedDate(modifiedDate);
120                    }
121    
122                    String name = (String)attributes.get("name");
123    
124                    if (name != null) {
125                            setName(name);
126                    }
127    
128                    String description = (String)attributes.get("description");
129    
130                    if (description != null) {
131                            setDescription(description);
132                    }
133    
134                    Date lastPostDate = (Date)attributes.get("lastPostDate");
135    
136                    if (lastPostDate != null) {
137                            setLastPostDate(lastPostDate);
138                    }
139    
140                    Integer status = (Integer)attributes.get("status");
141    
142                    if (status != null) {
143                            setStatus(status);
144                    }
145    
146                    Long statusByUserId = (Long)attributes.get("statusByUserId");
147    
148                    if (statusByUserId != null) {
149                            setStatusByUserId(statusByUserId);
150                    }
151    
152                    String statusByUserName = (String)attributes.get("statusByUserName");
153    
154                    if (statusByUserName != null) {
155                            setStatusByUserName(statusByUserName);
156                    }
157    
158                    Date statusDate = (Date)attributes.get("statusDate");
159    
160                    if (statusDate != null) {
161                            setStatusDate(statusDate);
162                    }
163            }
164    
165            /**
166            * Returns the primary key of this wiki node.
167            *
168            * @return the primary key of this wiki node
169            */
170            @Override
171            public long getPrimaryKey() {
172                    return _wikiNode.getPrimaryKey();
173            }
174    
175            /**
176            * Sets the primary key of this wiki node.
177            *
178            * @param primaryKey the primary key of this wiki node
179            */
180            @Override
181            public void setPrimaryKey(long primaryKey) {
182                    _wikiNode.setPrimaryKey(primaryKey);
183            }
184    
185            /**
186            * Returns the uuid of this wiki node.
187            *
188            * @return the uuid of this wiki node
189            */
190            @Override
191            public java.lang.String getUuid() {
192                    return _wikiNode.getUuid();
193            }
194    
195            /**
196            * Sets the uuid of this wiki node.
197            *
198            * @param uuid the uuid of this wiki node
199            */
200            @Override
201            public void setUuid(java.lang.String uuid) {
202                    _wikiNode.setUuid(uuid);
203            }
204    
205            /**
206            * Returns the node ID of this wiki node.
207            *
208            * @return the node ID of this wiki node
209            */
210            @Override
211            public long getNodeId() {
212                    return _wikiNode.getNodeId();
213            }
214    
215            /**
216            * Sets the node ID of this wiki node.
217            *
218            * @param nodeId the node ID of this wiki node
219            */
220            @Override
221            public void setNodeId(long nodeId) {
222                    _wikiNode.setNodeId(nodeId);
223            }
224    
225            /**
226            * Returns the group ID of this wiki node.
227            *
228            * @return the group ID of this wiki node
229            */
230            @Override
231            public long getGroupId() {
232                    return _wikiNode.getGroupId();
233            }
234    
235            /**
236            * Sets the group ID of this wiki node.
237            *
238            * @param groupId the group ID of this wiki node
239            */
240            @Override
241            public void setGroupId(long groupId) {
242                    _wikiNode.setGroupId(groupId);
243            }
244    
245            /**
246            * Returns the company ID of this wiki node.
247            *
248            * @return the company ID of this wiki node
249            */
250            @Override
251            public long getCompanyId() {
252                    return _wikiNode.getCompanyId();
253            }
254    
255            /**
256            * Sets the company ID of this wiki node.
257            *
258            * @param companyId the company ID of this wiki node
259            */
260            @Override
261            public void setCompanyId(long companyId) {
262                    _wikiNode.setCompanyId(companyId);
263            }
264    
265            /**
266            * Returns the user ID of this wiki node.
267            *
268            * @return the user ID of this wiki node
269            */
270            @Override
271            public long getUserId() {
272                    return _wikiNode.getUserId();
273            }
274    
275            /**
276            * Sets the user ID of this wiki node.
277            *
278            * @param userId the user ID of this wiki node
279            */
280            @Override
281            public void setUserId(long userId) {
282                    _wikiNode.setUserId(userId);
283            }
284    
285            /**
286            * Returns the user uuid of this wiki node.
287            *
288            * @return the user uuid of this wiki node
289            * @throws SystemException if a system exception occurred
290            */
291            @Override
292            public java.lang.String getUserUuid()
293                    throws com.liferay.portal.kernel.exception.SystemException {
294                    return _wikiNode.getUserUuid();
295            }
296    
297            /**
298            * Sets the user uuid of this wiki node.
299            *
300            * @param userUuid the user uuid of this wiki node
301            */
302            @Override
303            public void setUserUuid(java.lang.String userUuid) {
304                    _wikiNode.setUserUuid(userUuid);
305            }
306    
307            /**
308            * Returns the user name of this wiki node.
309            *
310            * @return the user name of this wiki node
311            */
312            @Override
313            public java.lang.String getUserName() {
314                    return _wikiNode.getUserName();
315            }
316    
317            /**
318            * Sets the user name of this wiki node.
319            *
320            * @param userName the user name of this wiki node
321            */
322            @Override
323            public void setUserName(java.lang.String userName) {
324                    _wikiNode.setUserName(userName);
325            }
326    
327            /**
328            * Returns the create date of this wiki node.
329            *
330            * @return the create date of this wiki node
331            */
332            @Override
333            public java.util.Date getCreateDate() {
334                    return _wikiNode.getCreateDate();
335            }
336    
337            /**
338            * Sets the create date of this wiki node.
339            *
340            * @param createDate the create date of this wiki node
341            */
342            @Override
343            public void setCreateDate(java.util.Date createDate) {
344                    _wikiNode.setCreateDate(createDate);
345            }
346    
347            /**
348            * Returns the modified date of this wiki node.
349            *
350            * @return the modified date of this wiki node
351            */
352            @Override
353            public java.util.Date getModifiedDate() {
354                    return _wikiNode.getModifiedDate();
355            }
356    
357            /**
358            * Sets the modified date of this wiki node.
359            *
360            * @param modifiedDate the modified date of this wiki node
361            */
362            @Override
363            public void setModifiedDate(java.util.Date modifiedDate) {
364                    _wikiNode.setModifiedDate(modifiedDate);
365            }
366    
367            /**
368            * Returns the name of this wiki node.
369            *
370            * @return the name of this wiki node
371            */
372            @Override
373            public java.lang.String getName() {
374                    return _wikiNode.getName();
375            }
376    
377            /**
378            * Sets the name of this wiki node.
379            *
380            * @param name the name of this wiki node
381            */
382            @Override
383            public void setName(java.lang.String name) {
384                    _wikiNode.setName(name);
385            }
386    
387            /**
388            * Returns the description of this wiki node.
389            *
390            * @return the description of this wiki node
391            */
392            @Override
393            public java.lang.String getDescription() {
394                    return _wikiNode.getDescription();
395            }
396    
397            /**
398            * Sets the description of this wiki node.
399            *
400            * @param description the description of this wiki node
401            */
402            @Override
403            public void setDescription(java.lang.String description) {
404                    _wikiNode.setDescription(description);
405            }
406    
407            /**
408            * Returns the last post date of this wiki node.
409            *
410            * @return the last post date of this wiki node
411            */
412            @Override
413            public java.util.Date getLastPostDate() {
414                    return _wikiNode.getLastPostDate();
415            }
416    
417            /**
418            * Sets the last post date of this wiki node.
419            *
420            * @param lastPostDate the last post date of this wiki node
421            */
422            @Override
423            public void setLastPostDate(java.util.Date lastPostDate) {
424                    _wikiNode.setLastPostDate(lastPostDate);
425            }
426    
427            /**
428            * Returns the status of this wiki node.
429            *
430            * @return the status of this wiki node
431            */
432            @Override
433            public int getStatus() {
434                    return _wikiNode.getStatus();
435            }
436    
437            /**
438            * Sets the status of this wiki node.
439            *
440            * @param status the status of this wiki node
441            */
442            @Override
443            public void setStatus(int status) {
444                    _wikiNode.setStatus(status);
445            }
446    
447            /**
448            * Returns the status by user ID of this wiki node.
449            *
450            * @return the status by user ID of this wiki node
451            */
452            @Override
453            public long getStatusByUserId() {
454                    return _wikiNode.getStatusByUserId();
455            }
456    
457            /**
458            * Sets the status by user ID of this wiki node.
459            *
460            * @param statusByUserId the status by user ID of this wiki node
461            */
462            @Override
463            public void setStatusByUserId(long statusByUserId) {
464                    _wikiNode.setStatusByUserId(statusByUserId);
465            }
466    
467            /**
468            * Returns the status by user uuid of this wiki node.
469            *
470            * @return the status by user uuid of this wiki node
471            * @throws SystemException if a system exception occurred
472            */
473            @Override
474            public java.lang.String getStatusByUserUuid()
475                    throws com.liferay.portal.kernel.exception.SystemException {
476                    return _wikiNode.getStatusByUserUuid();
477            }
478    
479            /**
480            * Sets the status by user uuid of this wiki node.
481            *
482            * @param statusByUserUuid the status by user uuid of this wiki node
483            */
484            @Override
485            public void setStatusByUserUuid(java.lang.String statusByUserUuid) {
486                    _wikiNode.setStatusByUserUuid(statusByUserUuid);
487            }
488    
489            /**
490            * Returns the status by user name of this wiki node.
491            *
492            * @return the status by user name of this wiki node
493            */
494            @Override
495            public java.lang.String getStatusByUserName() {
496                    return _wikiNode.getStatusByUserName();
497            }
498    
499            /**
500            * Sets the status by user name of this wiki node.
501            *
502            * @param statusByUserName the status by user name of this wiki node
503            */
504            @Override
505            public void setStatusByUserName(java.lang.String statusByUserName) {
506                    _wikiNode.setStatusByUserName(statusByUserName);
507            }
508    
509            /**
510            * Returns the status date of this wiki node.
511            *
512            * @return the status date of this wiki node
513            */
514            @Override
515            public java.util.Date getStatusDate() {
516                    return _wikiNode.getStatusDate();
517            }
518    
519            /**
520            * Sets the status date of this wiki node.
521            *
522            * @param statusDate the status date of this wiki node
523            */
524            @Override
525            public void setStatusDate(java.util.Date statusDate) {
526                    _wikiNode.setStatusDate(statusDate);
527            }
528    
529            /**
530            * @deprecated As of 6.1.0, replaced by {@link #isApproved()}
531            */
532            @Override
533            public boolean getApproved() {
534                    return _wikiNode.getApproved();
535            }
536    
537            /**
538            * Returns <code>true</code> if this wiki node is approved.
539            *
540            * @return <code>true</code> if this wiki node is approved; <code>false</code> otherwise
541            */
542            @Override
543            public boolean isApproved() {
544                    return _wikiNode.isApproved();
545            }
546    
547            /**
548            * Returns <code>true</code> if this wiki node is denied.
549            *
550            * @return <code>true</code> if this wiki node is denied; <code>false</code> otherwise
551            */
552            @Override
553            public boolean isDenied() {
554                    return _wikiNode.isDenied();
555            }
556    
557            /**
558            * Returns <code>true</code> if this wiki node is a draft.
559            *
560            * @return <code>true</code> if this wiki node is a draft; <code>false</code> otherwise
561            */
562            @Override
563            public boolean isDraft() {
564                    return _wikiNode.isDraft();
565            }
566    
567            /**
568            * Returns <code>true</code> if this wiki node is expired.
569            *
570            * @return <code>true</code> if this wiki node is expired; <code>false</code> otherwise
571            */
572            @Override
573            public boolean isExpired() {
574                    return _wikiNode.isExpired();
575            }
576    
577            /**
578            * Returns <code>true</code> if this wiki node is inactive.
579            *
580            * @return <code>true</code> if this wiki node is inactive; <code>false</code> otherwise
581            */
582            @Override
583            public boolean isInactive() {
584                    return _wikiNode.isInactive();
585            }
586    
587            /**
588            * Returns <code>true</code> if this wiki node is incomplete.
589            *
590            * @return <code>true</code> if this wiki node is incomplete; <code>false</code> otherwise
591            */
592            @Override
593            public boolean isIncomplete() {
594                    return _wikiNode.isIncomplete();
595            }
596    
597            /**
598            * Returns <code>true</code> if this wiki node is in the Recycle Bin.
599            *
600            * @return <code>true</code> if this wiki node is in the Recycle Bin; <code>false</code> otherwise
601            */
602            @Override
603            public boolean isInTrash() {
604                    return _wikiNode.isInTrash();
605            }
606    
607            /**
608            * Returns <code>true</code> if this wiki node is pending.
609            *
610            * @return <code>true</code> if this wiki node is pending; <code>false</code> otherwise
611            */
612            @Override
613            public boolean isPending() {
614                    return _wikiNode.isPending();
615            }
616    
617            /**
618            * Returns <code>true</code> if this wiki node is scheduled.
619            *
620            * @return <code>true</code> if this wiki node is scheduled; <code>false</code> otherwise
621            */
622            @Override
623            public boolean isScheduled() {
624                    return _wikiNode.isScheduled();
625            }
626    
627            /**
628            * Returns the container model ID of this wiki node.
629            *
630            * @return the container model ID of this wiki node
631            */
632            @Override
633            public long getContainerModelId() {
634                    return _wikiNode.getContainerModelId();
635            }
636    
637            /**
638            * Sets the container model ID of this wiki node.
639            *
640            * @param container model ID of this wiki node
641            */
642            @Override
643            public void setContainerModelId(long containerModelId) {
644                    _wikiNode.setContainerModelId(containerModelId);
645            }
646    
647            /**
648            * Returns the container name of this wiki node.
649            *
650            * @return the container name of this wiki node
651            */
652            @Override
653            public java.lang.String getContainerModelName() {
654                    return _wikiNode.getContainerModelName();
655            }
656    
657            /**
658            * Returns the parent container model ID of this wiki node.
659            *
660            * @return the parent container model ID of this wiki node
661            */
662            @Override
663            public long getParentContainerModelId() {
664                    return _wikiNode.getParentContainerModelId();
665            }
666    
667            /**
668            * Sets the parent container model ID of this wiki node.
669            *
670            * @param parent container model ID of this wiki node
671            */
672            @Override
673            public void setParentContainerModelId(long parentContainerModelId) {
674                    _wikiNode.setParentContainerModelId(parentContainerModelId);
675            }
676    
677            @Override
678            public boolean isNew() {
679                    return _wikiNode.isNew();
680            }
681    
682            @Override
683            public void setNew(boolean n) {
684                    _wikiNode.setNew(n);
685            }
686    
687            @Override
688            public boolean isCachedModel() {
689                    return _wikiNode.isCachedModel();
690            }
691    
692            @Override
693            public void setCachedModel(boolean cachedModel) {
694                    _wikiNode.setCachedModel(cachedModel);
695            }
696    
697            @Override
698            public boolean isEscapedModel() {
699                    return _wikiNode.isEscapedModel();
700            }
701    
702            @Override
703            public java.io.Serializable getPrimaryKeyObj() {
704                    return _wikiNode.getPrimaryKeyObj();
705            }
706    
707            @Override
708            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
709                    _wikiNode.setPrimaryKeyObj(primaryKeyObj);
710            }
711    
712            @Override
713            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
714                    return _wikiNode.getExpandoBridge();
715            }
716    
717            @Override
718            public void setExpandoBridgeAttributes(
719                    com.liferay.portal.model.BaseModel<?> baseModel) {
720                    _wikiNode.setExpandoBridgeAttributes(baseModel);
721            }
722    
723            @Override
724            public void setExpandoBridgeAttributes(
725                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
726                    _wikiNode.setExpandoBridgeAttributes(expandoBridge);
727            }
728    
729            @Override
730            public void setExpandoBridgeAttributes(
731                    com.liferay.portal.service.ServiceContext serviceContext) {
732                    _wikiNode.setExpandoBridgeAttributes(serviceContext);
733            }
734    
735            @Override
736            public java.lang.Object clone() {
737                    return new WikiNodeWrapper((WikiNode)_wikiNode.clone());
738            }
739    
740            @Override
741            public int compareTo(com.liferay.portlet.wiki.model.WikiNode wikiNode) {
742                    return _wikiNode.compareTo(wikiNode);
743            }
744    
745            @Override
746            public int hashCode() {
747                    return _wikiNode.hashCode();
748            }
749    
750            @Override
751            public com.liferay.portal.model.CacheModel<com.liferay.portlet.wiki.model.WikiNode> toCacheModel() {
752                    return _wikiNode.toCacheModel();
753            }
754    
755            @Override
756            public com.liferay.portlet.wiki.model.WikiNode toEscapedModel() {
757                    return new WikiNodeWrapper(_wikiNode.toEscapedModel());
758            }
759    
760            @Override
761            public com.liferay.portlet.wiki.model.WikiNode toUnescapedModel() {
762                    return new WikiNodeWrapper(_wikiNode.toUnescapedModel());
763            }
764    
765            @Override
766            public java.lang.String toString() {
767                    return _wikiNode.toString();
768            }
769    
770            @Override
771            public java.lang.String toXmlString() {
772                    return _wikiNode.toXmlString();
773            }
774    
775            @Override
776            public void persist()
777                    throws com.liferay.portal.kernel.exception.SystemException {
778                    _wikiNode.persist();
779            }
780    
781            @Override
782            public com.liferay.portal.kernel.repository.model.Folder addAttachmentsFolder()
783                    throws com.liferay.portal.kernel.exception.PortalException,
784                            com.liferay.portal.kernel.exception.SystemException {
785                    return _wikiNode.addAttachmentsFolder();
786            }
787    
788            @Override
789            public long getAttachmentsFolderId()
790                    throws com.liferay.portal.kernel.exception.SystemException {
791                    return _wikiNode.getAttachmentsFolderId();
792            }
793    
794            @Override
795            public java.util.List<com.liferay.portal.kernel.repository.model.FileEntry> getDeletedAttachmentsFiles()
796                    throws com.liferay.portal.kernel.exception.SystemException {
797                    return _wikiNode.getDeletedAttachmentsFiles();
798            }
799    
800            @Override
801            public boolean equals(Object obj) {
802                    if (this == obj) {
803                            return true;
804                    }
805    
806                    if (!(obj instanceof WikiNodeWrapper)) {
807                            return false;
808                    }
809    
810                    WikiNodeWrapper wikiNodeWrapper = (WikiNodeWrapper)obj;
811    
812                    if (Validator.equals(_wikiNode, wikiNodeWrapper._wikiNode)) {
813                            return true;
814                    }
815    
816                    return false;
817            }
818    
819            @Override
820            public StagedModelType getStagedModelType() {
821                    return _wikiNode.getStagedModelType();
822            }
823    
824            /**
825             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
826             */
827            public WikiNode getWrappedWikiNode() {
828                    return _wikiNode;
829            }
830    
831            @Override
832            public WikiNode getWrappedModel() {
833                    return _wikiNode;
834            }
835    
836            @Override
837            public void resetOriginalValues() {
838                    _wikiNode.resetOriginalValues();
839            }
840    
841            private WikiNode _wikiNode;
842    }