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