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.model.ModelWrapper;
018    
019    import java.util.HashMap;
020    import java.util.Map;
021    
022    /**
023     * <p>
024     * This class is a wrapper for {@link SCLicense}.
025     * </p>
026     *
027     * @author    Brian Wing Shun Chan
028     * @see       SCLicense
029     * @generated
030     */
031    public class SCLicenseWrapper implements SCLicense, ModelWrapper<SCLicense> {
032            public SCLicenseWrapper(SCLicense scLicense) {
033                    _scLicense = scLicense;
034            }
035    
036            public Class<?> getModelClass() {
037                    return SCLicense.class;
038            }
039    
040            public String getModelClassName() {
041                    return SCLicense.class.getName();
042            }
043    
044            public Map<String, Object> getModelAttributes() {
045                    Map<String, Object> attributes = new HashMap<String, Object>();
046    
047                    attributes.put("licenseId", getLicenseId());
048                    attributes.put("name", getName());
049                    attributes.put("url", getUrl());
050                    attributes.put("openSource", getOpenSource());
051                    attributes.put("active", getActive());
052                    attributes.put("recommended", getRecommended());
053    
054                    return attributes;
055            }
056    
057            public void setModelAttributes(Map<String, Object> attributes) {
058                    Long licenseId = (Long)attributes.get("licenseId");
059    
060                    if (licenseId != null) {
061                            setLicenseId(licenseId);
062                    }
063    
064                    String name = (String)attributes.get("name");
065    
066                    if (name != null) {
067                            setName(name);
068                    }
069    
070                    String url = (String)attributes.get("url");
071    
072                    if (url != null) {
073                            setUrl(url);
074                    }
075    
076                    Boolean openSource = (Boolean)attributes.get("openSource");
077    
078                    if (openSource != null) {
079                            setOpenSource(openSource);
080                    }
081    
082                    Boolean active = (Boolean)attributes.get("active");
083    
084                    if (active != null) {
085                            setActive(active);
086                    }
087    
088                    Boolean recommended = (Boolean)attributes.get("recommended");
089    
090                    if (recommended != null) {
091                            setRecommended(recommended);
092                    }
093            }
094    
095            /**
096            * Returns the primary key of this s c license.
097            *
098            * @return the primary key of this s c license
099            */
100            public long getPrimaryKey() {
101                    return _scLicense.getPrimaryKey();
102            }
103    
104            /**
105            * Sets the primary key of this s c license.
106            *
107            * @param primaryKey the primary key of this s c license
108            */
109            public void setPrimaryKey(long primaryKey) {
110                    _scLicense.setPrimaryKey(primaryKey);
111            }
112    
113            /**
114            * Returns the license ID of this s c license.
115            *
116            * @return the license ID of this s c license
117            */
118            public long getLicenseId() {
119                    return _scLicense.getLicenseId();
120            }
121    
122            /**
123            * Sets the license ID of this s c license.
124            *
125            * @param licenseId the license ID of this s c license
126            */
127            public void setLicenseId(long licenseId) {
128                    _scLicense.setLicenseId(licenseId);
129            }
130    
131            /**
132            * Returns the name of this s c license.
133            *
134            * @return the name of this s c license
135            */
136            public java.lang.String getName() {
137                    return _scLicense.getName();
138            }
139    
140            /**
141            * Sets the name of this s c license.
142            *
143            * @param name the name of this s c license
144            */
145            public void setName(java.lang.String name) {
146                    _scLicense.setName(name);
147            }
148    
149            /**
150            * Returns the url of this s c license.
151            *
152            * @return the url of this s c license
153            */
154            public java.lang.String getUrl() {
155                    return _scLicense.getUrl();
156            }
157    
158            /**
159            * Sets the url of this s c license.
160            *
161            * @param url the url of this s c license
162            */
163            public void setUrl(java.lang.String url) {
164                    _scLicense.setUrl(url);
165            }
166    
167            /**
168            * Returns the open source of this s c license.
169            *
170            * @return the open source of this s c license
171            */
172            public boolean getOpenSource() {
173                    return _scLicense.getOpenSource();
174            }
175    
176            /**
177            * Returns <code>true</code> if this s c license is open source.
178            *
179            * @return <code>true</code> if this s c license is open source; <code>false</code> otherwise
180            */
181            public boolean isOpenSource() {
182                    return _scLicense.isOpenSource();
183            }
184    
185            /**
186            * Sets whether this s c license is open source.
187            *
188            * @param openSource the open source of this s c license
189            */
190            public void setOpenSource(boolean openSource) {
191                    _scLicense.setOpenSource(openSource);
192            }
193    
194            /**
195            * Returns the active of this s c license.
196            *
197            * @return the active of this s c license
198            */
199            public boolean getActive() {
200                    return _scLicense.getActive();
201            }
202    
203            /**
204            * Returns <code>true</code> if this s c license is active.
205            *
206            * @return <code>true</code> if this s c license is active; <code>false</code> otherwise
207            */
208            public boolean isActive() {
209                    return _scLicense.isActive();
210            }
211    
212            /**
213            * Sets whether this s c license is active.
214            *
215            * @param active the active of this s c license
216            */
217            public void setActive(boolean active) {
218                    _scLicense.setActive(active);
219            }
220    
221            /**
222            * Returns the recommended of this s c license.
223            *
224            * @return the recommended of this s c license
225            */
226            public boolean getRecommended() {
227                    return _scLicense.getRecommended();
228            }
229    
230            /**
231            * Returns <code>true</code> if this s c license is recommended.
232            *
233            * @return <code>true</code> if this s c license is recommended; <code>false</code> otherwise
234            */
235            public boolean isRecommended() {
236                    return _scLicense.isRecommended();
237            }
238    
239            /**
240            * Sets whether this s c license is recommended.
241            *
242            * @param recommended the recommended of this s c license
243            */
244            public void setRecommended(boolean recommended) {
245                    _scLicense.setRecommended(recommended);
246            }
247    
248            public boolean isNew() {
249                    return _scLicense.isNew();
250            }
251    
252            public void setNew(boolean n) {
253                    _scLicense.setNew(n);
254            }
255    
256            public boolean isCachedModel() {
257                    return _scLicense.isCachedModel();
258            }
259    
260            public void setCachedModel(boolean cachedModel) {
261                    _scLicense.setCachedModel(cachedModel);
262            }
263    
264            public boolean isEscapedModel() {
265                    return _scLicense.isEscapedModel();
266            }
267    
268            public java.io.Serializable getPrimaryKeyObj() {
269                    return _scLicense.getPrimaryKeyObj();
270            }
271    
272            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
273                    _scLicense.setPrimaryKeyObj(primaryKeyObj);
274            }
275    
276            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
277                    return _scLicense.getExpandoBridge();
278            }
279    
280            public void setExpandoBridgeAttributes(
281                    com.liferay.portal.model.BaseModel<?> baseModel) {
282                    _scLicense.setExpandoBridgeAttributes(baseModel);
283            }
284    
285            public void setExpandoBridgeAttributes(
286                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
287                    _scLicense.setExpandoBridgeAttributes(expandoBridge);
288            }
289    
290            public void setExpandoBridgeAttributes(
291                    com.liferay.portal.service.ServiceContext serviceContext) {
292                    _scLicense.setExpandoBridgeAttributes(serviceContext);
293            }
294    
295            @Override
296            public java.lang.Object clone() {
297                    return new SCLicenseWrapper((SCLicense)_scLicense.clone());
298            }
299    
300            public int compareTo(
301                    com.liferay.portlet.softwarecatalog.model.SCLicense scLicense) {
302                    return _scLicense.compareTo(scLicense);
303            }
304    
305            @Override
306            public int hashCode() {
307                    return _scLicense.hashCode();
308            }
309    
310            public com.liferay.portal.model.CacheModel<com.liferay.portlet.softwarecatalog.model.SCLicense> toCacheModel() {
311                    return _scLicense.toCacheModel();
312            }
313    
314            public com.liferay.portlet.softwarecatalog.model.SCLicense toEscapedModel() {
315                    return new SCLicenseWrapper(_scLicense.toEscapedModel());
316            }
317    
318            public com.liferay.portlet.softwarecatalog.model.SCLicense toUnescapedModel() {
319                    return new SCLicenseWrapper(_scLicense.toUnescapedModel());
320            }
321    
322            @Override
323            public java.lang.String toString() {
324                    return _scLicense.toString();
325            }
326    
327            public java.lang.String toXmlString() {
328                    return _scLicense.toXmlString();
329            }
330    
331            public void persist()
332                    throws com.liferay.portal.kernel.exception.SystemException {
333                    _scLicense.persist();
334            }
335    
336            /**
337             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
338             */
339            public SCLicense getWrappedSCLicense() {
340                    return _scLicense;
341            }
342    
343            public SCLicense getWrappedModel() {
344                    return _scLicense;
345            }
346    
347            public void resetOriginalValues() {
348                    _scLicense.resetOriginalValues();
349            }
350    
351            private SCLicense _scLicense;
352    }