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