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