001    /**
002     * Copyright (c) 2000-present 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            @Override
113            public java.lang.Object clone() {
114                    return new SocialActivitySettingWrapper((SocialActivitySetting)_socialActivitySetting.clone());
115            }
116    
117            @Override
118            public int compareTo(
119                    com.liferay.portlet.social.model.SocialActivitySetting socialActivitySetting) {
120                    return _socialActivitySetting.compareTo(socialActivitySetting);
121            }
122    
123            /**
124            * Returns the activity setting ID of this social activity setting.
125            *
126            * @return the activity setting ID of this social activity setting
127            */
128            @Override
129            public long getActivitySettingId() {
130                    return _socialActivitySetting.getActivitySettingId();
131            }
132    
133            /**
134            * Returns the activity type of this social activity setting.
135            *
136            * @return the activity type of this social activity setting
137            */
138            @Override
139            public int getActivityType() {
140                    return _socialActivitySetting.getActivityType();
141            }
142    
143            /**
144            * Returns the fully qualified class name of this social activity setting.
145            *
146            * @return the fully qualified class name of this social activity setting
147            */
148            @Override
149            public java.lang.String getClassName() {
150                    return _socialActivitySetting.getClassName();
151            }
152    
153            /**
154            * Returns the class name ID of this social activity setting.
155            *
156            * @return the class name ID of this social activity setting
157            */
158            @Override
159            public long getClassNameId() {
160                    return _socialActivitySetting.getClassNameId();
161            }
162    
163            /**
164            * Returns the company ID of this social activity setting.
165            *
166            * @return the company ID of this social activity setting
167            */
168            @Override
169            public long getCompanyId() {
170                    return _socialActivitySetting.getCompanyId();
171            }
172    
173            @Override
174            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
175                    return _socialActivitySetting.getExpandoBridge();
176            }
177    
178            /**
179            * Returns the group ID of this social activity setting.
180            *
181            * @return the group ID of this social activity setting
182            */
183            @Override
184            public long getGroupId() {
185                    return _socialActivitySetting.getGroupId();
186            }
187    
188            /**
189            * Returns the name of this social activity setting.
190            *
191            * @return the name of this social activity setting
192            */
193            @Override
194            public java.lang.String getName() {
195                    return _socialActivitySetting.getName();
196            }
197    
198            /**
199            * Returns the primary key of this social activity setting.
200            *
201            * @return the primary key of this social activity setting
202            */
203            @Override
204            public long getPrimaryKey() {
205                    return _socialActivitySetting.getPrimaryKey();
206            }
207    
208            @Override
209            public java.io.Serializable getPrimaryKeyObj() {
210                    return _socialActivitySetting.getPrimaryKeyObj();
211            }
212    
213            /**
214            * Returns the value of this social activity setting.
215            *
216            * @return the value of this social activity setting
217            */
218            @Override
219            public java.lang.String getValue() {
220                    return _socialActivitySetting.getValue();
221            }
222    
223            @Override
224            public int hashCode() {
225                    return _socialActivitySetting.hashCode();
226            }
227    
228            @Override
229            public boolean isCachedModel() {
230                    return _socialActivitySetting.isCachedModel();
231            }
232    
233            @Override
234            public boolean isEscapedModel() {
235                    return _socialActivitySetting.isEscapedModel();
236            }
237    
238            @Override
239            public boolean isNew() {
240                    return _socialActivitySetting.isNew();
241            }
242    
243            @Override
244            public void persist() {
245                    _socialActivitySetting.persist();
246            }
247    
248            /**
249            * Sets the activity setting ID of this social activity setting.
250            *
251            * @param activitySettingId the activity setting ID of this social activity setting
252            */
253            @Override
254            public void setActivitySettingId(long activitySettingId) {
255                    _socialActivitySetting.setActivitySettingId(activitySettingId);
256            }
257    
258            /**
259            * Sets the activity type of this social activity setting.
260            *
261            * @param activityType the activity type of this social activity setting
262            */
263            @Override
264            public void setActivityType(int activityType) {
265                    _socialActivitySetting.setActivityType(activityType);
266            }
267    
268            @Override
269            public void setCachedModel(boolean cachedModel) {
270                    _socialActivitySetting.setCachedModel(cachedModel);
271            }
272    
273            @Override
274            public void setClassName(java.lang.String className) {
275                    _socialActivitySetting.setClassName(className);
276            }
277    
278            /**
279            * Sets the class name ID of this social activity setting.
280            *
281            * @param classNameId the class name ID of this social activity setting
282            */
283            @Override
284            public void setClassNameId(long classNameId) {
285                    _socialActivitySetting.setClassNameId(classNameId);
286            }
287    
288            /**
289            * Sets the company ID of this social activity setting.
290            *
291            * @param companyId the company ID of this social activity setting
292            */
293            @Override
294            public void setCompanyId(long companyId) {
295                    _socialActivitySetting.setCompanyId(companyId);
296            }
297    
298            @Override
299            public void setExpandoBridgeAttributes(
300                    com.liferay.portal.model.BaseModel<?> baseModel) {
301                    _socialActivitySetting.setExpandoBridgeAttributes(baseModel);
302            }
303    
304            @Override
305            public void setExpandoBridgeAttributes(
306                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
307                    _socialActivitySetting.setExpandoBridgeAttributes(expandoBridge);
308            }
309    
310            @Override
311            public void setExpandoBridgeAttributes(
312                    com.liferay.portal.service.ServiceContext serviceContext) {
313                    _socialActivitySetting.setExpandoBridgeAttributes(serviceContext);
314            }
315    
316            /**
317            * Sets the group ID of this social activity setting.
318            *
319            * @param groupId the group ID of this social activity setting
320            */
321            @Override
322            public void setGroupId(long groupId) {
323                    _socialActivitySetting.setGroupId(groupId);
324            }
325    
326            /**
327            * Sets the name of this social activity setting.
328            *
329            * @param name the name of this social activity setting
330            */
331            @Override
332            public void setName(java.lang.String name) {
333                    _socialActivitySetting.setName(name);
334            }
335    
336            @Override
337            public void setNew(boolean n) {
338                    _socialActivitySetting.setNew(n);
339            }
340    
341            /**
342            * Sets the primary key of this social activity setting.
343            *
344            * @param primaryKey the primary key of this social activity setting
345            */
346            @Override
347            public void setPrimaryKey(long primaryKey) {
348                    _socialActivitySetting.setPrimaryKey(primaryKey);
349            }
350    
351            @Override
352            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
353                    _socialActivitySetting.setPrimaryKeyObj(primaryKeyObj);
354            }
355    
356            /**
357            * Sets the value of this social activity setting.
358            *
359            * @param value the value of this social activity setting
360            */
361            @Override
362            public void setValue(java.lang.String value) {
363                    _socialActivitySetting.setValue(value);
364            }
365    
366            @Override
367            public com.liferay.portal.model.CacheModel<com.liferay.portlet.social.model.SocialActivitySetting> toCacheModel() {
368                    return _socialActivitySetting.toCacheModel();
369            }
370    
371            @Override
372            public com.liferay.portlet.social.model.SocialActivitySetting toEscapedModel() {
373                    return new SocialActivitySettingWrapper(_socialActivitySetting.toEscapedModel());
374            }
375    
376            @Override
377            public java.lang.String toString() {
378                    return _socialActivitySetting.toString();
379            }
380    
381            @Override
382            public com.liferay.portlet.social.model.SocialActivitySetting toUnescapedModel() {
383                    return new SocialActivitySettingWrapper(_socialActivitySetting.toUnescapedModel());
384            }
385    
386            @Override
387            public java.lang.String toXmlString() {
388                    return _socialActivitySetting.toXmlString();
389            }
390    
391            @Override
392            public boolean equals(Object obj) {
393                    if (this == obj) {
394                            return true;
395                    }
396    
397                    if (!(obj instanceof SocialActivitySettingWrapper)) {
398                            return false;
399                    }
400    
401                    SocialActivitySettingWrapper socialActivitySettingWrapper = (SocialActivitySettingWrapper)obj;
402    
403                    if (Validator.equals(_socialActivitySetting,
404                                            socialActivitySettingWrapper._socialActivitySetting)) {
405                            return true;
406                    }
407    
408                    return false;
409            }
410    
411            @Override
412            public SocialActivitySetting getWrappedModel() {
413                    return _socialActivitySetting;
414            }
415    
416            @Override
417            public boolean isEntityCacheEnabled() {
418                    return _socialActivitySetting.isEntityCacheEnabled();
419            }
420    
421            @Override
422            public boolean isFinderCacheEnabled() {
423                    return _socialActivitySetting.isFinderCacheEnabled();
424            }
425    
426            @Override
427            public void resetOriginalValues() {
428                    _socialActivitySetting.resetOriginalValues();
429            }
430    
431            private final SocialActivitySetting _socialActivitySetting;
432    }