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 SocialRequest}.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       SocialRequest
030     * @generated
031     */
032    public class SocialRequestWrapper implements SocialRequest,
033            ModelWrapper<SocialRequest> {
034            public SocialRequestWrapper(SocialRequest socialRequest) {
035                    _socialRequest = socialRequest;
036            }
037    
038            public Class<?> getModelClass() {
039                    return SocialRequest.class;
040            }
041    
042            public String getModelClassName() {
043                    return SocialRequest.class.getName();
044            }
045    
046            public Map<String, Object> getModelAttributes() {
047                    Map<String, Object> attributes = new HashMap<String, Object>();
048    
049                    attributes.put("uuid", getUuid());
050                    attributes.put("requestId", getRequestId());
051                    attributes.put("groupId", getGroupId());
052                    attributes.put("companyId", getCompanyId());
053                    attributes.put("userId", getUserId());
054                    attributes.put("createDate", getCreateDate());
055                    attributes.put("modifiedDate", getModifiedDate());
056                    attributes.put("classNameId", getClassNameId());
057                    attributes.put("classPK", getClassPK());
058                    attributes.put("type", getType());
059                    attributes.put("extraData", getExtraData());
060                    attributes.put("receiverUserId", getReceiverUserId());
061                    attributes.put("status", getStatus());
062    
063                    return attributes;
064            }
065    
066            public void setModelAttributes(Map<String, Object> attributes) {
067                    String uuid = (String)attributes.get("uuid");
068    
069                    if (uuid != null) {
070                            setUuid(uuid);
071                    }
072    
073                    Long requestId = (Long)attributes.get("requestId");
074    
075                    if (requestId != null) {
076                            setRequestId(requestId);
077                    }
078    
079                    Long groupId = (Long)attributes.get("groupId");
080    
081                    if (groupId != null) {
082                            setGroupId(groupId);
083                    }
084    
085                    Long companyId = (Long)attributes.get("companyId");
086    
087                    if (companyId != null) {
088                            setCompanyId(companyId);
089                    }
090    
091                    Long userId = (Long)attributes.get("userId");
092    
093                    if (userId != null) {
094                            setUserId(userId);
095                    }
096    
097                    Long createDate = (Long)attributes.get("createDate");
098    
099                    if (createDate != null) {
100                            setCreateDate(createDate);
101                    }
102    
103                    Long modifiedDate = (Long)attributes.get("modifiedDate");
104    
105                    if (modifiedDate != null) {
106                            setModifiedDate(modifiedDate);
107                    }
108    
109                    Long classNameId = (Long)attributes.get("classNameId");
110    
111                    if (classNameId != null) {
112                            setClassNameId(classNameId);
113                    }
114    
115                    Long classPK = (Long)attributes.get("classPK");
116    
117                    if (classPK != null) {
118                            setClassPK(classPK);
119                    }
120    
121                    Integer type = (Integer)attributes.get("type");
122    
123                    if (type != null) {
124                            setType(type);
125                    }
126    
127                    String extraData = (String)attributes.get("extraData");
128    
129                    if (extraData != null) {
130                            setExtraData(extraData);
131                    }
132    
133                    Long receiverUserId = (Long)attributes.get("receiverUserId");
134    
135                    if (receiverUserId != null) {
136                            setReceiverUserId(receiverUserId);
137                    }
138    
139                    Integer status = (Integer)attributes.get("status");
140    
141                    if (status != null) {
142                            setStatus(status);
143                    }
144            }
145    
146            /**
147            * Returns the primary key of this social request.
148            *
149            * @return the primary key of this social request
150            */
151            public long getPrimaryKey() {
152                    return _socialRequest.getPrimaryKey();
153            }
154    
155            /**
156            * Sets the primary key of this social request.
157            *
158            * @param primaryKey the primary key of this social request
159            */
160            public void setPrimaryKey(long primaryKey) {
161                    _socialRequest.setPrimaryKey(primaryKey);
162            }
163    
164            /**
165            * Returns the uuid of this social request.
166            *
167            * @return the uuid of this social request
168            */
169            public java.lang.String getUuid() {
170                    return _socialRequest.getUuid();
171            }
172    
173            /**
174            * Sets the uuid of this social request.
175            *
176            * @param uuid the uuid of this social request
177            */
178            public void setUuid(java.lang.String uuid) {
179                    _socialRequest.setUuid(uuid);
180            }
181    
182            /**
183            * Returns the request ID of this social request.
184            *
185            * @return the request ID of this social request
186            */
187            public long getRequestId() {
188                    return _socialRequest.getRequestId();
189            }
190    
191            /**
192            * Sets the request ID of this social request.
193            *
194            * @param requestId the request ID of this social request
195            */
196            public void setRequestId(long requestId) {
197                    _socialRequest.setRequestId(requestId);
198            }
199    
200            /**
201            * Returns the group ID of this social request.
202            *
203            * @return the group ID of this social request
204            */
205            public long getGroupId() {
206                    return _socialRequest.getGroupId();
207            }
208    
209            /**
210            * Sets the group ID of this social request.
211            *
212            * @param groupId the group ID of this social request
213            */
214            public void setGroupId(long groupId) {
215                    _socialRequest.setGroupId(groupId);
216            }
217    
218            /**
219            * Returns the company ID of this social request.
220            *
221            * @return the company ID of this social request
222            */
223            public long getCompanyId() {
224                    return _socialRequest.getCompanyId();
225            }
226    
227            /**
228            * Sets the company ID of this social request.
229            *
230            * @param companyId the company ID of this social request
231            */
232            public void setCompanyId(long companyId) {
233                    _socialRequest.setCompanyId(companyId);
234            }
235    
236            /**
237            * Returns the user ID of this social request.
238            *
239            * @return the user ID of this social request
240            */
241            public long getUserId() {
242                    return _socialRequest.getUserId();
243            }
244    
245            /**
246            * Sets the user ID of this social request.
247            *
248            * @param userId the user ID of this social request
249            */
250            public void setUserId(long userId) {
251                    _socialRequest.setUserId(userId);
252            }
253    
254            /**
255            * Returns the user uuid of this social request.
256            *
257            * @return the user uuid of this social request
258            * @throws SystemException if a system exception occurred
259            */
260            public java.lang.String getUserUuid()
261                    throws com.liferay.portal.kernel.exception.SystemException {
262                    return _socialRequest.getUserUuid();
263            }
264    
265            /**
266            * Sets the user uuid of this social request.
267            *
268            * @param userUuid the user uuid of this social request
269            */
270            public void setUserUuid(java.lang.String userUuid) {
271                    _socialRequest.setUserUuid(userUuid);
272            }
273    
274            /**
275            * Returns the create date of this social request.
276            *
277            * @return the create date of this social request
278            */
279            public long getCreateDate() {
280                    return _socialRequest.getCreateDate();
281            }
282    
283            /**
284            * Sets the create date of this social request.
285            *
286            * @param createDate the create date of this social request
287            */
288            public void setCreateDate(long createDate) {
289                    _socialRequest.setCreateDate(createDate);
290            }
291    
292            /**
293            * Returns the modified date of this social request.
294            *
295            * @return the modified date of this social request
296            */
297            public long getModifiedDate() {
298                    return _socialRequest.getModifiedDate();
299            }
300    
301            /**
302            * Sets the modified date of this social request.
303            *
304            * @param modifiedDate the modified date of this social request
305            */
306            public void setModifiedDate(long modifiedDate) {
307                    _socialRequest.setModifiedDate(modifiedDate);
308            }
309    
310            /**
311            * Returns the fully qualified class name of this social request.
312            *
313            * @return the fully qualified class name of this social request
314            */
315            public java.lang.String getClassName() {
316                    return _socialRequest.getClassName();
317            }
318    
319            public void setClassName(java.lang.String className) {
320                    _socialRequest.setClassName(className);
321            }
322    
323            /**
324            * Returns the class name ID of this social request.
325            *
326            * @return the class name ID of this social request
327            */
328            public long getClassNameId() {
329                    return _socialRequest.getClassNameId();
330            }
331    
332            /**
333            * Sets the class name ID of this social request.
334            *
335            * @param classNameId the class name ID of this social request
336            */
337            public void setClassNameId(long classNameId) {
338                    _socialRequest.setClassNameId(classNameId);
339            }
340    
341            /**
342            * Returns the class p k of this social request.
343            *
344            * @return the class p k of this social request
345            */
346            public long getClassPK() {
347                    return _socialRequest.getClassPK();
348            }
349    
350            /**
351            * Sets the class p k of this social request.
352            *
353            * @param classPK the class p k of this social request
354            */
355            public void setClassPK(long classPK) {
356                    _socialRequest.setClassPK(classPK);
357            }
358    
359            /**
360            * Returns the type of this social request.
361            *
362            * @return the type of this social request
363            */
364            public int getType() {
365                    return _socialRequest.getType();
366            }
367    
368            /**
369            * Sets the type of this social request.
370            *
371            * @param type the type of this social request
372            */
373            public void setType(int type) {
374                    _socialRequest.setType(type);
375            }
376    
377            /**
378            * Returns the extra data of this social request.
379            *
380            * @return the extra data of this social request
381            */
382            public java.lang.String getExtraData() {
383                    return _socialRequest.getExtraData();
384            }
385    
386            /**
387            * Sets the extra data of this social request.
388            *
389            * @param extraData the extra data of this social request
390            */
391            public void setExtraData(java.lang.String extraData) {
392                    _socialRequest.setExtraData(extraData);
393            }
394    
395            /**
396            * Returns the receiver user ID of this social request.
397            *
398            * @return the receiver user ID of this social request
399            */
400            public long getReceiverUserId() {
401                    return _socialRequest.getReceiverUserId();
402            }
403    
404            /**
405            * Sets the receiver user ID of this social request.
406            *
407            * @param receiverUserId the receiver user ID of this social request
408            */
409            public void setReceiverUserId(long receiverUserId) {
410                    _socialRequest.setReceiverUserId(receiverUserId);
411            }
412    
413            /**
414            * Returns the receiver user uuid of this social request.
415            *
416            * @return the receiver user uuid of this social request
417            * @throws SystemException if a system exception occurred
418            */
419            public java.lang.String getReceiverUserUuid()
420                    throws com.liferay.portal.kernel.exception.SystemException {
421                    return _socialRequest.getReceiverUserUuid();
422            }
423    
424            /**
425            * Sets the receiver user uuid of this social request.
426            *
427            * @param receiverUserUuid the receiver user uuid of this social request
428            */
429            public void setReceiverUserUuid(java.lang.String receiverUserUuid) {
430                    _socialRequest.setReceiverUserUuid(receiverUserUuid);
431            }
432    
433            /**
434            * Returns the status of this social request.
435            *
436            * @return the status of this social request
437            */
438            public int getStatus() {
439                    return _socialRequest.getStatus();
440            }
441    
442            /**
443            * Sets the status of this social request.
444            *
445            * @param status the status of this social request
446            */
447            public void setStatus(int status) {
448                    _socialRequest.setStatus(status);
449            }
450    
451            public boolean isNew() {
452                    return _socialRequest.isNew();
453            }
454    
455            public void setNew(boolean n) {
456                    _socialRequest.setNew(n);
457            }
458    
459            public boolean isCachedModel() {
460                    return _socialRequest.isCachedModel();
461            }
462    
463            public void setCachedModel(boolean cachedModel) {
464                    _socialRequest.setCachedModel(cachedModel);
465            }
466    
467            public boolean isEscapedModel() {
468                    return _socialRequest.isEscapedModel();
469            }
470    
471            public java.io.Serializable getPrimaryKeyObj() {
472                    return _socialRequest.getPrimaryKeyObj();
473            }
474    
475            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
476                    _socialRequest.setPrimaryKeyObj(primaryKeyObj);
477            }
478    
479            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
480                    return _socialRequest.getExpandoBridge();
481            }
482    
483            public void setExpandoBridgeAttributes(
484                    com.liferay.portal.service.ServiceContext serviceContext) {
485                    _socialRequest.setExpandoBridgeAttributes(serviceContext);
486            }
487    
488            @Override
489            public java.lang.Object clone() {
490                    return new SocialRequestWrapper((SocialRequest)_socialRequest.clone());
491            }
492    
493            public int compareTo(
494                    com.liferay.portlet.social.model.SocialRequest socialRequest) {
495                    return _socialRequest.compareTo(socialRequest);
496            }
497    
498            @Override
499            public int hashCode() {
500                    return _socialRequest.hashCode();
501            }
502    
503            public com.liferay.portal.model.CacheModel<com.liferay.portlet.social.model.SocialRequest> toCacheModel() {
504                    return _socialRequest.toCacheModel();
505            }
506    
507            public com.liferay.portlet.social.model.SocialRequest toEscapedModel() {
508                    return new SocialRequestWrapper(_socialRequest.toEscapedModel());
509            }
510    
511            public com.liferay.portlet.social.model.SocialRequest toUnescapedModel() {
512                    return new SocialRequestWrapper(_socialRequest.toUnescapedModel());
513            }
514    
515            @Override
516            public java.lang.String toString() {
517                    return _socialRequest.toString();
518            }
519    
520            public java.lang.String toXmlString() {
521                    return _socialRequest.toXmlString();
522            }
523    
524            public void persist()
525                    throws com.liferay.portal.kernel.exception.SystemException {
526                    _socialRequest.persist();
527            }
528    
529            @Override
530            public boolean equals(Object obj) {
531                    if (this == obj) {
532                            return true;
533                    }
534    
535                    if (!(obj instanceof SocialRequestWrapper)) {
536                            return false;
537                    }
538    
539                    SocialRequestWrapper socialRequestWrapper = (SocialRequestWrapper)obj;
540    
541                    if (Validator.equals(_socialRequest, socialRequestWrapper._socialRequest)) {
542                            return true;
543                    }
544    
545                    return false;
546            }
547    
548            /**
549             * @deprecated Renamed to {@link #getWrappedModel}
550             */
551            public SocialRequest getWrappedSocialRequest() {
552                    return _socialRequest;
553            }
554    
555            public SocialRequest getWrappedModel() {
556                    return _socialRequest;
557            }
558    
559            public void resetOriginalValues() {
560                    _socialRequest.resetOriginalValues();
561            }
562    
563            private SocialRequest _socialRequest;
564    }