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