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