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