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