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