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