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.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            @Override
115            public java.lang.Object clone() {
116                    return new SocialActivityAchievementWrapper((SocialActivityAchievement)_socialActivityAchievement.clone());
117            }
118    
119            @Override
120            public int compareTo(
121                    com.liferay.portlet.social.model.SocialActivityAchievement socialActivityAchievement) {
122                    return _socialActivityAchievement.compareTo(socialActivityAchievement);
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            @Override
131            public long getActivityAchievementId() {
132                    return _socialActivityAchievement.getActivityAchievementId();
133            }
134    
135            /**
136            * Returns the company ID of this social activity achievement.
137            *
138            * @return the company ID of this social activity achievement
139            */
140            @Override
141            public long getCompanyId() {
142                    return _socialActivityAchievement.getCompanyId();
143            }
144    
145            /**
146            * Returns the create date of this social activity achievement.
147            *
148            * @return the create date of this social activity achievement
149            */
150            @Override
151            public long getCreateDate() {
152                    return _socialActivityAchievement.getCreateDate();
153            }
154    
155            @Override
156            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
157                    return _socialActivityAchievement.getExpandoBridge();
158            }
159    
160            /**
161            * Returns the first in group of this social activity achievement.
162            *
163            * @return the first in group of this social activity achievement
164            */
165            @Override
166            public boolean getFirstInGroup() {
167                    return _socialActivityAchievement.getFirstInGroup();
168            }
169    
170            /**
171            * Returns the group ID of this social activity achievement.
172            *
173            * @return the group ID of this social activity achievement
174            */
175            @Override
176            public long getGroupId() {
177                    return _socialActivityAchievement.getGroupId();
178            }
179    
180            /**
181            * Returns the name of this social activity achievement.
182            *
183            * @return the name of this social activity achievement
184            */
185            @Override
186            public java.lang.String getName() {
187                    return _socialActivityAchievement.getName();
188            }
189    
190            /**
191            * Returns the primary key of this social activity achievement.
192            *
193            * @return the primary key of this social activity achievement
194            */
195            @Override
196            public long getPrimaryKey() {
197                    return _socialActivityAchievement.getPrimaryKey();
198            }
199    
200            @Override
201            public java.io.Serializable getPrimaryKeyObj() {
202                    return _socialActivityAchievement.getPrimaryKeyObj();
203            }
204    
205            /**
206            * Returns the user ID of this social activity achievement.
207            *
208            * @return the user ID of this social activity achievement
209            */
210            @Override
211            public long getUserId() {
212                    return _socialActivityAchievement.getUserId();
213            }
214    
215            /**
216            * Returns the user uuid of this social activity achievement.
217            *
218            * @return the user uuid of this social activity achievement
219            */
220            @Override
221            public java.lang.String getUserUuid() {
222                    return _socialActivityAchievement.getUserUuid();
223            }
224    
225            @Override
226            public int hashCode() {
227                    return _socialActivityAchievement.hashCode();
228            }
229    
230            @Override
231            public boolean isCachedModel() {
232                    return _socialActivityAchievement.isCachedModel();
233            }
234    
235            @Override
236            public boolean isEscapedModel() {
237                    return _socialActivityAchievement.isEscapedModel();
238            }
239    
240            /**
241            * Returns <code>true</code> if this social activity achievement is first in group.
242            *
243            * @return <code>true</code> if this social activity achievement is first in group; <code>false</code> otherwise
244            */
245            @Override
246            public boolean isFirstInGroup() {
247                    return _socialActivityAchievement.isFirstInGroup();
248            }
249    
250            @Override
251            public boolean isNew() {
252                    return _socialActivityAchievement.isNew();
253            }
254    
255            @Override
256            public void persist() {
257                    _socialActivityAchievement.persist();
258            }
259    
260            /**
261            * Sets the activity achievement ID of this social activity achievement.
262            *
263            * @param activityAchievementId the activity achievement ID of this social activity achievement
264            */
265            @Override
266            public void setActivityAchievementId(long activityAchievementId) {
267                    _socialActivityAchievement.setActivityAchievementId(activityAchievementId);
268            }
269    
270            @Override
271            public void setCachedModel(boolean cachedModel) {
272                    _socialActivityAchievement.setCachedModel(cachedModel);
273            }
274    
275            /**
276            * Sets the company ID of this social activity achievement.
277            *
278            * @param companyId the company ID of this social activity achievement
279            */
280            @Override
281            public void setCompanyId(long companyId) {
282                    _socialActivityAchievement.setCompanyId(companyId);
283            }
284    
285            /**
286            * Sets the create date of this social activity achievement.
287            *
288            * @param createDate the create date of this social activity achievement
289            */
290            @Override
291            public void setCreateDate(long createDate) {
292                    _socialActivityAchievement.setCreateDate(createDate);
293            }
294    
295            @Override
296            public void setExpandoBridgeAttributes(
297                    com.liferay.portal.model.BaseModel<?> baseModel) {
298                    _socialActivityAchievement.setExpandoBridgeAttributes(baseModel);
299            }
300    
301            @Override
302            public void setExpandoBridgeAttributes(
303                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
304                    _socialActivityAchievement.setExpandoBridgeAttributes(expandoBridge);
305            }
306    
307            @Override
308            public void setExpandoBridgeAttributes(
309                    com.liferay.portal.service.ServiceContext serviceContext) {
310                    _socialActivityAchievement.setExpandoBridgeAttributes(serviceContext);
311            }
312    
313            /**
314            * Sets whether this social activity achievement is first in group.
315            *
316            * @param firstInGroup the first in group of this social activity achievement
317            */
318            @Override
319            public void setFirstInGroup(boolean firstInGroup) {
320                    _socialActivityAchievement.setFirstInGroup(firstInGroup);
321            }
322    
323            /**
324            * Sets the group ID of this social activity achievement.
325            *
326            * @param groupId the group ID of this social activity achievement
327            */
328            @Override
329            public void setGroupId(long groupId) {
330                    _socialActivityAchievement.setGroupId(groupId);
331            }
332    
333            /**
334            * Sets the name of this social activity achievement.
335            *
336            * @param name the name of this social activity achievement
337            */
338            @Override
339            public void setName(java.lang.String name) {
340                    _socialActivityAchievement.setName(name);
341            }
342    
343            @Override
344            public void setNew(boolean n) {
345                    _socialActivityAchievement.setNew(n);
346            }
347    
348            /**
349            * Sets the primary key of this social activity achievement.
350            *
351            * @param primaryKey the primary key of this social activity achievement
352            */
353            @Override
354            public void setPrimaryKey(long primaryKey) {
355                    _socialActivityAchievement.setPrimaryKey(primaryKey);
356            }
357    
358            @Override
359            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
360                    _socialActivityAchievement.setPrimaryKeyObj(primaryKeyObj);
361            }
362    
363            /**
364            * Sets the user ID of this social activity achievement.
365            *
366            * @param userId the user ID of this social activity achievement
367            */
368            @Override
369            public void setUserId(long userId) {
370                    _socialActivityAchievement.setUserId(userId);
371            }
372    
373            /**
374            * Sets the user uuid of this social activity achievement.
375            *
376            * @param userUuid the user uuid of this social activity achievement
377            */
378            @Override
379            public void setUserUuid(java.lang.String userUuid) {
380                    _socialActivityAchievement.setUserUuid(userUuid);
381            }
382    
383            @Override
384            public com.liferay.portal.model.CacheModel<com.liferay.portlet.social.model.SocialActivityAchievement> toCacheModel() {
385                    return _socialActivityAchievement.toCacheModel();
386            }
387    
388            @Override
389            public com.liferay.portlet.social.model.SocialActivityAchievement toEscapedModel() {
390                    return new SocialActivityAchievementWrapper(_socialActivityAchievement.toEscapedModel());
391            }
392    
393            @Override
394            public java.lang.String toString() {
395                    return _socialActivityAchievement.toString();
396            }
397    
398            @Override
399            public com.liferay.portlet.social.model.SocialActivityAchievement toUnescapedModel() {
400                    return new SocialActivityAchievementWrapper(_socialActivityAchievement.toUnescapedModel());
401            }
402    
403            @Override
404            public java.lang.String toXmlString() {
405                    return _socialActivityAchievement.toXmlString();
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            @Override
429            public SocialActivityAchievement getWrappedModel() {
430                    return _socialActivityAchievement;
431            }
432    
433            @Override
434            public boolean isEntityCacheEnabled() {
435                    return _socialActivityAchievement.isEntityCacheEnabled();
436            }
437    
438            @Override
439            public boolean isFinderCacheEnabled() {
440                    return _socialActivityAchievement.isFinderCacheEnabled();
441            }
442    
443            @Override
444            public void resetOriginalValues() {
445                    _socialActivityAchievement.resetOriginalValues();
446            }
447    
448            private final SocialActivityAchievement _socialActivityAchievement;
449    }