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