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