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