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