1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.social.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="SocialRequestLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link SocialRequestLocalService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       SocialRequestLocalService
37   * @generated
38   */
39  public class SocialRequestLocalServiceUtil {
40      public static com.liferay.portlet.social.model.SocialRequest addSocialRequest(
41          com.liferay.portlet.social.model.SocialRequest socialRequest)
42          throws com.liferay.portal.kernel.exception.SystemException {
43          return getService().addSocialRequest(socialRequest);
44      }
45  
46      public static com.liferay.portlet.social.model.SocialRequest createSocialRequest(
47          long requestId) {
48          return getService().createSocialRequest(requestId);
49      }
50  
51      public static void deleteSocialRequest(long requestId)
52          throws com.liferay.portal.kernel.exception.PortalException,
53              com.liferay.portal.kernel.exception.SystemException {
54          getService().deleteSocialRequest(requestId);
55      }
56  
57      public static void deleteSocialRequest(
58          com.liferay.portlet.social.model.SocialRequest socialRequest)
59          throws com.liferay.portal.kernel.exception.SystemException {
60          getService().deleteSocialRequest(socialRequest);
61      }
62  
63      @SuppressWarnings("unchecked")
64      public static java.util.List dynamicQuery(
65          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
66          throws com.liferay.portal.kernel.exception.SystemException {
67          return getService().dynamicQuery(dynamicQuery);
68      }
69  
70      @SuppressWarnings("unchecked")
71      public static java.util.List dynamicQuery(
72          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
73          int end) throws com.liferay.portal.kernel.exception.SystemException {
74          return getService().dynamicQuery(dynamicQuery, start, end);
75      }
76  
77      @SuppressWarnings("unchecked")
78      public static java.util.List dynamicQuery(
79          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
80          int end,
81          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
82          throws com.liferay.portal.kernel.exception.SystemException {
83          return getService()
84                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
85      }
86  
87      public static long dynamicQueryCount(
88          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
89          throws com.liferay.portal.kernel.exception.SystemException {
90          return getService().dynamicQueryCount(dynamicQuery);
91      }
92  
93      public static com.liferay.portlet.social.model.SocialRequest getSocialRequest(
94          long requestId)
95          throws com.liferay.portal.kernel.exception.PortalException,
96              com.liferay.portal.kernel.exception.SystemException {
97          return getService().getSocialRequest(requestId);
98      }
99  
100     public static com.liferay.portlet.social.model.SocialRequest getSocialRequestByUuidAndGroupId(
101         java.lang.String uuid, long groupId)
102         throws com.liferay.portal.kernel.exception.PortalException,
103             com.liferay.portal.kernel.exception.SystemException {
104         return getService().getSocialRequestByUuidAndGroupId(uuid, groupId);
105     }
106 
107     public static java.util.List<com.liferay.portlet.social.model.SocialRequest> getSocialRequests(
108         int start, int end)
109         throws com.liferay.portal.kernel.exception.SystemException {
110         return getService().getSocialRequests(start, end);
111     }
112 
113     public static int getSocialRequestsCount()
114         throws com.liferay.portal.kernel.exception.SystemException {
115         return getService().getSocialRequestsCount();
116     }
117 
118     public static com.liferay.portlet.social.model.SocialRequest updateSocialRequest(
119         com.liferay.portlet.social.model.SocialRequest socialRequest)
120         throws com.liferay.portal.kernel.exception.SystemException {
121         return getService().updateSocialRequest(socialRequest);
122     }
123 
124     public static com.liferay.portlet.social.model.SocialRequest updateSocialRequest(
125         com.liferay.portlet.social.model.SocialRequest socialRequest,
126         boolean merge)
127         throws com.liferay.portal.kernel.exception.SystemException {
128         return getService().updateSocialRequest(socialRequest, merge);
129     }
130 
131     public static com.liferay.portlet.social.model.SocialRequest addRequest(
132         long userId, long groupId, java.lang.String className, long classPK,
133         int type, java.lang.String extraData, long receiverUserId)
134         throws com.liferay.portal.kernel.exception.PortalException,
135             com.liferay.portal.kernel.exception.SystemException {
136         return getService()
137                    .addRequest(userId, groupId, className, classPK, type,
138             extraData, receiverUserId);
139     }
140 
141     public static void deleteReceiverUserRequests(long receiverUserId)
142         throws com.liferay.portal.kernel.exception.SystemException {
143         getService().deleteReceiverUserRequests(receiverUserId);
144     }
145 
146     public static void deleteRequest(long requestId)
147         throws com.liferay.portal.kernel.exception.PortalException,
148             com.liferay.portal.kernel.exception.SystemException {
149         getService().deleteRequest(requestId);
150     }
151 
152     public static void deleteUserRequests(long userId)
153         throws com.liferay.portal.kernel.exception.SystemException {
154         getService().deleteUserRequests(userId);
155     }
156 
157     public static java.util.List<com.liferay.portlet.social.model.SocialRequest> getReceiverUserRequests(
158         long receiverUserId, int start, int end)
159         throws com.liferay.portal.kernel.exception.SystemException {
160         return getService().getReceiverUserRequests(receiverUserId, start, end);
161     }
162 
163     public static java.util.List<com.liferay.portlet.social.model.SocialRequest> getReceiverUserRequests(
164         long receiverUserId, int status, int start, int end)
165         throws com.liferay.portal.kernel.exception.SystemException {
166         return getService()
167                    .getReceiverUserRequests(receiverUserId, status, start, end);
168     }
169 
170     public static int getReceiverUserRequestsCount(long receiverUserId)
171         throws com.liferay.portal.kernel.exception.SystemException {
172         return getService().getReceiverUserRequestsCount(receiverUserId);
173     }
174 
175     public static int getReceiverUserRequestsCount(long receiverUserId,
176         int status) throws com.liferay.portal.kernel.exception.SystemException {
177         return getService().getReceiverUserRequestsCount(receiverUserId, status);
178     }
179 
180     public static java.util.List<com.liferay.portlet.social.model.SocialRequest> getUserRequests(
181         long userId, int start, int end)
182         throws com.liferay.portal.kernel.exception.SystemException {
183         return getService().getUserRequests(userId, start, end);
184     }
185 
186     public static java.util.List<com.liferay.portlet.social.model.SocialRequest> getUserRequests(
187         long userId, int status, int start, int end)
188         throws com.liferay.portal.kernel.exception.SystemException {
189         return getService().getUserRequests(userId, status, start, end);
190     }
191 
192     public static int getUserRequestsCount(long userId)
193         throws com.liferay.portal.kernel.exception.SystemException {
194         return getService().getUserRequestsCount(userId);
195     }
196 
197     public static int getUserRequestsCount(long userId, int status)
198         throws com.liferay.portal.kernel.exception.SystemException {
199         return getService().getUserRequestsCount(userId, status);
200     }
201 
202     public static boolean hasRequest(long userId, java.lang.String className,
203         long classPK, int type, int status)
204         throws com.liferay.portal.kernel.exception.SystemException {
205         return getService().hasRequest(userId, className, classPK, type, status);
206     }
207 
208     public static boolean hasRequest(long userId, java.lang.String className,
209         long classPK, int type, long receiverUserId, int status)
210         throws com.liferay.portal.kernel.exception.SystemException {
211         return getService()
212                    .hasRequest(userId, className, classPK, type,
213             receiverUserId, status);
214     }
215 
216     public static com.liferay.portlet.social.model.SocialRequest updateRequest(
217         long requestId, int status,
218         com.liferay.portal.theme.ThemeDisplay themeDisplay)
219         throws com.liferay.portal.kernel.exception.PortalException,
220             com.liferay.portal.kernel.exception.SystemException {
221         return getService().updateRequest(requestId, status, themeDisplay);
222     }
223 
224     public static SocialRequestLocalService getService() {
225         if (_service == null) {
226             _service = (SocialRequestLocalService)PortalBeanLocatorUtil.locate(SocialRequestLocalService.class.getName());
227         }
228 
229         return _service;
230     }
231 
232     public void setService(SocialRequestLocalService service) {
233         _service = service;
234     }
235 
236     private static SocialRequestLocalService _service;
237 }