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