001    /**
002     * Copyright (c) 2000-2012 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.model.ModelWrapper;
018    
019    import java.util.HashMap;
020    import java.util.Map;
021    
022    /**
023     * <p>
024     * This class is a wrapper for {@link WikiPageResource}.
025     * </p>
026     *
027     * @author    Brian Wing Shun Chan
028     * @see       WikiPageResource
029     * @generated
030     */
031    public class WikiPageResourceWrapper implements WikiPageResource,
032            ModelWrapper<WikiPageResource> {
033            public WikiPageResourceWrapper(WikiPageResource wikiPageResource) {
034                    _wikiPageResource = wikiPageResource;
035            }
036    
037            public Class<?> getModelClass() {
038                    return WikiPageResource.class;
039            }
040    
041            public String getModelClassName() {
042                    return WikiPageResource.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("resourcePrimKey", getResourcePrimKey());
050                    attributes.put("nodeId", getNodeId());
051                    attributes.put("title", getTitle());
052    
053                    return attributes;
054            }
055    
056            public void setModelAttributes(Map<String, Object> attributes) {
057                    String uuid = (String)attributes.get("uuid");
058    
059                    if (uuid != null) {
060                            setUuid(uuid);
061                    }
062    
063                    Long resourcePrimKey = (Long)attributes.get("resourcePrimKey");
064    
065                    if (resourcePrimKey != null) {
066                            setResourcePrimKey(resourcePrimKey);
067                    }
068    
069                    Long nodeId = (Long)attributes.get("nodeId");
070    
071                    if (nodeId != null) {
072                            setNodeId(nodeId);
073                    }
074    
075                    String title = (String)attributes.get("title");
076    
077                    if (title != null) {
078                            setTitle(title);
079                    }
080            }
081    
082            /**
083            * Returns the primary key of this wiki page resource.
084            *
085            * @return the primary key of this wiki page resource
086            */
087            public long getPrimaryKey() {
088                    return _wikiPageResource.getPrimaryKey();
089            }
090    
091            /**
092            * Sets the primary key of this wiki page resource.
093            *
094            * @param primaryKey the primary key of this wiki page resource
095            */
096            public void setPrimaryKey(long primaryKey) {
097                    _wikiPageResource.setPrimaryKey(primaryKey);
098            }
099    
100            /**
101            * Returns the uuid of this wiki page resource.
102            *
103            * @return the uuid of this wiki page resource
104            */
105            public java.lang.String getUuid() {
106                    return _wikiPageResource.getUuid();
107            }
108    
109            /**
110            * Sets the uuid of this wiki page resource.
111            *
112            * @param uuid the uuid of this wiki page resource
113            */
114            public void setUuid(java.lang.String uuid) {
115                    _wikiPageResource.setUuid(uuid);
116            }
117    
118            /**
119            * Returns the resource prim key of this wiki page resource.
120            *
121            * @return the resource prim key of this wiki page resource
122            */
123            public long getResourcePrimKey() {
124                    return _wikiPageResource.getResourcePrimKey();
125            }
126    
127            /**
128            * Sets the resource prim key of this wiki page resource.
129            *
130            * @param resourcePrimKey the resource prim key of this wiki page resource
131            */
132            public void setResourcePrimKey(long resourcePrimKey) {
133                    _wikiPageResource.setResourcePrimKey(resourcePrimKey);
134            }
135    
136            /**
137            * Returns the node ID of this wiki page resource.
138            *
139            * @return the node ID of this wiki page resource
140            */
141            public long getNodeId() {
142                    return _wikiPageResource.getNodeId();
143            }
144    
145            /**
146            * Sets the node ID of this wiki page resource.
147            *
148            * @param nodeId the node ID of this wiki page resource
149            */
150            public void setNodeId(long nodeId) {
151                    _wikiPageResource.setNodeId(nodeId);
152            }
153    
154            /**
155            * Returns the title of this wiki page resource.
156            *
157            * @return the title of this wiki page resource
158            */
159            public java.lang.String getTitle() {
160                    return _wikiPageResource.getTitle();
161            }
162    
163            /**
164            * Sets the title of this wiki page resource.
165            *
166            * @param title the title of this wiki page resource
167            */
168            public void setTitle(java.lang.String title) {
169                    _wikiPageResource.setTitle(title);
170            }
171    
172            public boolean isNew() {
173                    return _wikiPageResource.isNew();
174            }
175    
176            public void setNew(boolean n) {
177                    _wikiPageResource.setNew(n);
178            }
179    
180            public boolean isCachedModel() {
181                    return _wikiPageResource.isCachedModel();
182            }
183    
184            public void setCachedModel(boolean cachedModel) {
185                    _wikiPageResource.setCachedModel(cachedModel);
186            }
187    
188            public boolean isEscapedModel() {
189                    return _wikiPageResource.isEscapedModel();
190            }
191    
192            public java.io.Serializable getPrimaryKeyObj() {
193                    return _wikiPageResource.getPrimaryKeyObj();
194            }
195    
196            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
197                    _wikiPageResource.setPrimaryKeyObj(primaryKeyObj);
198            }
199    
200            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
201                    return _wikiPageResource.getExpandoBridge();
202            }
203    
204            public void setExpandoBridgeAttributes(
205                    com.liferay.portal.service.ServiceContext serviceContext) {
206                    _wikiPageResource.setExpandoBridgeAttributes(serviceContext);
207            }
208    
209            @Override
210            public java.lang.Object clone() {
211                    return new WikiPageResourceWrapper((WikiPageResource)_wikiPageResource.clone());
212            }
213    
214            public int compareTo(
215                    com.liferay.portlet.wiki.model.WikiPageResource wikiPageResource) {
216                    return _wikiPageResource.compareTo(wikiPageResource);
217            }
218    
219            @Override
220            public int hashCode() {
221                    return _wikiPageResource.hashCode();
222            }
223    
224            public com.liferay.portal.model.CacheModel<com.liferay.portlet.wiki.model.WikiPageResource> toCacheModel() {
225                    return _wikiPageResource.toCacheModel();
226            }
227    
228            public com.liferay.portlet.wiki.model.WikiPageResource toEscapedModel() {
229                    return new WikiPageResourceWrapper(_wikiPageResource.toEscapedModel());
230            }
231    
232            public com.liferay.portlet.wiki.model.WikiPageResource toUnescapedModel() {
233                    return new WikiPageResourceWrapper(_wikiPageResource.toUnescapedModel());
234            }
235    
236            @Override
237            public java.lang.String toString() {
238                    return _wikiPageResource.toString();
239            }
240    
241            public java.lang.String toXmlString() {
242                    return _wikiPageResource.toXmlString();
243            }
244    
245            public void persist()
246                    throws com.liferay.portal.kernel.exception.SystemException {
247                    _wikiPageResource.persist();
248            }
249    
250            /**
251             * @deprecated Renamed to {@link #getWrappedModel}
252             */
253            public WikiPageResource getWrappedWikiPageResource() {
254                    return _wikiPageResource;
255            }
256    
257            public WikiPageResource getWrappedModel() {
258                    return _wikiPageResource;
259            }
260    
261            public void resetOriginalValues() {
262                    _wikiPageResource.resetOriginalValues();
263            }
264    
265            private WikiPageResource _wikiPageResource;
266    }