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