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.softwarecatalog.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 SCProductScreenshot}.
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see SCProductScreenshot
032     * @generated
033     */
034    @ProviderType
035    public class SCProductScreenshotWrapper implements SCProductScreenshot,
036            ModelWrapper<SCProductScreenshot> {
037            public SCProductScreenshotWrapper(SCProductScreenshot scProductScreenshot) {
038                    _scProductScreenshot = scProductScreenshot;
039            }
040    
041            @Override
042            public Class<?> getModelClass() {
043                    return SCProductScreenshot.class;
044            }
045    
046            @Override
047            public String getModelClassName() {
048                    return SCProductScreenshot.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("productScreenshotId", getProductScreenshotId());
056                    attributes.put("companyId", getCompanyId());
057                    attributes.put("groupId", getGroupId());
058                    attributes.put("productEntryId", getProductEntryId());
059                    attributes.put("thumbnailId", getThumbnailId());
060                    attributes.put("fullImageId", getFullImageId());
061                    attributes.put("priority", getPriority());
062    
063                    return attributes;
064            }
065    
066            @Override
067            public void setModelAttributes(Map<String, Object> attributes) {
068                    Long productScreenshotId = (Long)attributes.get("productScreenshotId");
069    
070                    if (productScreenshotId != null) {
071                            setProductScreenshotId(productScreenshotId);
072                    }
073    
074                    Long companyId = (Long)attributes.get("companyId");
075    
076                    if (companyId != null) {
077                            setCompanyId(companyId);
078                    }
079    
080                    Long groupId = (Long)attributes.get("groupId");
081    
082                    if (groupId != null) {
083                            setGroupId(groupId);
084                    }
085    
086                    Long productEntryId = (Long)attributes.get("productEntryId");
087    
088                    if (productEntryId != null) {
089                            setProductEntryId(productEntryId);
090                    }
091    
092                    Long thumbnailId = (Long)attributes.get("thumbnailId");
093    
094                    if (thumbnailId != null) {
095                            setThumbnailId(thumbnailId);
096                    }
097    
098                    Long fullImageId = (Long)attributes.get("fullImageId");
099    
100                    if (fullImageId != null) {
101                            setFullImageId(fullImageId);
102                    }
103    
104                    Integer priority = (Integer)attributes.get("priority");
105    
106                    if (priority != null) {
107                            setPriority(priority);
108                    }
109            }
110    
111            @Override
112            public java.lang.Object clone() {
113                    return new SCProductScreenshotWrapper((SCProductScreenshot)_scProductScreenshot.clone());
114            }
115    
116            @Override
117            public int compareTo(
118                    com.liferay.portlet.softwarecatalog.model.SCProductScreenshot scProductScreenshot) {
119                    return _scProductScreenshot.compareTo(scProductScreenshot);
120            }
121    
122            /**
123            * Returns the company ID of this s c product screenshot.
124            *
125            * @return the company ID of this s c product screenshot
126            */
127            @Override
128            public long getCompanyId() {
129                    return _scProductScreenshot.getCompanyId();
130            }
131    
132            @Override
133            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
134                    return _scProductScreenshot.getExpandoBridge();
135            }
136    
137            /**
138            * Returns the full image ID of this s c product screenshot.
139            *
140            * @return the full image ID of this s c product screenshot
141            */
142            @Override
143            public long getFullImageId() {
144                    return _scProductScreenshot.getFullImageId();
145            }
146    
147            /**
148            * Returns the group ID of this s c product screenshot.
149            *
150            * @return the group ID of this s c product screenshot
151            */
152            @Override
153            public long getGroupId() {
154                    return _scProductScreenshot.getGroupId();
155            }
156    
157            /**
158            * Returns the primary key of this s c product screenshot.
159            *
160            * @return the primary key of this s c product screenshot
161            */
162            @Override
163            public long getPrimaryKey() {
164                    return _scProductScreenshot.getPrimaryKey();
165            }
166    
167            @Override
168            public java.io.Serializable getPrimaryKeyObj() {
169                    return _scProductScreenshot.getPrimaryKeyObj();
170            }
171    
172            /**
173            * Returns the priority of this s c product screenshot.
174            *
175            * @return the priority of this s c product screenshot
176            */
177            @Override
178            public int getPriority() {
179                    return _scProductScreenshot.getPriority();
180            }
181    
182            /**
183            * Returns the product entry ID of this s c product screenshot.
184            *
185            * @return the product entry ID of this s c product screenshot
186            */
187            @Override
188            public long getProductEntryId() {
189                    return _scProductScreenshot.getProductEntryId();
190            }
191    
192            /**
193            * Returns the product screenshot ID of this s c product screenshot.
194            *
195            * @return the product screenshot ID of this s c product screenshot
196            */
197            @Override
198            public long getProductScreenshotId() {
199                    return _scProductScreenshot.getProductScreenshotId();
200            }
201    
202            /**
203            * Returns the thumbnail ID of this s c product screenshot.
204            *
205            * @return the thumbnail ID of this s c product screenshot
206            */
207            @Override
208            public long getThumbnailId() {
209                    return _scProductScreenshot.getThumbnailId();
210            }
211    
212            @Override
213            public int hashCode() {
214                    return _scProductScreenshot.hashCode();
215            }
216    
217            @Override
218            public boolean isCachedModel() {
219                    return _scProductScreenshot.isCachedModel();
220            }
221    
222            @Override
223            public boolean isEscapedModel() {
224                    return _scProductScreenshot.isEscapedModel();
225            }
226    
227            @Override
228            public boolean isNew() {
229                    return _scProductScreenshot.isNew();
230            }
231    
232            @Override
233            public void persist() {
234                    _scProductScreenshot.persist();
235            }
236    
237            @Override
238            public void setCachedModel(boolean cachedModel) {
239                    _scProductScreenshot.setCachedModel(cachedModel);
240            }
241    
242            /**
243            * Sets the company ID of this s c product screenshot.
244            *
245            * @param companyId the company ID of this s c product screenshot
246            */
247            @Override
248            public void setCompanyId(long companyId) {
249                    _scProductScreenshot.setCompanyId(companyId);
250            }
251    
252            @Override
253            public void setExpandoBridgeAttributes(
254                    com.liferay.portal.model.BaseModel<?> baseModel) {
255                    _scProductScreenshot.setExpandoBridgeAttributes(baseModel);
256            }
257    
258            @Override
259            public void setExpandoBridgeAttributes(
260                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
261                    _scProductScreenshot.setExpandoBridgeAttributes(expandoBridge);
262            }
263    
264            @Override
265            public void setExpandoBridgeAttributes(
266                    com.liferay.portal.service.ServiceContext serviceContext) {
267                    _scProductScreenshot.setExpandoBridgeAttributes(serviceContext);
268            }
269    
270            /**
271            * Sets the full image ID of this s c product screenshot.
272            *
273            * @param fullImageId the full image ID of this s c product screenshot
274            */
275            @Override
276            public void setFullImageId(long fullImageId) {
277                    _scProductScreenshot.setFullImageId(fullImageId);
278            }
279    
280            /**
281            * Sets the group ID of this s c product screenshot.
282            *
283            * @param groupId the group ID of this s c product screenshot
284            */
285            @Override
286            public void setGroupId(long groupId) {
287                    _scProductScreenshot.setGroupId(groupId);
288            }
289    
290            @Override
291            public void setNew(boolean n) {
292                    _scProductScreenshot.setNew(n);
293            }
294    
295            /**
296            * Sets the primary key of this s c product screenshot.
297            *
298            * @param primaryKey the primary key of this s c product screenshot
299            */
300            @Override
301            public void setPrimaryKey(long primaryKey) {
302                    _scProductScreenshot.setPrimaryKey(primaryKey);
303            }
304    
305            @Override
306            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
307                    _scProductScreenshot.setPrimaryKeyObj(primaryKeyObj);
308            }
309    
310            /**
311            * Sets the priority of this s c product screenshot.
312            *
313            * @param priority the priority of this s c product screenshot
314            */
315            @Override
316            public void setPriority(int priority) {
317                    _scProductScreenshot.setPriority(priority);
318            }
319    
320            /**
321            * Sets the product entry ID of this s c product screenshot.
322            *
323            * @param productEntryId the product entry ID of this s c product screenshot
324            */
325            @Override
326            public void setProductEntryId(long productEntryId) {
327                    _scProductScreenshot.setProductEntryId(productEntryId);
328            }
329    
330            /**
331            * Sets the product screenshot ID of this s c product screenshot.
332            *
333            * @param productScreenshotId the product screenshot ID of this s c product screenshot
334            */
335            @Override
336            public void setProductScreenshotId(long productScreenshotId) {
337                    _scProductScreenshot.setProductScreenshotId(productScreenshotId);
338            }
339    
340            /**
341            * Sets the thumbnail ID of this s c product screenshot.
342            *
343            * @param thumbnailId the thumbnail ID of this s c product screenshot
344            */
345            @Override
346            public void setThumbnailId(long thumbnailId) {
347                    _scProductScreenshot.setThumbnailId(thumbnailId);
348            }
349    
350            @Override
351            public com.liferay.portal.model.CacheModel<com.liferay.portlet.softwarecatalog.model.SCProductScreenshot> toCacheModel() {
352                    return _scProductScreenshot.toCacheModel();
353            }
354    
355            @Override
356            public com.liferay.portlet.softwarecatalog.model.SCProductScreenshot toEscapedModel() {
357                    return new SCProductScreenshotWrapper(_scProductScreenshot.toEscapedModel());
358            }
359    
360            @Override
361            public java.lang.String toString() {
362                    return _scProductScreenshot.toString();
363            }
364    
365            @Override
366            public com.liferay.portlet.softwarecatalog.model.SCProductScreenshot toUnescapedModel() {
367                    return new SCProductScreenshotWrapper(_scProductScreenshot.toUnescapedModel());
368            }
369    
370            @Override
371            public java.lang.String toXmlString() {
372                    return _scProductScreenshot.toXmlString();
373            }
374    
375            @Override
376            public boolean equals(Object obj) {
377                    if (this == obj) {
378                            return true;
379                    }
380    
381                    if (!(obj instanceof SCProductScreenshotWrapper)) {
382                            return false;
383                    }
384    
385                    SCProductScreenshotWrapper scProductScreenshotWrapper = (SCProductScreenshotWrapper)obj;
386    
387                    if (Validator.equals(_scProductScreenshot,
388                                            scProductScreenshotWrapper._scProductScreenshot)) {
389                            return true;
390                    }
391    
392                    return false;
393            }
394    
395            /**
396             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
397             */
398            @Deprecated
399            public SCProductScreenshot getWrappedSCProductScreenshot() {
400                    return _scProductScreenshot;
401            }
402    
403            @Override
404            public SCProductScreenshot getWrappedModel() {
405                    return _scProductScreenshot;
406            }
407    
408            @Override
409            public boolean isEntityCacheEnabled() {
410                    return _scProductScreenshot.isEntityCacheEnabled();
411            }
412    
413            @Override
414            public boolean isFinderCacheEnabled() {
415                    return _scProductScreenshot.isFinderCacheEnabled();
416            }
417    
418            @Override
419            public void resetOriginalValues() {
420                    _scProductScreenshot.resetOriginalValues();
421            }
422    
423            private final SCProductScreenshot _scProductScreenshot;
424    }