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