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