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