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.journal.model;
016    
017    import com.liferay.portal.kernel.util.Validator;
018    import com.liferay.portal.model.ModelWrapper;
019    
020    import java.util.HashMap;
021    import java.util.Map;
022    
023    /**
024     * <p>
025     * This class is a wrapper for {@link JournalArticleImage}.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       JournalArticleImage
030     * @generated
031     */
032    public class JournalArticleImageWrapper implements JournalArticleImage,
033            ModelWrapper<JournalArticleImage> {
034            public JournalArticleImageWrapper(JournalArticleImage journalArticleImage) {
035                    _journalArticleImage = journalArticleImage;
036            }
037    
038            public Class<?> getModelClass() {
039                    return JournalArticleImage.class;
040            }
041    
042            public String getModelClassName() {
043                    return JournalArticleImage.class.getName();
044            }
045    
046            public Map<String, Object> getModelAttributes() {
047                    Map<String, Object> attributes = new HashMap<String, Object>();
048    
049                    attributes.put("articleImageId", getArticleImageId());
050                    attributes.put("groupId", getGroupId());
051                    attributes.put("articleId", getArticleId());
052                    attributes.put("version", getVersion());
053                    attributes.put("elInstanceId", getElInstanceId());
054                    attributes.put("elName", getElName());
055                    attributes.put("languageId", getLanguageId());
056                    attributes.put("tempImage", getTempImage());
057    
058                    return attributes;
059            }
060    
061            public void setModelAttributes(Map<String, Object> attributes) {
062                    Long articleImageId = (Long)attributes.get("articleImageId");
063    
064                    if (articleImageId != null) {
065                            setArticleImageId(articleImageId);
066                    }
067    
068                    Long groupId = (Long)attributes.get("groupId");
069    
070                    if (groupId != null) {
071                            setGroupId(groupId);
072                    }
073    
074                    String articleId = (String)attributes.get("articleId");
075    
076                    if (articleId != null) {
077                            setArticleId(articleId);
078                    }
079    
080                    Double version = (Double)attributes.get("version");
081    
082                    if (version != null) {
083                            setVersion(version);
084                    }
085    
086                    String elInstanceId = (String)attributes.get("elInstanceId");
087    
088                    if (elInstanceId != null) {
089                            setElInstanceId(elInstanceId);
090                    }
091    
092                    String elName = (String)attributes.get("elName");
093    
094                    if (elName != null) {
095                            setElName(elName);
096                    }
097    
098                    String languageId = (String)attributes.get("languageId");
099    
100                    if (languageId != null) {
101                            setLanguageId(languageId);
102                    }
103    
104                    Boolean tempImage = (Boolean)attributes.get("tempImage");
105    
106                    if (tempImage != null) {
107                            setTempImage(tempImage);
108                    }
109            }
110    
111            /**
112            * Returns the primary key of this journal article image.
113            *
114            * @return the primary key of this journal article image
115            */
116            public long getPrimaryKey() {
117                    return _journalArticleImage.getPrimaryKey();
118            }
119    
120            /**
121            * Sets the primary key of this journal article image.
122            *
123            * @param primaryKey the primary key of this journal article image
124            */
125            public void setPrimaryKey(long primaryKey) {
126                    _journalArticleImage.setPrimaryKey(primaryKey);
127            }
128    
129            /**
130            * Returns the article image ID of this journal article image.
131            *
132            * @return the article image ID of this journal article image
133            */
134            public long getArticleImageId() {
135                    return _journalArticleImage.getArticleImageId();
136            }
137    
138            /**
139            * Sets the article image ID of this journal article image.
140            *
141            * @param articleImageId the article image ID of this journal article image
142            */
143            public void setArticleImageId(long articleImageId) {
144                    _journalArticleImage.setArticleImageId(articleImageId);
145            }
146    
147            /**
148            * Returns the group ID of this journal article image.
149            *
150            * @return the group ID of this journal article image
151            */
152            public long getGroupId() {
153                    return _journalArticleImage.getGroupId();
154            }
155    
156            /**
157            * Sets the group ID of this journal article image.
158            *
159            * @param groupId the group ID of this journal article image
160            */
161            public void setGroupId(long groupId) {
162                    _journalArticleImage.setGroupId(groupId);
163            }
164    
165            /**
166            * Returns the article ID of this journal article image.
167            *
168            * @return the article ID of this journal article image
169            */
170            public java.lang.String getArticleId() {
171                    return _journalArticleImage.getArticleId();
172            }
173    
174            /**
175            * Sets the article ID of this journal article image.
176            *
177            * @param articleId the article ID of this journal article image
178            */
179            public void setArticleId(java.lang.String articleId) {
180                    _journalArticleImage.setArticleId(articleId);
181            }
182    
183            /**
184            * Returns the version of this journal article image.
185            *
186            * @return the version of this journal article image
187            */
188            public double getVersion() {
189                    return _journalArticleImage.getVersion();
190            }
191    
192            /**
193            * Sets the version of this journal article image.
194            *
195            * @param version the version of this journal article image
196            */
197            public void setVersion(double version) {
198                    _journalArticleImage.setVersion(version);
199            }
200    
201            /**
202            * Returns the el instance ID of this journal article image.
203            *
204            * @return the el instance ID of this journal article image
205            */
206            public java.lang.String getElInstanceId() {
207                    return _journalArticleImage.getElInstanceId();
208            }
209    
210            /**
211            * Sets the el instance ID of this journal article image.
212            *
213            * @param elInstanceId the el instance ID of this journal article image
214            */
215            public void setElInstanceId(java.lang.String elInstanceId) {
216                    _journalArticleImage.setElInstanceId(elInstanceId);
217            }
218    
219            /**
220            * Returns the el name of this journal article image.
221            *
222            * @return the el name of this journal article image
223            */
224            public java.lang.String getElName() {
225                    return _journalArticleImage.getElName();
226            }
227    
228            /**
229            * Sets the el name of this journal article image.
230            *
231            * @param elName the el name of this journal article image
232            */
233            public void setElName(java.lang.String elName) {
234                    _journalArticleImage.setElName(elName);
235            }
236    
237            /**
238            * Returns the language ID of this journal article image.
239            *
240            * @return the language ID of this journal article image
241            */
242            public java.lang.String getLanguageId() {
243                    return _journalArticleImage.getLanguageId();
244            }
245    
246            /**
247            * Sets the language ID of this journal article image.
248            *
249            * @param languageId the language ID of this journal article image
250            */
251            public void setLanguageId(java.lang.String languageId) {
252                    _journalArticleImage.setLanguageId(languageId);
253            }
254    
255            /**
256            * Returns the temp image of this journal article image.
257            *
258            * @return the temp image of this journal article image
259            */
260            public boolean getTempImage() {
261                    return _journalArticleImage.getTempImage();
262            }
263    
264            /**
265            * Returns <code>true</code> if this journal article image is temp image.
266            *
267            * @return <code>true</code> if this journal article image is temp image; <code>false</code> otherwise
268            */
269            public boolean isTempImage() {
270                    return _journalArticleImage.isTempImage();
271            }
272    
273            /**
274            * Sets whether this journal article image is temp image.
275            *
276            * @param tempImage the temp image of this journal article image
277            */
278            public void setTempImage(boolean tempImage) {
279                    _journalArticleImage.setTempImage(tempImage);
280            }
281    
282            public boolean isNew() {
283                    return _journalArticleImage.isNew();
284            }
285    
286            public void setNew(boolean n) {
287                    _journalArticleImage.setNew(n);
288            }
289    
290            public boolean isCachedModel() {
291                    return _journalArticleImage.isCachedModel();
292            }
293    
294            public void setCachedModel(boolean cachedModel) {
295                    _journalArticleImage.setCachedModel(cachedModel);
296            }
297    
298            public boolean isEscapedModel() {
299                    return _journalArticleImage.isEscapedModel();
300            }
301    
302            public java.io.Serializable getPrimaryKeyObj() {
303                    return _journalArticleImage.getPrimaryKeyObj();
304            }
305    
306            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
307                    _journalArticleImage.setPrimaryKeyObj(primaryKeyObj);
308            }
309    
310            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
311                    return _journalArticleImage.getExpandoBridge();
312            }
313    
314            public void setExpandoBridgeAttributes(
315                    com.liferay.portal.service.ServiceContext serviceContext) {
316                    _journalArticleImage.setExpandoBridgeAttributes(serviceContext);
317            }
318    
319            @Override
320            public java.lang.Object clone() {
321                    return new JournalArticleImageWrapper((JournalArticleImage)_journalArticleImage.clone());
322            }
323    
324            public int compareTo(
325                    com.liferay.portlet.journal.model.JournalArticleImage journalArticleImage) {
326                    return _journalArticleImage.compareTo(journalArticleImage);
327            }
328    
329            @Override
330            public int hashCode() {
331                    return _journalArticleImage.hashCode();
332            }
333    
334            public com.liferay.portal.model.CacheModel<com.liferay.portlet.journal.model.JournalArticleImage> toCacheModel() {
335                    return _journalArticleImage.toCacheModel();
336            }
337    
338            public com.liferay.portlet.journal.model.JournalArticleImage toEscapedModel() {
339                    return new JournalArticleImageWrapper(_journalArticleImage.toEscapedModel());
340            }
341    
342            public com.liferay.portlet.journal.model.JournalArticleImage toUnescapedModel() {
343                    return new JournalArticleImageWrapper(_journalArticleImage.toUnescapedModel());
344            }
345    
346            @Override
347            public java.lang.String toString() {
348                    return _journalArticleImage.toString();
349            }
350    
351            public java.lang.String toXmlString() {
352                    return _journalArticleImage.toXmlString();
353            }
354    
355            public void persist()
356                    throws com.liferay.portal.kernel.exception.SystemException {
357                    _journalArticleImage.persist();
358            }
359    
360            @Override
361            public boolean equals(Object obj) {
362                    if (this == obj) {
363                            return true;
364                    }
365    
366                    if (!(obj instanceof JournalArticleImageWrapper)) {
367                            return false;
368                    }
369    
370                    JournalArticleImageWrapper journalArticleImageWrapper = (JournalArticleImageWrapper)obj;
371    
372                    if (Validator.equals(_journalArticleImage,
373                                            journalArticleImageWrapper._journalArticleImage)) {
374                            return true;
375                    }
376    
377                    return false;
378            }
379    
380            /**
381             * @deprecated Renamed to {@link #getWrappedModel}
382             */
383            public JournalArticleImage getWrappedJournalArticleImage() {
384                    return _journalArticleImage;
385            }
386    
387            public JournalArticleImage getWrappedModel() {
388                    return _journalArticleImage;
389            }
390    
391            public void resetOriginalValues() {
392                    _journalArticleImage.resetOriginalValues();
393            }
394    
395            private JournalArticleImage _journalArticleImage;
396    }