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