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