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