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