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