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