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