001    /**
002     * Copyright (c) 2000-2011 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.service;
016    
017    /**
018     * <p>
019     * This class is a wrapper for {@link SocialRequestLocalService}.
020     * </p>
021     *
022     * @author    Brian Wing Shun Chan
023     * @see       SocialRequestLocalService
024     * @generated
025     */
026    public class SocialRequestLocalServiceWrapper
027            implements SocialRequestLocalService {
028            public SocialRequestLocalServiceWrapper(
029                    SocialRequestLocalService socialRequestLocalService) {
030                    _socialRequestLocalService = socialRequestLocalService;
031            }
032    
033            /**
034            * Adds the social request to the database. Also notifies the appropriate model listeners.
035            *
036            * @param socialRequest the social request
037            * @return the social request that was added
038            * @throws SystemException if a system exception occurred
039            */
040            public com.liferay.portlet.social.model.SocialRequest addSocialRequest(
041                    com.liferay.portlet.social.model.SocialRequest socialRequest)
042                    throws com.liferay.portal.kernel.exception.SystemException {
043                    return _socialRequestLocalService.addSocialRequest(socialRequest);
044            }
045    
046            /**
047            * Creates a new social request with the primary key. Does not add the social request to the database.
048            *
049            * @param requestId the primary key for the new social request
050            * @return the new social request
051            */
052            public com.liferay.portlet.social.model.SocialRequest createSocialRequest(
053                    long requestId) {
054                    return _socialRequestLocalService.createSocialRequest(requestId);
055            }
056    
057            /**
058            * Deletes the social request with the primary key from the database. Also notifies the appropriate model listeners.
059            *
060            * @param requestId the primary key of the social request
061            * @throws PortalException if a social request with the primary key could not be found
062            * @throws SystemException if a system exception occurred
063            */
064            public void deleteSocialRequest(long requestId)
065                    throws com.liferay.portal.kernel.exception.PortalException,
066                            com.liferay.portal.kernel.exception.SystemException {
067                    _socialRequestLocalService.deleteSocialRequest(requestId);
068            }
069    
070            /**
071            * Deletes the social request from the database. Also notifies the appropriate model listeners.
072            *
073            * @param socialRequest the social request
074            * @throws SystemException if a system exception occurred
075            */
076            public void deleteSocialRequest(
077                    com.liferay.portlet.social.model.SocialRequest socialRequest)
078                    throws com.liferay.portal.kernel.exception.SystemException {
079                    _socialRequestLocalService.deleteSocialRequest(socialRequest);
080            }
081    
082            /**
083            * Performs a dynamic query on the database and returns the matching rows.
084            *
085            * @param dynamicQuery the dynamic query
086            * @return the matching rows
087            * @throws SystemException if a system exception occurred
088            */
089            @SuppressWarnings("rawtypes")
090            public java.util.List dynamicQuery(
091                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
092                    throws com.liferay.portal.kernel.exception.SystemException {
093                    return _socialRequestLocalService.dynamicQuery(dynamicQuery);
094            }
095    
096            /**
097            * Performs a dynamic query on the database and returns a range of the matching rows.
098            *
099            * <p>
100            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
101            * </p>
102            *
103            * @param dynamicQuery the dynamic query
104            * @param start the lower bound of the range of model instances
105            * @param end the upper bound of the range of model instances (not inclusive)
106            * @return the range of matching rows
107            * @throws SystemException if a system exception occurred
108            */
109            @SuppressWarnings("rawtypes")
110            public java.util.List dynamicQuery(
111                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
112                    int end) throws com.liferay.portal.kernel.exception.SystemException {
113                    return _socialRequestLocalService.dynamicQuery(dynamicQuery, start, end);
114            }
115    
116            /**
117            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
118            *
119            * <p>
120            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
121            * </p>
122            *
123            * @param dynamicQuery the dynamic query
124            * @param start the lower bound of the range of model instances
125            * @param end the upper bound of the range of model instances (not inclusive)
126            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
127            * @return the ordered range of matching rows
128            * @throws SystemException if a system exception occurred
129            */
130            @SuppressWarnings("rawtypes")
131            public java.util.List dynamicQuery(
132                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
133                    int end,
134                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
135                    throws com.liferay.portal.kernel.exception.SystemException {
136                    return _socialRequestLocalService.dynamicQuery(dynamicQuery, start,
137                            end, orderByComparator);
138            }
139    
140            /**
141            * Returns the number of rows that match the dynamic query.
142            *
143            * @param dynamicQuery the dynamic query
144            * @return the number of rows that match the dynamic query
145            * @throws SystemException if a system exception occurred
146            */
147            public long dynamicQueryCount(
148                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
149                    throws com.liferay.portal.kernel.exception.SystemException {
150                    return _socialRequestLocalService.dynamicQueryCount(dynamicQuery);
151            }
152    
153            /**
154            * Returns the social request with the primary key.
155            *
156            * @param requestId the primary key of the social request
157            * @return the social request
158            * @throws PortalException if a social request with the primary key could not be found
159            * @throws SystemException if a system exception occurred
160            */
161            public com.liferay.portlet.social.model.SocialRequest getSocialRequest(
162                    long requestId)
163                    throws com.liferay.portal.kernel.exception.PortalException,
164                            com.liferay.portal.kernel.exception.SystemException {
165                    return _socialRequestLocalService.getSocialRequest(requestId);
166            }
167    
168            public com.liferay.portal.model.PersistedModel getPersistedModel(
169                    java.io.Serializable primaryKeyObj)
170                    throws com.liferay.portal.kernel.exception.PortalException,
171                            com.liferay.portal.kernel.exception.SystemException {
172                    return _socialRequestLocalService.getPersistedModel(primaryKeyObj);
173            }
174    
175            /**
176            * Returns the social request with the UUID in the group.
177            *
178            * @param uuid the UUID of social request
179            * @param groupId the group id of the social request
180            * @return the social request
181            * @throws PortalException if a social request with the UUID in the group could not be found
182            * @throws SystemException if a system exception occurred
183            */
184            public com.liferay.portlet.social.model.SocialRequest getSocialRequestByUuidAndGroupId(
185                    java.lang.String uuid, long groupId)
186                    throws com.liferay.portal.kernel.exception.PortalException,
187                            com.liferay.portal.kernel.exception.SystemException {
188                    return _socialRequestLocalService.getSocialRequestByUuidAndGroupId(uuid,
189                            groupId);
190            }
191    
192            /**
193            * Returns a range of all the social requests.
194            *
195            * <p>
196            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
197            * </p>
198            *
199            * @param start the lower bound of the range of social requests
200            * @param end the upper bound of the range of social requests (not inclusive)
201            * @return the range of social requests
202            * @throws SystemException if a system exception occurred
203            */
204            public java.util.List<com.liferay.portlet.social.model.SocialRequest> getSocialRequests(
205                    int start, int end)
206                    throws com.liferay.portal.kernel.exception.SystemException {
207                    return _socialRequestLocalService.getSocialRequests(start, end);
208            }
209    
210            /**
211            * Returns the number of social requests.
212            *
213            * @return the number of social requests
214            * @throws SystemException if a system exception occurred
215            */
216            public int getSocialRequestsCount()
217                    throws com.liferay.portal.kernel.exception.SystemException {
218                    return _socialRequestLocalService.getSocialRequestsCount();
219            }
220    
221            /**
222            * Updates the social request in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
223            *
224            * @param socialRequest the social request
225            * @return the social request that was updated
226            * @throws SystemException if a system exception occurred
227            */
228            public com.liferay.portlet.social.model.SocialRequest updateSocialRequest(
229                    com.liferay.portlet.social.model.SocialRequest socialRequest)
230                    throws com.liferay.portal.kernel.exception.SystemException {
231                    return _socialRequestLocalService.updateSocialRequest(socialRequest);
232            }
233    
234            /**
235            * Updates the social request in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
236            *
237            * @param socialRequest the social request
238            * @param merge whether to merge the social request with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
239            * @return the social request that was updated
240            * @throws SystemException if a system exception occurred
241            */
242            public com.liferay.portlet.social.model.SocialRequest updateSocialRequest(
243                    com.liferay.portlet.social.model.SocialRequest socialRequest,
244                    boolean merge)
245                    throws com.liferay.portal.kernel.exception.SystemException {
246                    return _socialRequestLocalService.updateSocialRequest(socialRequest,
247                            merge);
248            }
249    
250            /**
251            * Returns the Spring bean ID for this bean.
252            *
253            * @return the Spring bean ID for this bean
254            */
255            public java.lang.String getBeanIdentifier() {
256                    return _socialRequestLocalService.getBeanIdentifier();
257            }
258    
259            /**
260            * Sets the Spring bean ID for this bean.
261            *
262            * @param beanIdentifier the Spring bean ID for this bean
263            */
264            public void setBeanIdentifier(java.lang.String beanIdentifier) {
265                    _socialRequestLocalService.setBeanIdentifier(beanIdentifier);
266            }
267    
268            /**
269            * Adds a social request to the database.
270            *
271            * <p>
272            * In order to add a social request, both the requesting user and the
273            * receiving user must be from the same company and neither of them can be
274            * the default user.
275            * </p>
276            *
277            * @param userId the primary key of the requesting user
278            * @param groupId the primary key of the group
279            * @param className the class name of the asset that is the subject of the
280            request
281            * @param classPK the primary key of the asset that is the subject of the
282            request
283            * @param type the request's type
284            * @param extraData the extra data regarding the request
285            * @param receiverUserId the primary key of the user receiving the request
286            * @return the social request
287            * @throws PortalException if the users could not be found, if the users
288            were not from the same company, or if either of the users was
289            the default user
290            * @throws SystemException if a system exception occurred
291            */
292            public com.liferay.portlet.social.model.SocialRequest addRequest(
293                    long userId, long groupId, java.lang.String className, long classPK,
294                    int type, java.lang.String extraData, long receiverUserId)
295                    throws com.liferay.portal.kernel.exception.PortalException,
296                            com.liferay.portal.kernel.exception.SystemException {
297                    return _socialRequestLocalService.addRequest(userId, groupId,
298                            className, classPK, type, extraData, receiverUserId);
299            }
300    
301            /**
302            * Removes all the social requests for the receiving user.
303            *
304            * @param receiverUserId the primary key of the receiving user
305            * @throws SystemException if a system exception occurred
306            */
307            public void deleteReceiverUserRequests(long receiverUserId)
308                    throws com.liferay.portal.kernel.exception.SystemException {
309                    _socialRequestLocalService.deleteReceiverUserRequests(receiverUserId);
310            }
311    
312            /**
313            * Removes the social request identified by its primary key from the
314            * database.
315            *
316            * @param requestId the primary key of the social request
317            * @throws PortalException if the social request could not be found
318            * @throws SystemException if a system exception occurred
319            */
320            public void deleteRequest(long requestId)
321                    throws com.liferay.portal.kernel.exception.PortalException,
322                            com.liferay.portal.kernel.exception.SystemException {
323                    _socialRequestLocalService.deleteRequest(requestId);
324            }
325    
326            /**
327            * Removes the social request from the database.
328            *
329            * @param request the social request to be removed
330            * @throws SystemException if a system exception occurred
331            */
332            public void deleteRequest(
333                    com.liferay.portlet.social.model.SocialRequest request)
334                    throws com.liferay.portal.kernel.exception.SystemException {
335                    _socialRequestLocalService.deleteRequest(request);
336            }
337    
338            /**
339            * Removes all the social requests for the requesting user.
340            *
341            * @param userId the primary key of the requesting user
342            * @throws SystemException if a system exception occurred
343            */
344            public void deleteUserRequests(long userId)
345                    throws com.liferay.portal.kernel.exception.SystemException {
346                    _socialRequestLocalService.deleteUserRequests(userId);
347            }
348    
349            /**
350            * Returns a range of all the social requests for the receiving user.
351            *
352            * <p>
353            * Useful when paginating results. Returns a maximum of <code>end -
354            * start</code> instances. <code>start</code> and <code>end</code> are not
355            * primary keys, they are indexes in the result set. Thus, <code>0</code>
356            * refers to the first result in the set. Setting both <code>start</code>
357            * and <code>end</code> to {@link
358            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the
359            * full result set.
360            * </p>
361            *
362            * @param receiverUserId the primary key of the receiving user
363            * @param start the lower bound of the range of results
364            * @param end the upper bound of the range of results (not inclusive)
365            * @return the range of matching social requests
366            * @throws SystemException if a system exception occurred
367            */
368            public java.util.List<com.liferay.portlet.social.model.SocialRequest> getReceiverUserRequests(
369                    long receiverUserId, int start, int end)
370                    throws com.liferay.portal.kernel.exception.SystemException {
371                    return _socialRequestLocalService.getReceiverUserRequests(receiverUserId,
372                            start, end);
373            }
374    
375            /**
376            * Returns a range of all the social requests with the given status for the
377            * receiving user.
378            *
379            * <p>
380            * Useful when paginating results. Returns a maximum of <code>end -
381            * start</code> instances. <code>start</code> and <code>end</code> are not
382            * primary keys, they are indexes in the result set. Thus, <code>0</code>
383            * refers to the first result in the set. Setting both <code>start</code>
384            * and <code>end</code> to {@link
385            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the
386            * full result set.
387            * </p>
388            *
389            * @param receiverUserId the primary key of the receiving user
390            * @param status the social request's status
391            * @param start the lower bound of the range of results
392            * @param end the upper bound of the range of results (not inclusive)
393            * @return the range of matching social requests
394            * @throws SystemException if a system exception occurred
395            */
396            public java.util.List<com.liferay.portlet.social.model.SocialRequest> getReceiverUserRequests(
397                    long receiverUserId, int status, int start, int end)
398                    throws com.liferay.portal.kernel.exception.SystemException {
399                    return _socialRequestLocalService.getReceiverUserRequests(receiverUserId,
400                            status, start, end);
401            }
402    
403            /**
404            * Returns the number of social requests for the receiving user.
405            *
406            * @param receiverUserId the primary key of the receiving user
407            * @return the number of matching social requests
408            * @throws SystemException if a system exception occurred
409            */
410            public int getReceiverUserRequestsCount(long receiverUserId)
411                    throws com.liferay.portal.kernel.exception.SystemException {
412                    return _socialRequestLocalService.getReceiverUserRequestsCount(receiverUserId);
413            }
414    
415            /**
416            * Returns the number of social requests with the given status for the
417            * receiving user.
418            *
419            * @param receiverUserId the primary key of the receiving user
420            * @param status the social request's status
421            * @return the number of matching social requests
422            * @throws SystemException if a system exception occurred
423            */
424            public int getReceiverUserRequestsCount(long receiverUserId, int status)
425                    throws com.liferay.portal.kernel.exception.SystemException {
426                    return _socialRequestLocalService.getReceiverUserRequestsCount(receiverUserId,
427                            status);
428            }
429    
430            /**
431            * Returns a range of all the social requests for the requesting user.
432            *
433            * <p>
434            * Useful when paginating results. Returns a maximum of <code>end -
435            * start</code> instances. <code>start</code> and <code>end</code> are not
436            * primary keys, they are indexes in the result set. Thus, <code>0</code>
437            * refers to the first result in the set. Setting both <code>start</code>
438            * and <code>end</code> to {@link
439            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the
440            * full result set.
441            * </p>
442            *
443            * @param userId the primary key of the requesting user
444            * @param start the lower bound of the range of results
445            * @param end the upper bound of the range of results (not inclusive)
446            * @return the range of matching social requests
447            * @throws SystemException if a system exception occurred
448            */
449            public java.util.List<com.liferay.portlet.social.model.SocialRequest> getUserRequests(
450                    long userId, int start, int end)
451                    throws com.liferay.portal.kernel.exception.SystemException {
452                    return _socialRequestLocalService.getUserRequests(userId, start, end);
453            }
454    
455            /**
456            * Returns a range of all the social requests with the given status for the
457            * requesting user.
458            *
459            * <p>
460            * Useful when paginating results. Returns a maximum of <code>end -
461            * start</code> instances. <code>start</code> and <code>end</code> are not
462            * primary keys, they are indexes in the result set. Thus, <code>0</code>
463            * refers to the first result in the set. Setting both <code>start</code>
464            * and <code>end</code> to {@link
465            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the
466            * full result set.
467            * </p>
468            *
469            * @param userId the primary key of the requesting user
470            * @param status the social request's status
471            * @param start the lower bound of the range of results
472            * @param end the upper bound of the range of results (not inclusive)
473            * @return the range of matching social requests
474            * @throws SystemException if a system exception occurred
475            */
476            public java.util.List<com.liferay.portlet.social.model.SocialRequest> getUserRequests(
477                    long userId, int status, int start, int end)
478                    throws com.liferay.portal.kernel.exception.SystemException {
479                    return _socialRequestLocalService.getUserRequests(userId, status,
480                            start, end);
481            }
482    
483            /**
484            * Returns the number of social requests for the requesting user.
485            *
486            * @param userId the primary key of the requesting user
487            * @return the number of matching social requests
488            * @throws SystemException if a system exception occurred
489            */
490            public int getUserRequestsCount(long userId)
491                    throws com.liferay.portal.kernel.exception.SystemException {
492                    return _socialRequestLocalService.getUserRequestsCount(userId);
493            }
494    
495            /**
496            * Returns the number of social requests with the given status for the
497            * requesting user.
498            *
499            * @param userId the primary key of the requesting user
500            * @param status the social request's status
501            * @return the number of matching social request
502            * @throws SystemException if a system exception occurred
503            */
504            public int getUserRequestsCount(long userId, int status)
505                    throws com.liferay.portal.kernel.exception.SystemException {
506                    return _socialRequestLocalService.getUserRequestsCount(userId, status);
507            }
508    
509            /**
510            * Returns <code>true</code> if a matching social requests exists in the
511            * database.
512            *
513            * @param userId the primary key of the requesting user
514            * @param className the class name of the asset that is the subject of the
515            request
516            * @param classPK the primary key of the asset that is the subject of the
517            request
518            * @param type the request's type
519            * @param status the social request's status
520            * @return <code>true</code> if the request exists; <code>false</code>
521            otherwise
522            * @throws SystemException if a system exception occurred
523            */
524            public boolean hasRequest(long userId, java.lang.String className,
525                    long classPK, int type, int status)
526                    throws com.liferay.portal.kernel.exception.SystemException {
527                    return _socialRequestLocalService.hasRequest(userId, className,
528                            classPK, type, status);
529            }
530    
531            /**
532            * Returns <code>true</code> if a matching social request exists in the
533            * database.
534            *
535            * @param userId the primary key of the requesting user
536            * @param className the class name of the asset that is the subject of the
537            request
538            * @param classPK the primary key of the asset that is the subject of the
539            request
540            * @param type the request's type
541            * @param receiverUserId the primary key of the receiving user
542            * @param status the social request's status
543            * @return <code>true</code> if the social request exists;
544            <code>false</code> otherwise
545            * @throws SystemException if a system exception occurred
546            */
547            public boolean hasRequest(long userId, java.lang.String className,
548                    long classPK, int type, long receiverUserId, int status)
549                    throws com.liferay.portal.kernel.exception.SystemException {
550                    return _socialRequestLocalService.hasRequest(userId, className,
551                            classPK, type, receiverUserId, status);
552            }
553    
554            /**
555            * Updates the social request replacing its status.
556            *
557            * <p>
558            * If the status is updated to {@link
559            * com.liferay.portlet.social.model.SocialRequestConstants#STATUS_CONFIRM}
560            * then {@link
561            * com.liferay.portlet.social.service.SocialRequestInterpreterLocalService#processConfirmation(
562            * SocialRequest, ThemeDisplay)} is called. If the status is updated to
563            * {@link
564            * com.liferay.portlet.social.model.SocialRequestConstants#STATUS_IGNORE}
565            * then {@link
566            * com.liferay.portlet.social.service.SocialRequestInterpreterLocalService#processRejection(
567            * SocialRequest, ThemeDisplay)} is called.
568            * </p>
569            *
570            * @param requestId the primary key of the social request
571            * @param status the new status
572            * @param themeDisplay the theme display
573            * @return the updated social request
574            * @throws PortalException if the social request could not be found
575            * @throws SystemException if a system exception occurred
576            */
577            public com.liferay.portlet.social.model.SocialRequest updateRequest(
578                    long requestId, int status,
579                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
580                    throws com.liferay.portal.kernel.exception.PortalException,
581                            com.liferay.portal.kernel.exception.SystemException {
582                    return _socialRequestLocalService.updateRequest(requestId, status,
583                            themeDisplay);
584            }
585    
586            public SocialRequestLocalService getWrappedSocialRequestLocalService() {
587                    return _socialRequestLocalService;
588            }
589    
590            public void setWrappedSocialRequestLocalService(
591                    SocialRequestLocalService socialRequestLocalService) {
592                    _socialRequestLocalService = socialRequestLocalService;
593            }
594    
595            private SocialRequestLocalService _socialRequestLocalService;
596    }