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