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 SCProductEntry}.
029     * </p>
030     *
031     * @author Brian Wing Shun Chan
032     * @see SCProductEntry
033     * @generated
034     */
035    @ProviderType
036    public class SCProductEntryWrapper implements SCProductEntry,
037            ModelWrapper<SCProductEntry> {
038            public SCProductEntryWrapper(SCProductEntry scProductEntry) {
039                    _scProductEntry = scProductEntry;
040            }
041    
042            @Override
043            public Class<?> getModelClass() {
044                    return SCProductEntry.class;
045            }
046    
047            @Override
048            public String getModelClassName() {
049                    return SCProductEntry.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("productEntryId", getProductEntryId());
057                    attributes.put("groupId", getGroupId());
058                    attributes.put("companyId", getCompanyId());
059                    attributes.put("userId", getUserId());
060                    attributes.put("userName", getUserName());
061                    attributes.put("createDate", getCreateDate());
062                    attributes.put("modifiedDate", getModifiedDate());
063                    attributes.put("name", getName());
064                    attributes.put("type", getType());
065                    attributes.put("tags", getTags());
066                    attributes.put("shortDescription", getShortDescription());
067                    attributes.put("longDescription", getLongDescription());
068                    attributes.put("pageURL", getPageURL());
069                    attributes.put("author", getAuthor());
070                    attributes.put("repoGroupId", getRepoGroupId());
071                    attributes.put("repoArtifactId", getRepoArtifactId());
072    
073                    return attributes;
074            }
075    
076            @Override
077            public void setModelAttributes(Map<String, Object> attributes) {
078                    Long productEntryId = (Long)attributes.get("productEntryId");
079    
080                    if (productEntryId != null) {
081                            setProductEntryId(productEntryId);
082                    }
083    
084                    Long groupId = (Long)attributes.get("groupId");
085    
086                    if (groupId != null) {
087                            setGroupId(groupId);
088                    }
089    
090                    Long companyId = (Long)attributes.get("companyId");
091    
092                    if (companyId != null) {
093                            setCompanyId(companyId);
094                    }
095    
096                    Long userId = (Long)attributes.get("userId");
097    
098                    if (userId != null) {
099                            setUserId(userId);
100                    }
101    
102                    String userName = (String)attributes.get("userName");
103    
104                    if (userName != null) {
105                            setUserName(userName);
106                    }
107    
108                    Date createDate = (Date)attributes.get("createDate");
109    
110                    if (createDate != null) {
111                            setCreateDate(createDate);
112                    }
113    
114                    Date modifiedDate = (Date)attributes.get("modifiedDate");
115    
116                    if (modifiedDate != null) {
117                            setModifiedDate(modifiedDate);
118                    }
119    
120                    String name = (String)attributes.get("name");
121    
122                    if (name != null) {
123                            setName(name);
124                    }
125    
126                    String type = (String)attributes.get("type");
127    
128                    if (type != null) {
129                            setType(type);
130                    }
131    
132                    String tags = (String)attributes.get("tags");
133    
134                    if (tags != null) {
135                            setTags(tags);
136                    }
137    
138                    String shortDescription = (String)attributes.get("shortDescription");
139    
140                    if (shortDescription != null) {
141                            setShortDescription(shortDescription);
142                    }
143    
144                    String longDescription = (String)attributes.get("longDescription");
145    
146                    if (longDescription != null) {
147                            setLongDescription(longDescription);
148                    }
149    
150                    String pageURL = (String)attributes.get("pageURL");
151    
152                    if (pageURL != null) {
153                            setPageURL(pageURL);
154                    }
155    
156                    String author = (String)attributes.get("author");
157    
158                    if (author != null) {
159                            setAuthor(author);
160                    }
161    
162                    String repoGroupId = (String)attributes.get("repoGroupId");
163    
164                    if (repoGroupId != null) {
165                            setRepoGroupId(repoGroupId);
166                    }
167    
168                    String repoArtifactId = (String)attributes.get("repoArtifactId");
169    
170                    if (repoArtifactId != null) {
171                            setRepoArtifactId(repoArtifactId);
172                    }
173            }
174    
175            /**
176            * Returns the primary key of this s c product entry.
177            *
178            * @return the primary key of this s c product entry
179            */
180            @Override
181            public long getPrimaryKey() {
182                    return _scProductEntry.getPrimaryKey();
183            }
184    
185            /**
186            * Sets the primary key of this s c product entry.
187            *
188            * @param primaryKey the primary key of this s c product entry
189            */
190            @Override
191            public void setPrimaryKey(long primaryKey) {
192                    _scProductEntry.setPrimaryKey(primaryKey);
193            }
194    
195            /**
196            * Returns the product entry ID of this s c product entry.
197            *
198            * @return the product entry ID of this s c product entry
199            */
200            @Override
201            public long getProductEntryId() {
202                    return _scProductEntry.getProductEntryId();
203            }
204    
205            /**
206            * Sets the product entry ID of this s c product entry.
207            *
208            * @param productEntryId the product entry ID of this s c product entry
209            */
210            @Override
211            public void setProductEntryId(long productEntryId) {
212                    _scProductEntry.setProductEntryId(productEntryId);
213            }
214    
215            /**
216            * Returns the group ID of this s c product entry.
217            *
218            * @return the group ID of this s c product entry
219            */
220            @Override
221            public long getGroupId() {
222                    return _scProductEntry.getGroupId();
223            }
224    
225            /**
226            * Sets the group ID of this s c product entry.
227            *
228            * @param groupId the group ID of this s c product entry
229            */
230            @Override
231            public void setGroupId(long groupId) {
232                    _scProductEntry.setGroupId(groupId);
233            }
234    
235            /**
236            * Returns the company ID of this s c product entry.
237            *
238            * @return the company ID of this s c product entry
239            */
240            @Override
241            public long getCompanyId() {
242                    return _scProductEntry.getCompanyId();
243            }
244    
245            /**
246            * Sets the company ID of this s c product entry.
247            *
248            * @param companyId the company ID of this s c product entry
249            */
250            @Override
251            public void setCompanyId(long companyId) {
252                    _scProductEntry.setCompanyId(companyId);
253            }
254    
255            /**
256            * Returns the user ID of this s c product entry.
257            *
258            * @return the user ID of this s c product entry
259            */
260            @Override
261            public long getUserId() {
262                    return _scProductEntry.getUserId();
263            }
264    
265            /**
266            * Sets the user ID of this s c product entry.
267            *
268            * @param userId the user ID of this s c product entry
269            */
270            @Override
271            public void setUserId(long userId) {
272                    _scProductEntry.setUserId(userId);
273            }
274    
275            /**
276            * Returns the user uuid of this s c product entry.
277            *
278            * @return the user uuid of this s c product entry
279            * @throws SystemException if a system exception occurred
280            */
281            @Override
282            public java.lang.String getUserUuid()
283                    throws com.liferay.portal.kernel.exception.SystemException {
284                    return _scProductEntry.getUserUuid();
285            }
286    
287            /**
288            * Sets the user uuid of this s c product entry.
289            *
290            * @param userUuid the user uuid of this s c product entry
291            */
292            @Override
293            public void setUserUuid(java.lang.String userUuid) {
294                    _scProductEntry.setUserUuid(userUuid);
295            }
296    
297            /**
298            * Returns the user name of this s c product entry.
299            *
300            * @return the user name of this s c product entry
301            */
302            @Override
303            public java.lang.String getUserName() {
304                    return _scProductEntry.getUserName();
305            }
306    
307            /**
308            * Sets the user name of this s c product entry.
309            *
310            * @param userName the user name of this s c product entry
311            */
312            @Override
313            public void setUserName(java.lang.String userName) {
314                    _scProductEntry.setUserName(userName);
315            }
316    
317            /**
318            * Returns the create date of this s c product entry.
319            *
320            * @return the create date of this s c product entry
321            */
322            @Override
323            public java.util.Date getCreateDate() {
324                    return _scProductEntry.getCreateDate();
325            }
326    
327            /**
328            * Sets the create date of this s c product entry.
329            *
330            * @param createDate the create date of this s c product entry
331            */
332            @Override
333            public void setCreateDate(java.util.Date createDate) {
334                    _scProductEntry.setCreateDate(createDate);
335            }
336    
337            /**
338            * Returns the modified date of this s c product entry.
339            *
340            * @return the modified date of this s c product entry
341            */
342            @Override
343            public java.util.Date getModifiedDate() {
344                    return _scProductEntry.getModifiedDate();
345            }
346    
347            /**
348            * Sets the modified date of this s c product entry.
349            *
350            * @param modifiedDate the modified date of this s c product entry
351            */
352            @Override
353            public void setModifiedDate(java.util.Date modifiedDate) {
354                    _scProductEntry.setModifiedDate(modifiedDate);
355            }
356    
357            /**
358            * Returns the name of this s c product entry.
359            *
360            * @return the name of this s c product entry
361            */
362            @Override
363            public java.lang.String getName() {
364                    return _scProductEntry.getName();
365            }
366    
367            /**
368            * Sets the name of this s c product entry.
369            *
370            * @param name the name of this s c product entry
371            */
372            @Override
373            public void setName(java.lang.String name) {
374                    _scProductEntry.setName(name);
375            }
376    
377            /**
378            * Returns the type of this s c product entry.
379            *
380            * @return the type of this s c product entry
381            */
382            @Override
383            public java.lang.String getType() {
384                    return _scProductEntry.getType();
385            }
386    
387            /**
388            * Sets the type of this s c product entry.
389            *
390            * @param type the type of this s c product entry
391            */
392            @Override
393            public void setType(java.lang.String type) {
394                    _scProductEntry.setType(type);
395            }
396    
397            /**
398            * Returns the tags of this s c product entry.
399            *
400            * @return the tags of this s c product entry
401            */
402            @Override
403            public java.lang.String getTags() {
404                    return _scProductEntry.getTags();
405            }
406    
407            /**
408            * Sets the tags of this s c product entry.
409            *
410            * @param tags the tags of this s c product entry
411            */
412            @Override
413            public void setTags(java.lang.String tags) {
414                    _scProductEntry.setTags(tags);
415            }
416    
417            /**
418            * Returns the short description of this s c product entry.
419            *
420            * @return the short description of this s c product entry
421            */
422            @Override
423            public java.lang.String getShortDescription() {
424                    return _scProductEntry.getShortDescription();
425            }
426    
427            /**
428            * Sets the short description of this s c product entry.
429            *
430            * @param shortDescription the short description of this s c product entry
431            */
432            @Override
433            public void setShortDescription(java.lang.String shortDescription) {
434                    _scProductEntry.setShortDescription(shortDescription);
435            }
436    
437            /**
438            * Returns the long description of this s c product entry.
439            *
440            * @return the long description of this s c product entry
441            */
442            @Override
443            public java.lang.String getLongDescription() {
444                    return _scProductEntry.getLongDescription();
445            }
446    
447            /**
448            * Sets the long description of this s c product entry.
449            *
450            * @param longDescription the long description of this s c product entry
451            */
452            @Override
453            public void setLongDescription(java.lang.String longDescription) {
454                    _scProductEntry.setLongDescription(longDescription);
455            }
456    
457            /**
458            * Returns the page u r l of this s c product entry.
459            *
460            * @return the page u r l of this s c product entry
461            */
462            @Override
463            public java.lang.String getPageURL() {
464                    return _scProductEntry.getPageURL();
465            }
466    
467            /**
468            * Sets the page u r l of this s c product entry.
469            *
470            * @param pageURL the page u r l of this s c product entry
471            */
472            @Override
473            public void setPageURL(java.lang.String pageURL) {
474                    _scProductEntry.setPageURL(pageURL);
475            }
476    
477            /**
478            * Returns the author of this s c product entry.
479            *
480            * @return the author of this s c product entry
481            */
482            @Override
483            public java.lang.String getAuthor() {
484                    return _scProductEntry.getAuthor();
485            }
486    
487            /**
488            * Sets the author of this s c product entry.
489            *
490            * @param author the author of this s c product entry
491            */
492            @Override
493            public void setAuthor(java.lang.String author) {
494                    _scProductEntry.setAuthor(author);
495            }
496    
497            /**
498            * Returns the repo group ID of this s c product entry.
499            *
500            * @return the repo group ID of this s c product entry
501            */
502            @Override
503            public java.lang.String getRepoGroupId() {
504                    return _scProductEntry.getRepoGroupId();
505            }
506    
507            /**
508            * Sets the repo group ID of this s c product entry.
509            *
510            * @param repoGroupId the repo group ID of this s c product entry
511            */
512            @Override
513            public void setRepoGroupId(java.lang.String repoGroupId) {
514                    _scProductEntry.setRepoGroupId(repoGroupId);
515            }
516    
517            /**
518            * Returns the repo artifact ID of this s c product entry.
519            *
520            * @return the repo artifact ID of this s c product entry
521            */
522            @Override
523            public java.lang.String getRepoArtifactId() {
524                    return _scProductEntry.getRepoArtifactId();
525            }
526    
527            /**
528            * Sets the repo artifact ID of this s c product entry.
529            *
530            * @param repoArtifactId the repo artifact ID of this s c product entry
531            */
532            @Override
533            public void setRepoArtifactId(java.lang.String repoArtifactId) {
534                    _scProductEntry.setRepoArtifactId(repoArtifactId);
535            }
536    
537            @Override
538            public boolean isNew() {
539                    return _scProductEntry.isNew();
540            }
541    
542            @Override
543            public void setNew(boolean n) {
544                    _scProductEntry.setNew(n);
545            }
546    
547            @Override
548            public boolean isCachedModel() {
549                    return _scProductEntry.isCachedModel();
550            }
551    
552            @Override
553            public void setCachedModel(boolean cachedModel) {
554                    _scProductEntry.setCachedModel(cachedModel);
555            }
556    
557            @Override
558            public boolean isEscapedModel() {
559                    return _scProductEntry.isEscapedModel();
560            }
561    
562            @Override
563            public java.io.Serializable getPrimaryKeyObj() {
564                    return _scProductEntry.getPrimaryKeyObj();
565            }
566    
567            @Override
568            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
569                    _scProductEntry.setPrimaryKeyObj(primaryKeyObj);
570            }
571    
572            @Override
573            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
574                    return _scProductEntry.getExpandoBridge();
575            }
576    
577            @Override
578            public void setExpandoBridgeAttributes(
579                    com.liferay.portal.model.BaseModel<?> baseModel) {
580                    _scProductEntry.setExpandoBridgeAttributes(baseModel);
581            }
582    
583            @Override
584            public void setExpandoBridgeAttributes(
585                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
586                    _scProductEntry.setExpandoBridgeAttributes(expandoBridge);
587            }
588    
589            @Override
590            public void setExpandoBridgeAttributes(
591                    com.liferay.portal.service.ServiceContext serviceContext) {
592                    _scProductEntry.setExpandoBridgeAttributes(serviceContext);
593            }
594    
595            @Override
596            public java.lang.Object clone() {
597                    return new SCProductEntryWrapper((SCProductEntry)_scProductEntry.clone());
598            }
599    
600            @Override
601            public int compareTo(
602                    com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry) {
603                    return _scProductEntry.compareTo(scProductEntry);
604            }
605    
606            @Override
607            public int hashCode() {
608                    return _scProductEntry.hashCode();
609            }
610    
611            @Override
612            public com.liferay.portal.model.CacheModel<com.liferay.portlet.softwarecatalog.model.SCProductEntry> toCacheModel() {
613                    return _scProductEntry.toCacheModel();
614            }
615    
616            @Override
617            public com.liferay.portlet.softwarecatalog.model.SCProductEntry toEscapedModel() {
618                    return new SCProductEntryWrapper(_scProductEntry.toEscapedModel());
619            }
620    
621            @Override
622            public com.liferay.portlet.softwarecatalog.model.SCProductEntry toUnescapedModel() {
623                    return new SCProductEntryWrapper(_scProductEntry.toUnescapedModel());
624            }
625    
626            @Override
627            public java.lang.String toString() {
628                    return _scProductEntry.toString();
629            }
630    
631            @Override
632            public java.lang.String toXmlString() {
633                    return _scProductEntry.toXmlString();
634            }
635    
636            @Override
637            public void persist()
638                    throws com.liferay.portal.kernel.exception.SystemException {
639                    _scProductEntry.persist();
640            }
641    
642            @Override
643            public com.liferay.portlet.softwarecatalog.model.SCProductVersion getLatestVersion()
644                    throws com.liferay.portal.kernel.exception.SystemException {
645                    return _scProductEntry.getLatestVersion();
646            }
647    
648            @Override
649            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getLicenses()
650                    throws com.liferay.portal.kernel.exception.SystemException {
651                    return _scProductEntry.getLicenses();
652            }
653    
654            @Override
655            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductScreenshot> getScreenshots()
656                    throws com.liferay.portal.kernel.exception.SystemException {
657                    return _scProductEntry.getScreenshots();
658            }
659    
660            @Override
661            public boolean equals(Object obj) {
662                    if (this == obj) {
663                            return true;
664                    }
665    
666                    if (!(obj instanceof SCProductEntryWrapper)) {
667                            return false;
668                    }
669    
670                    SCProductEntryWrapper scProductEntryWrapper = (SCProductEntryWrapper)obj;
671    
672                    if (Validator.equals(_scProductEntry,
673                                            scProductEntryWrapper._scProductEntry)) {
674                            return true;
675                    }
676    
677                    return false;
678            }
679    
680            /**
681             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
682             */
683            public SCProductEntry getWrappedSCProductEntry() {
684                    return _scProductEntry;
685            }
686    
687            @Override
688            public SCProductEntry getWrappedModel() {
689                    return _scProductEntry;
690            }
691    
692            @Override
693            public void resetOriginalValues() {
694                    _scProductEntry.resetOriginalValues();
695            }
696    
697            private SCProductEntry _scProductEntry;
698    }