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