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.social.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.HashMap;
023    import java.util.Map;
024    
025    /**
026     * <p>
027     * This class is a wrapper for {@link SocialActivitySetting}.
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see SocialActivitySetting
032     * @generated
033     */
034    @ProviderType
035    public class SocialActivitySettingWrapper implements SocialActivitySetting,
036            ModelWrapper<SocialActivitySetting> {
037            public SocialActivitySettingWrapper(
038                    SocialActivitySetting socialActivitySetting) {
039                    _socialActivitySetting = socialActivitySetting;
040            }
041    
042            @Override
043            public Class<?> getModelClass() {
044                    return SocialActivitySetting.class;
045            }
046    
047            @Override
048            public String getModelClassName() {
049                    return SocialActivitySetting.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("activitySettingId", getActivitySettingId());
057                    attributes.put("groupId", getGroupId());
058                    attributes.put("companyId", getCompanyId());
059                    attributes.put("classNameId", getClassNameId());
060                    attributes.put("activityType", getActivityType());
061                    attributes.put("name", getName());
062                    attributes.put("value", getValue());
063    
064                    return attributes;
065            }
066    
067            @Override
068            public void setModelAttributes(Map<String, Object> attributes) {
069                    Long activitySettingId = (Long)attributes.get("activitySettingId");
070    
071                    if (activitySettingId != null) {
072                            setActivitySettingId(activitySettingId);
073                    }
074    
075                    Long groupId = (Long)attributes.get("groupId");
076    
077                    if (groupId != null) {
078                            setGroupId(groupId);
079                    }
080    
081                    Long companyId = (Long)attributes.get("companyId");
082    
083                    if (companyId != null) {
084                            setCompanyId(companyId);
085                    }
086    
087                    Long classNameId = (Long)attributes.get("classNameId");
088    
089                    if (classNameId != null) {
090                            setClassNameId(classNameId);
091                    }
092    
093                    Integer activityType = (Integer)attributes.get("activityType");
094    
095                    if (activityType != null) {
096                            setActivityType(activityType);
097                    }
098    
099                    String name = (String)attributes.get("name");
100    
101                    if (name != null) {
102                            setName(name);
103                    }
104    
105                    String value = (String)attributes.get("value");
106    
107                    if (value != null) {
108                            setValue(value);
109                    }
110            }
111    
112            /**
113            * Returns the primary key of this social activity setting.
114            *
115            * @return the primary key of this social activity setting
116            */
117            @Override
118            public long getPrimaryKey() {
119                    return _socialActivitySetting.getPrimaryKey();
120            }
121    
122            /**
123            * Sets the primary key of this social activity setting.
124            *
125            * @param primaryKey the primary key of this social activity setting
126            */
127            @Override
128            public void setPrimaryKey(long primaryKey) {
129                    _socialActivitySetting.setPrimaryKey(primaryKey);
130            }
131    
132            /**
133            * Returns the activity setting ID of this social activity setting.
134            *
135            * @return the activity setting ID of this social activity setting
136            */
137            @Override
138            public long getActivitySettingId() {
139                    return _socialActivitySetting.getActivitySettingId();
140            }
141    
142            /**
143            * Sets the activity setting ID of this social activity setting.
144            *
145            * @param activitySettingId the activity setting ID of this social activity setting
146            */
147            @Override
148            public void setActivitySettingId(long activitySettingId) {
149                    _socialActivitySetting.setActivitySettingId(activitySettingId);
150            }
151    
152            /**
153            * Returns the group ID of this social activity setting.
154            *
155            * @return the group ID of this social activity setting
156            */
157            @Override
158            public long getGroupId() {
159                    return _socialActivitySetting.getGroupId();
160            }
161    
162            /**
163            * Sets the group ID of this social activity setting.
164            *
165            * @param groupId the group ID of this social activity setting
166            */
167            @Override
168            public void setGroupId(long groupId) {
169                    _socialActivitySetting.setGroupId(groupId);
170            }
171    
172            /**
173            * Returns the company ID of this social activity setting.
174            *
175            * @return the company ID of this social activity setting
176            */
177            @Override
178            public long getCompanyId() {
179                    return _socialActivitySetting.getCompanyId();
180            }
181    
182            /**
183            * Sets the company ID of this social activity setting.
184            *
185            * @param companyId the company ID of this social activity setting
186            */
187            @Override
188            public void setCompanyId(long companyId) {
189                    _socialActivitySetting.setCompanyId(companyId);
190            }
191    
192            /**
193            * Returns the fully qualified class name of this social activity setting.
194            *
195            * @return the fully qualified class name of this social activity setting
196            */
197            @Override
198            public java.lang.String getClassName() {
199                    return _socialActivitySetting.getClassName();
200            }
201    
202            @Override
203            public void setClassName(java.lang.String className) {
204                    _socialActivitySetting.setClassName(className);
205            }
206    
207            /**
208            * Returns the class name ID of this social activity setting.
209            *
210            * @return the class name ID of this social activity setting
211            */
212            @Override
213            public long getClassNameId() {
214                    return _socialActivitySetting.getClassNameId();
215            }
216    
217            /**
218            * Sets the class name ID of this social activity setting.
219            *
220            * @param classNameId the class name ID of this social activity setting
221            */
222            @Override
223            public void setClassNameId(long classNameId) {
224                    _socialActivitySetting.setClassNameId(classNameId);
225            }
226    
227            /**
228            * Returns the activity type of this social activity setting.
229            *
230            * @return the activity type of this social activity setting
231            */
232            @Override
233            public int getActivityType() {
234                    return _socialActivitySetting.getActivityType();
235            }
236    
237            /**
238            * Sets the activity type of this social activity setting.
239            *
240            * @param activityType the activity type of this social activity setting
241            */
242            @Override
243            public void setActivityType(int activityType) {
244                    _socialActivitySetting.setActivityType(activityType);
245            }
246    
247            /**
248            * Returns the name of this social activity setting.
249            *
250            * @return the name of this social activity setting
251            */
252            @Override
253            public java.lang.String getName() {
254                    return _socialActivitySetting.getName();
255            }
256    
257            /**
258            * Sets the name of this social activity setting.
259            *
260            * @param name the name of this social activity setting
261            */
262            @Override
263            public void setName(java.lang.String name) {
264                    _socialActivitySetting.setName(name);
265            }
266    
267            /**
268            * Returns the value of this social activity setting.
269            *
270            * @return the value of this social activity setting
271            */
272            @Override
273            public java.lang.String getValue() {
274                    return _socialActivitySetting.getValue();
275            }
276    
277            /**
278            * Sets the value of this social activity setting.
279            *
280            * @param value the value of this social activity setting
281            */
282            @Override
283            public void setValue(java.lang.String value) {
284                    _socialActivitySetting.setValue(value);
285            }
286    
287            @Override
288            public boolean isNew() {
289                    return _socialActivitySetting.isNew();
290            }
291    
292            @Override
293            public void setNew(boolean n) {
294                    _socialActivitySetting.setNew(n);
295            }
296    
297            @Override
298            public boolean isCachedModel() {
299                    return _socialActivitySetting.isCachedModel();
300            }
301    
302            @Override
303            public void setCachedModel(boolean cachedModel) {
304                    _socialActivitySetting.setCachedModel(cachedModel);
305            }
306    
307            @Override
308            public boolean isEscapedModel() {
309                    return _socialActivitySetting.isEscapedModel();
310            }
311    
312            @Override
313            public java.io.Serializable getPrimaryKeyObj() {
314                    return _socialActivitySetting.getPrimaryKeyObj();
315            }
316    
317            @Override
318            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
319                    _socialActivitySetting.setPrimaryKeyObj(primaryKeyObj);
320            }
321    
322            @Override
323            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
324                    return _socialActivitySetting.getExpandoBridge();
325            }
326    
327            @Override
328            public void setExpandoBridgeAttributes(
329                    com.liferay.portal.model.BaseModel<?> baseModel) {
330                    _socialActivitySetting.setExpandoBridgeAttributes(baseModel);
331            }
332    
333            @Override
334            public void setExpandoBridgeAttributes(
335                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
336                    _socialActivitySetting.setExpandoBridgeAttributes(expandoBridge);
337            }
338    
339            @Override
340            public void setExpandoBridgeAttributes(
341                    com.liferay.portal.service.ServiceContext serviceContext) {
342                    _socialActivitySetting.setExpandoBridgeAttributes(serviceContext);
343            }
344    
345            @Override
346            public java.lang.Object clone() {
347                    return new SocialActivitySettingWrapper((SocialActivitySetting)_socialActivitySetting.clone());
348            }
349    
350            @Override
351            public int compareTo(
352                    com.liferay.portlet.social.model.SocialActivitySetting socialActivitySetting) {
353                    return _socialActivitySetting.compareTo(socialActivitySetting);
354            }
355    
356            @Override
357            public int hashCode() {
358                    return _socialActivitySetting.hashCode();
359            }
360    
361            @Override
362            public com.liferay.portal.model.CacheModel<com.liferay.portlet.social.model.SocialActivitySetting> toCacheModel() {
363                    return _socialActivitySetting.toCacheModel();
364            }
365    
366            @Override
367            public com.liferay.portlet.social.model.SocialActivitySetting toEscapedModel() {
368                    return new SocialActivitySettingWrapper(_socialActivitySetting.toEscapedModel());
369            }
370    
371            @Override
372            public com.liferay.portlet.social.model.SocialActivitySetting toUnescapedModel() {
373                    return new SocialActivitySettingWrapper(_socialActivitySetting.toUnescapedModel());
374            }
375    
376            @Override
377            public java.lang.String toString() {
378                    return _socialActivitySetting.toString();
379            }
380    
381            @Override
382            public java.lang.String toXmlString() {
383                    return _socialActivitySetting.toXmlString();
384            }
385    
386            @Override
387            public void persist()
388                    throws com.liferay.portal.kernel.exception.SystemException {
389                    _socialActivitySetting.persist();
390            }
391    
392            @Override
393            public boolean equals(Object obj) {
394                    if (this == obj) {
395                            return true;
396                    }
397    
398                    if (!(obj instanceof SocialActivitySettingWrapper)) {
399                            return false;
400                    }
401    
402                    SocialActivitySettingWrapper socialActivitySettingWrapper = (SocialActivitySettingWrapper)obj;
403    
404                    if (Validator.equals(_socialActivitySetting,
405                                            socialActivitySettingWrapper._socialActivitySetting)) {
406                            return true;
407                    }
408    
409                    return false;
410            }
411    
412            /**
413             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
414             */
415            public SocialActivitySetting getWrappedSocialActivitySetting() {
416                    return _socialActivitySetting;
417            }
418    
419            @Override
420            public SocialActivitySetting getWrappedModel() {
421                    return _socialActivitySetting;
422            }
423    
424            @Override
425            public void resetOriginalValues() {
426                    _socialActivitySetting.resetOriginalValues();
427            }
428    
429            private SocialActivitySetting _socialActivitySetting;
430    }