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