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.Date;
021    import java.util.HashMap;
022    import java.util.Map;
023    
024    /**
025     * <p>
026     * This class is a wrapper for {@link SCProductVersion}.
027     * </p>
028     *
029     * @author    Brian Wing Shun Chan
030     * @see       SCProductVersion
031     * @generated
032     */
033    public class SCProductVersionWrapper implements SCProductVersion,
034            ModelWrapper<SCProductVersion> {
035            public SCProductVersionWrapper(SCProductVersion scProductVersion) {
036                    _scProductVersion = scProductVersion;
037            }
038    
039            public Class<?> getModelClass() {
040                    return SCProductVersion.class;
041            }
042    
043            public String getModelClassName() {
044                    return SCProductVersion.class.getName();
045            }
046    
047            public Map<String, Object> getModelAttributes() {
048                    Map<String, Object> attributes = new HashMap<String, Object>();
049    
050                    attributes.put("productVersionId", getProductVersionId());
051                    attributes.put("companyId", getCompanyId());
052                    attributes.put("userId", getUserId());
053                    attributes.put("userName", getUserName());
054                    attributes.put("createDate", getCreateDate());
055                    attributes.put("modifiedDate", getModifiedDate());
056                    attributes.put("productEntryId", getProductEntryId());
057                    attributes.put("version", getVersion());
058                    attributes.put("changeLog", getChangeLog());
059                    attributes.put("downloadPageURL", getDownloadPageURL());
060                    attributes.put("directDownloadURL", getDirectDownloadURL());
061                    attributes.put("repoStoreArtifact", getRepoStoreArtifact());
062    
063                    return attributes;
064            }
065    
066            public void setModelAttributes(Map<String, Object> attributes) {
067                    Long productVersionId = (Long)attributes.get("productVersionId");
068    
069                    if (productVersionId != null) {
070                            setProductVersionId(productVersionId);
071                    }
072    
073                    Long companyId = (Long)attributes.get("companyId");
074    
075                    if (companyId != null) {
076                            setCompanyId(companyId);
077                    }
078    
079                    Long userId = (Long)attributes.get("userId");
080    
081                    if (userId != null) {
082                            setUserId(userId);
083                    }
084    
085                    String userName = (String)attributes.get("userName");
086    
087                    if (userName != null) {
088                            setUserName(userName);
089                    }
090    
091                    Date createDate = (Date)attributes.get("createDate");
092    
093                    if (createDate != null) {
094                            setCreateDate(createDate);
095                    }
096    
097                    Date modifiedDate = (Date)attributes.get("modifiedDate");
098    
099                    if (modifiedDate != null) {
100                            setModifiedDate(modifiedDate);
101                    }
102    
103                    Long productEntryId = (Long)attributes.get("productEntryId");
104    
105                    if (productEntryId != null) {
106                            setProductEntryId(productEntryId);
107                    }
108    
109                    String version = (String)attributes.get("version");
110    
111                    if (version != null) {
112                            setVersion(version);
113                    }
114    
115                    String changeLog = (String)attributes.get("changeLog");
116    
117                    if (changeLog != null) {
118                            setChangeLog(changeLog);
119                    }
120    
121                    String downloadPageURL = (String)attributes.get("downloadPageURL");
122    
123                    if (downloadPageURL != null) {
124                            setDownloadPageURL(downloadPageURL);
125                    }
126    
127                    String directDownloadURL = (String)attributes.get("directDownloadURL");
128    
129                    if (directDownloadURL != null) {
130                            setDirectDownloadURL(directDownloadURL);
131                    }
132    
133                    Boolean repoStoreArtifact = (Boolean)attributes.get("repoStoreArtifact");
134    
135                    if (repoStoreArtifact != null) {
136                            setRepoStoreArtifact(repoStoreArtifact);
137                    }
138            }
139    
140            /**
141            * Returns the primary key of this s c product version.
142            *
143            * @return the primary key of this s c product version
144            */
145            public long getPrimaryKey() {
146                    return _scProductVersion.getPrimaryKey();
147            }
148    
149            /**
150            * Sets the primary key of this s c product version.
151            *
152            * @param primaryKey the primary key of this s c product version
153            */
154            public void setPrimaryKey(long primaryKey) {
155                    _scProductVersion.setPrimaryKey(primaryKey);
156            }
157    
158            /**
159            * Returns the product version ID of this s c product version.
160            *
161            * @return the product version ID of this s c product version
162            */
163            public long getProductVersionId() {
164                    return _scProductVersion.getProductVersionId();
165            }
166    
167            /**
168            * Sets the product version ID of this s c product version.
169            *
170            * @param productVersionId the product version ID of this s c product version
171            */
172            public void setProductVersionId(long productVersionId) {
173                    _scProductVersion.setProductVersionId(productVersionId);
174            }
175    
176            /**
177            * Returns the company ID of this s c product version.
178            *
179            * @return the company ID of this s c product version
180            */
181            public long getCompanyId() {
182                    return _scProductVersion.getCompanyId();
183            }
184    
185            /**
186            * Sets the company ID of this s c product version.
187            *
188            * @param companyId the company ID of this s c product version
189            */
190            public void setCompanyId(long companyId) {
191                    _scProductVersion.setCompanyId(companyId);
192            }
193    
194            /**
195            * Returns the user ID of this s c product version.
196            *
197            * @return the user ID of this s c product version
198            */
199            public long getUserId() {
200                    return _scProductVersion.getUserId();
201            }
202    
203            /**
204            * Sets the user ID of this s c product version.
205            *
206            * @param userId the user ID of this s c product version
207            */
208            public void setUserId(long userId) {
209                    _scProductVersion.setUserId(userId);
210            }
211    
212            /**
213            * Returns the user uuid of this s c product version.
214            *
215            * @return the user uuid of this s c product version
216            * @throws SystemException if a system exception occurred
217            */
218            public java.lang.String getUserUuid()
219                    throws com.liferay.portal.kernel.exception.SystemException {
220                    return _scProductVersion.getUserUuid();
221            }
222    
223            /**
224            * Sets the user uuid of this s c product version.
225            *
226            * @param userUuid the user uuid of this s c product version
227            */
228            public void setUserUuid(java.lang.String userUuid) {
229                    _scProductVersion.setUserUuid(userUuid);
230            }
231    
232            /**
233            * Returns the user name of this s c product version.
234            *
235            * @return the user name of this s c product version
236            */
237            public java.lang.String getUserName() {
238                    return _scProductVersion.getUserName();
239            }
240    
241            /**
242            * Sets the user name of this s c product version.
243            *
244            * @param userName the user name of this s c product version
245            */
246            public void setUserName(java.lang.String userName) {
247                    _scProductVersion.setUserName(userName);
248            }
249    
250            /**
251            * Returns the create date of this s c product version.
252            *
253            * @return the create date of this s c product version
254            */
255            public java.util.Date getCreateDate() {
256                    return _scProductVersion.getCreateDate();
257            }
258    
259            /**
260            * Sets the create date of this s c product version.
261            *
262            * @param createDate the create date of this s c product version
263            */
264            public void setCreateDate(java.util.Date createDate) {
265                    _scProductVersion.setCreateDate(createDate);
266            }
267    
268            /**
269            * Returns the modified date of this s c product version.
270            *
271            * @return the modified date of this s c product version
272            */
273            public java.util.Date getModifiedDate() {
274                    return _scProductVersion.getModifiedDate();
275            }
276    
277            /**
278            * Sets the modified date of this s c product version.
279            *
280            * @param modifiedDate the modified date of this s c product version
281            */
282            public void setModifiedDate(java.util.Date modifiedDate) {
283                    _scProductVersion.setModifiedDate(modifiedDate);
284            }
285    
286            /**
287            * Returns the product entry ID of this s c product version.
288            *
289            * @return the product entry ID of this s c product version
290            */
291            public long getProductEntryId() {
292                    return _scProductVersion.getProductEntryId();
293            }
294    
295            /**
296            * Sets the product entry ID of this s c product version.
297            *
298            * @param productEntryId the product entry ID of this s c product version
299            */
300            public void setProductEntryId(long productEntryId) {
301                    _scProductVersion.setProductEntryId(productEntryId);
302            }
303    
304            /**
305            * Returns the version of this s c product version.
306            *
307            * @return the version of this s c product version
308            */
309            public java.lang.String getVersion() {
310                    return _scProductVersion.getVersion();
311            }
312    
313            /**
314            * Sets the version of this s c product version.
315            *
316            * @param version the version of this s c product version
317            */
318            public void setVersion(java.lang.String version) {
319                    _scProductVersion.setVersion(version);
320            }
321    
322            /**
323            * Returns the change log of this s c product version.
324            *
325            * @return the change log of this s c product version
326            */
327            public java.lang.String getChangeLog() {
328                    return _scProductVersion.getChangeLog();
329            }
330    
331            /**
332            * Sets the change log of this s c product version.
333            *
334            * @param changeLog the change log of this s c product version
335            */
336            public void setChangeLog(java.lang.String changeLog) {
337                    _scProductVersion.setChangeLog(changeLog);
338            }
339    
340            /**
341            * Returns the download page u r l of this s c product version.
342            *
343            * @return the download page u r l of this s c product version
344            */
345            public java.lang.String getDownloadPageURL() {
346                    return _scProductVersion.getDownloadPageURL();
347            }
348    
349            /**
350            * Sets the download page u r l of this s c product version.
351            *
352            * @param downloadPageURL the download page u r l of this s c product version
353            */
354            public void setDownloadPageURL(java.lang.String downloadPageURL) {
355                    _scProductVersion.setDownloadPageURL(downloadPageURL);
356            }
357    
358            /**
359            * Returns the direct download u r l of this s c product version.
360            *
361            * @return the direct download u r l of this s c product version
362            */
363            public java.lang.String getDirectDownloadURL() {
364                    return _scProductVersion.getDirectDownloadURL();
365            }
366    
367            /**
368            * Sets the direct download u r l of this s c product version.
369            *
370            * @param directDownloadURL the direct download u r l of this s c product version
371            */
372            public void setDirectDownloadURL(java.lang.String directDownloadURL) {
373                    _scProductVersion.setDirectDownloadURL(directDownloadURL);
374            }
375    
376            /**
377            * Returns the repo store artifact of this s c product version.
378            *
379            * @return the repo store artifact of this s c product version
380            */
381            public boolean getRepoStoreArtifact() {
382                    return _scProductVersion.getRepoStoreArtifact();
383            }
384    
385            /**
386            * Returns <code>true</code> if this s c product version is repo store artifact.
387            *
388            * @return <code>true</code> if this s c product version is repo store artifact; <code>false</code> otherwise
389            */
390            public boolean isRepoStoreArtifact() {
391                    return _scProductVersion.isRepoStoreArtifact();
392            }
393    
394            /**
395            * Sets whether this s c product version is repo store artifact.
396            *
397            * @param repoStoreArtifact the repo store artifact of this s c product version
398            */
399            public void setRepoStoreArtifact(boolean repoStoreArtifact) {
400                    _scProductVersion.setRepoStoreArtifact(repoStoreArtifact);
401            }
402    
403            public boolean isNew() {
404                    return _scProductVersion.isNew();
405            }
406    
407            public void setNew(boolean n) {
408                    _scProductVersion.setNew(n);
409            }
410    
411            public boolean isCachedModel() {
412                    return _scProductVersion.isCachedModel();
413            }
414    
415            public void setCachedModel(boolean cachedModel) {
416                    _scProductVersion.setCachedModel(cachedModel);
417            }
418    
419            public boolean isEscapedModel() {
420                    return _scProductVersion.isEscapedModel();
421            }
422    
423            public java.io.Serializable getPrimaryKeyObj() {
424                    return _scProductVersion.getPrimaryKeyObj();
425            }
426    
427            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
428                    _scProductVersion.setPrimaryKeyObj(primaryKeyObj);
429            }
430    
431            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
432                    return _scProductVersion.getExpandoBridge();
433            }
434    
435            public void setExpandoBridgeAttributes(
436                    com.liferay.portal.service.ServiceContext serviceContext) {
437                    _scProductVersion.setExpandoBridgeAttributes(serviceContext);
438            }
439    
440            @Override
441            public java.lang.Object clone() {
442                    return new SCProductVersionWrapper((SCProductVersion)_scProductVersion.clone());
443            }
444    
445            public int compareTo(
446                    com.liferay.portlet.softwarecatalog.model.SCProductVersion scProductVersion) {
447                    return _scProductVersion.compareTo(scProductVersion);
448            }
449    
450            @Override
451            public int hashCode() {
452                    return _scProductVersion.hashCode();
453            }
454    
455            public com.liferay.portal.model.CacheModel<com.liferay.portlet.softwarecatalog.model.SCProductVersion> toCacheModel() {
456                    return _scProductVersion.toCacheModel();
457            }
458    
459            public com.liferay.portlet.softwarecatalog.model.SCProductVersion toEscapedModel() {
460                    return new SCProductVersionWrapper(_scProductVersion.toEscapedModel());
461            }
462    
463            public com.liferay.portlet.softwarecatalog.model.SCProductVersion toUnescapedModel() {
464                    return new SCProductVersionWrapper(_scProductVersion.toUnescapedModel());
465            }
466    
467            @Override
468            public java.lang.String toString() {
469                    return _scProductVersion.toString();
470            }
471    
472            public java.lang.String toXmlString() {
473                    return _scProductVersion.toXmlString();
474            }
475    
476            public void persist()
477                    throws com.liferay.portal.kernel.exception.SystemException {
478                    _scProductVersion.persist();
479            }
480    
481            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> getFrameworkVersions()
482                    throws com.liferay.portal.kernel.exception.SystemException {
483                    return _scProductVersion.getFrameworkVersions();
484            }
485    
486            public com.liferay.portlet.softwarecatalog.model.SCProductEntry getProductEntry() {
487                    return _scProductVersion.getProductEntry();
488            }
489    
490            @Override
491            public boolean equals(Object obj) {
492                    if (this == obj) {
493                            return true;
494                    }
495    
496                    if (!(obj instanceof SCProductVersionWrapper)) {
497                            return false;
498                    }
499    
500                    SCProductVersionWrapper scProductVersionWrapper = (SCProductVersionWrapper)obj;
501    
502                    if (Validator.equals(_scProductVersion,
503                                            scProductVersionWrapper._scProductVersion)) {
504                            return true;
505                    }
506    
507                    return false;
508            }
509    
510            /**
511             * @deprecated Renamed to {@link #getWrappedModel}
512             */
513            public SCProductVersion getWrappedSCProductVersion() {
514                    return _scProductVersion;
515            }
516    
517            public SCProductVersion getWrappedModel() {
518                    return _scProductVersion;
519            }
520    
521            public void resetOriginalValues() {
522                    _scProductVersion.resetOriginalValues();
523            }
524    
525            private SCProductVersion _scProductVersion;
526    }