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 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            @Override
154            public java.lang.Object clone() {
155                    return new SocialRequestWrapper((SocialRequest)_socialRequest.clone());
156            }
157    
158            @Override
159            public int compareTo(
160                    com.liferay.portlet.social.model.SocialRequest socialRequest) {
161                    return _socialRequest.compareTo(socialRequest);
162            }
163    
164            /**
165            * Returns the fully qualified class name of this social request.
166            *
167            * @return the fully qualified class name of this social request
168            */
169            @Override
170            public java.lang.String getClassName() {
171                    return _socialRequest.getClassName();
172            }
173    
174            /**
175            * Returns the class name ID of this social request.
176            *
177            * @return the class name ID of this social request
178            */
179            @Override
180            public long getClassNameId() {
181                    return _socialRequest.getClassNameId();
182            }
183    
184            /**
185            * Returns the class p k of this social request.
186            *
187            * @return the class p k of this social request
188            */
189            @Override
190            public long getClassPK() {
191                    return _socialRequest.getClassPK();
192            }
193    
194            /**
195            * Returns the company ID of this social request.
196            *
197            * @return the company ID of this social request
198            */
199            @Override
200            public long getCompanyId() {
201                    return _socialRequest.getCompanyId();
202            }
203    
204            /**
205            * Returns the create date of this social request.
206            *
207            * @return the create date of this social request
208            */
209            @Override
210            public long getCreateDate() {
211                    return _socialRequest.getCreateDate();
212            }
213    
214            @Override
215            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
216                    return _socialRequest.getExpandoBridge();
217            }
218    
219            /**
220            * Returns the extra data of this social request.
221            *
222            * @return the extra data of this social request
223            */
224            @Override
225            public java.lang.String getExtraData() {
226                    return _socialRequest.getExtraData();
227            }
228    
229            /**
230            * Returns the group ID of this social request.
231            *
232            * @return the group ID of this social request
233            */
234            @Override
235            public long getGroupId() {
236                    return _socialRequest.getGroupId();
237            }
238    
239            /**
240            * Returns the modified date of this social request.
241            *
242            * @return the modified date of this social request
243            */
244            @Override
245            public long getModifiedDate() {
246                    return _socialRequest.getModifiedDate();
247            }
248    
249            /**
250            * Returns the primary key of this social request.
251            *
252            * @return the primary key of this social request
253            */
254            @Override
255            public long getPrimaryKey() {
256                    return _socialRequest.getPrimaryKey();
257            }
258    
259            @Override
260            public java.io.Serializable getPrimaryKeyObj() {
261                    return _socialRequest.getPrimaryKeyObj();
262            }
263    
264            /**
265            * Returns the receiver user ID of this social request.
266            *
267            * @return the receiver user ID of this social request
268            */
269            @Override
270            public long getReceiverUserId() {
271                    return _socialRequest.getReceiverUserId();
272            }
273    
274            /**
275            * Returns the receiver user uuid of this social request.
276            *
277            * @return the receiver user uuid of this social request
278            */
279            @Override
280            public java.lang.String getReceiverUserUuid() {
281                    return _socialRequest.getReceiverUserUuid();
282            }
283    
284            /**
285            * Returns the request ID of this social request.
286            *
287            * @return the request ID of this social request
288            */
289            @Override
290            public long getRequestId() {
291                    return _socialRequest.getRequestId();
292            }
293    
294            /**
295            * Returns the status of this social request.
296            *
297            * @return the status of this social request
298            */
299            @Override
300            public int getStatus() {
301                    return _socialRequest.getStatus();
302            }
303    
304            /**
305            * Returns the type of this social request.
306            *
307            * @return the type of this social request
308            */
309            @Override
310            public int getType() {
311                    return _socialRequest.getType();
312            }
313    
314            /**
315            * Returns the user ID of this social request.
316            *
317            * @return the user ID of this social request
318            */
319            @Override
320            public long getUserId() {
321                    return _socialRequest.getUserId();
322            }
323    
324            /**
325            * Returns the user uuid of this social request.
326            *
327            * @return the user uuid of this social request
328            */
329            @Override
330            public java.lang.String getUserUuid() {
331                    return _socialRequest.getUserUuid();
332            }
333    
334            /**
335            * Returns the uuid of this social request.
336            *
337            * @return the uuid of this social request
338            */
339            @Override
340            public java.lang.String getUuid() {
341                    return _socialRequest.getUuid();
342            }
343    
344            @Override
345            public int hashCode() {
346                    return _socialRequest.hashCode();
347            }
348    
349            @Override
350            public boolean isCachedModel() {
351                    return _socialRequest.isCachedModel();
352            }
353    
354            @Override
355            public boolean isEscapedModel() {
356                    return _socialRequest.isEscapedModel();
357            }
358    
359            @Override
360            public boolean isNew() {
361                    return _socialRequest.isNew();
362            }
363    
364            @Override
365            public void persist() {
366                    _socialRequest.persist();
367            }
368    
369            @Override
370            public void setCachedModel(boolean cachedModel) {
371                    _socialRequest.setCachedModel(cachedModel);
372            }
373    
374            @Override
375            public void setClassName(java.lang.String className) {
376                    _socialRequest.setClassName(className);
377            }
378    
379            /**
380            * Sets the class name ID of this social request.
381            *
382            * @param classNameId the class name ID of this social request
383            */
384            @Override
385            public void setClassNameId(long classNameId) {
386                    _socialRequest.setClassNameId(classNameId);
387            }
388    
389            /**
390            * Sets the class p k of this social request.
391            *
392            * @param classPK the class p k of this social request
393            */
394            @Override
395            public void setClassPK(long classPK) {
396                    _socialRequest.setClassPK(classPK);
397            }
398    
399            /**
400            * Sets the company ID of this social request.
401            *
402            * @param companyId the company ID of this social request
403            */
404            @Override
405            public void setCompanyId(long companyId) {
406                    _socialRequest.setCompanyId(companyId);
407            }
408    
409            /**
410            * Sets the create date of this social request.
411            *
412            * @param createDate the create date of this social request
413            */
414            @Override
415            public void setCreateDate(long createDate) {
416                    _socialRequest.setCreateDate(createDate);
417            }
418    
419            @Override
420            public void setExpandoBridgeAttributes(
421                    com.liferay.portal.model.BaseModel<?> baseModel) {
422                    _socialRequest.setExpandoBridgeAttributes(baseModel);
423            }
424    
425            @Override
426            public void setExpandoBridgeAttributes(
427                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
428                    _socialRequest.setExpandoBridgeAttributes(expandoBridge);
429            }
430    
431            @Override
432            public void setExpandoBridgeAttributes(
433                    com.liferay.portal.service.ServiceContext serviceContext) {
434                    _socialRequest.setExpandoBridgeAttributes(serviceContext);
435            }
436    
437            /**
438            * Sets the extra data of this social request.
439            *
440            * @param extraData the extra data of this social request
441            */
442            @Override
443            public void setExtraData(java.lang.String extraData) {
444                    _socialRequest.setExtraData(extraData);
445            }
446    
447            /**
448            * Sets the group ID of this social request.
449            *
450            * @param groupId the group ID of this social request
451            */
452            @Override
453            public void setGroupId(long groupId) {
454                    _socialRequest.setGroupId(groupId);
455            }
456    
457            /**
458            * Sets the modified date of this social request.
459            *
460            * @param modifiedDate the modified date of this social request
461            */
462            @Override
463            public void setModifiedDate(long modifiedDate) {
464                    _socialRequest.setModifiedDate(modifiedDate);
465            }
466    
467            @Override
468            public void setNew(boolean n) {
469                    _socialRequest.setNew(n);
470            }
471    
472            /**
473            * Sets the primary key of this social request.
474            *
475            * @param primaryKey the primary key of this social request
476            */
477            @Override
478            public void setPrimaryKey(long primaryKey) {
479                    _socialRequest.setPrimaryKey(primaryKey);
480            }
481    
482            @Override
483            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
484                    _socialRequest.setPrimaryKeyObj(primaryKeyObj);
485            }
486    
487            /**
488            * Sets the receiver user ID of this social request.
489            *
490            * @param receiverUserId the receiver user ID of this social request
491            */
492            @Override
493            public void setReceiverUserId(long receiverUserId) {
494                    _socialRequest.setReceiverUserId(receiverUserId);
495            }
496    
497            /**
498            * Sets the receiver user uuid of this social request.
499            *
500            * @param receiverUserUuid the receiver user uuid of this social request
501            */
502            @Override
503            public void setReceiverUserUuid(java.lang.String receiverUserUuid) {
504                    _socialRequest.setReceiverUserUuid(receiverUserUuid);
505            }
506    
507            /**
508            * Sets the request ID of this social request.
509            *
510            * @param requestId the request ID of this social request
511            */
512            @Override
513            public void setRequestId(long requestId) {
514                    _socialRequest.setRequestId(requestId);
515            }
516    
517            /**
518            * Sets the status of this social request.
519            *
520            * @param status the status of this social request
521            */
522            @Override
523            public void setStatus(int status) {
524                    _socialRequest.setStatus(status);
525            }
526    
527            /**
528            * Sets the type of this social request.
529            *
530            * @param type the type of this social request
531            */
532            @Override
533            public void setType(int type) {
534                    _socialRequest.setType(type);
535            }
536    
537            /**
538            * Sets the user ID of this social request.
539            *
540            * @param userId the user ID of this social request
541            */
542            @Override
543            public void setUserId(long userId) {
544                    _socialRequest.setUserId(userId);
545            }
546    
547            /**
548            * Sets the user uuid of this social request.
549            *
550            * @param userUuid the user uuid of this social request
551            */
552            @Override
553            public void setUserUuid(java.lang.String userUuid) {
554                    _socialRequest.setUserUuid(userUuid);
555            }
556    
557            /**
558            * Sets the uuid of this social request.
559            *
560            * @param uuid the uuid of this social request
561            */
562            @Override
563            public void setUuid(java.lang.String uuid) {
564                    _socialRequest.setUuid(uuid);
565            }
566    
567            @Override
568            public com.liferay.portal.model.CacheModel<com.liferay.portlet.social.model.SocialRequest> toCacheModel() {
569                    return _socialRequest.toCacheModel();
570            }
571    
572            @Override
573            public com.liferay.portlet.social.model.SocialRequest toEscapedModel() {
574                    return new SocialRequestWrapper(_socialRequest.toEscapedModel());
575            }
576    
577            @Override
578            public java.lang.String toString() {
579                    return _socialRequest.toString();
580            }
581    
582            @Override
583            public com.liferay.portlet.social.model.SocialRequest toUnescapedModel() {
584                    return new SocialRequestWrapper(_socialRequest.toUnescapedModel());
585            }
586    
587            @Override
588            public java.lang.String toXmlString() {
589                    return _socialRequest.toXmlString();
590            }
591    
592            @Override
593            public boolean equals(Object obj) {
594                    if (this == obj) {
595                            return true;
596                    }
597    
598                    if (!(obj instanceof SocialRequestWrapper)) {
599                            return false;
600                    }
601    
602                    SocialRequestWrapper socialRequestWrapper = (SocialRequestWrapper)obj;
603    
604                    if (Validator.equals(_socialRequest, socialRequestWrapper._socialRequest)) {
605                            return true;
606                    }
607    
608                    return false;
609            }
610    
611            @Override
612            public SocialRequest getWrappedModel() {
613                    return _socialRequest;
614            }
615    
616            @Override
617            public boolean isEntityCacheEnabled() {
618                    return _socialRequest.isEntityCacheEnabled();
619            }
620    
621            @Override
622            public boolean isFinderCacheEnabled() {
623                    return _socialRequest.isFinderCacheEnabled();
624            }
625    
626            @Override
627            public void resetOriginalValues() {
628                    _socialRequest.resetOriginalValues();
629            }
630    
631            private final SocialRequest _socialRequest;
632    }