1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.social.service;
24  
25  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
26  
27  /**
28   * <a href="SocialRequestLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
29   *
30   * <p>
31   * ServiceBuilder generated this class. Modifications in this class will be
32   * overwritten the next time is generated.
33   * </p>
34   *
35   * <p>
36   * This class provides static methods for the
37   * {@link SocialRequestLocalService} bean. The static methods of
38   * this class calls the same methods of the bean instance. It's convenient to be
39   * able to just write one line to call a method on a bean instead of writing a
40   * lookup call and a method call.
41   * </p>
42   *
43   * @author    Brian Wing Shun Chan
44   * @see       SocialRequestLocalService
45   * @generated
46   */
47  public class SocialRequestLocalServiceUtil {
48      public static com.liferay.portlet.social.model.SocialRequest addSocialRequest(
49          com.liferay.portlet.social.model.SocialRequest socialRequest)
50          throws com.liferay.portal.SystemException {
51          return getService().addSocialRequest(socialRequest);
52      }
53  
54      public static com.liferay.portlet.social.model.SocialRequest createSocialRequest(
55          long requestId) {
56          return getService().createSocialRequest(requestId);
57      }
58  
59      public static void deleteSocialRequest(long requestId)
60          throws com.liferay.portal.PortalException,
61              com.liferay.portal.SystemException {
62          getService().deleteSocialRequest(requestId);
63      }
64  
65      public static void deleteSocialRequest(
66          com.liferay.portlet.social.model.SocialRequest socialRequest)
67          throws com.liferay.portal.SystemException {
68          getService().deleteSocialRequest(socialRequest);
69      }
70  
71      public static java.util.List<Object> dynamicQuery(
72          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
73          throws com.liferay.portal.SystemException {
74          return getService().dynamicQuery(dynamicQuery);
75      }
76  
77      public static java.util.List<Object> dynamicQuery(
78          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
79          int end) throws com.liferay.portal.SystemException {
80          return getService().dynamicQuery(dynamicQuery, start, end);
81      }
82  
83      public static com.liferay.portlet.social.model.SocialRequest getSocialRequest(
84          long requestId)
85          throws com.liferay.portal.PortalException,
86              com.liferay.portal.SystemException {
87          return getService().getSocialRequest(requestId);
88      }
89  
90      public static java.util.List<com.liferay.portlet.social.model.SocialRequest> getSocialRequests(
91          int start, int end) throws com.liferay.portal.SystemException {
92          return getService().getSocialRequests(start, end);
93      }
94  
95      public static int getSocialRequestsCount()
96          throws com.liferay.portal.SystemException {
97          return getService().getSocialRequestsCount();
98      }
99  
100     public static com.liferay.portlet.social.model.SocialRequest updateSocialRequest(
101         com.liferay.portlet.social.model.SocialRequest socialRequest)
102         throws com.liferay.portal.SystemException {
103         return getService().updateSocialRequest(socialRequest);
104     }
105 
106     public static com.liferay.portlet.social.model.SocialRequest updateSocialRequest(
107         com.liferay.portlet.social.model.SocialRequest socialRequest,
108         boolean merge) throws com.liferay.portal.SystemException {
109         return getService().updateSocialRequest(socialRequest, merge);
110     }
111 
112     public static com.liferay.portlet.social.model.SocialRequest addRequest(
113         long userId, long groupId, java.lang.String className, long classPK,
114         int type, java.lang.String extraData, long receiverUserId)
115         throws com.liferay.portal.PortalException,
116             com.liferay.portal.SystemException {
117         return getService()
118                    .addRequest(userId, groupId, className, classPK, type,
119             extraData, receiverUserId);
120     }
121 
122     public static void deleteReceiverUserRequests(long receiverUserId)
123         throws com.liferay.portal.SystemException {
124         getService().deleteReceiverUserRequests(receiverUserId);
125     }
126 
127     public static void deleteRequest(long requestId)
128         throws com.liferay.portal.PortalException,
129             com.liferay.portal.SystemException {
130         getService().deleteRequest(requestId);
131     }
132 
133     public static void deleteUserRequests(long userId)
134         throws com.liferay.portal.SystemException {
135         getService().deleteUserRequests(userId);
136     }
137 
138     public static java.util.List<com.liferay.portlet.social.model.SocialRequest> getReceiverUserRequests(
139         long receiverUserId, int start, int end)
140         throws com.liferay.portal.SystemException {
141         return getService().getReceiverUserRequests(receiverUserId, start, end);
142     }
143 
144     public static java.util.List<com.liferay.portlet.social.model.SocialRequest> getReceiverUserRequests(
145         long receiverUserId, int status, int start, int end)
146         throws com.liferay.portal.SystemException {
147         return getService()
148                    .getReceiverUserRequests(receiverUserId, status, start, end);
149     }
150 
151     public static int getReceiverUserRequestsCount(long receiverUserId)
152         throws com.liferay.portal.SystemException {
153         return getService().getReceiverUserRequestsCount(receiverUserId);
154     }
155 
156     public static int getReceiverUserRequestsCount(long receiverUserId,
157         int status) throws com.liferay.portal.SystemException {
158         return getService().getReceiverUserRequestsCount(receiverUserId, status);
159     }
160 
161     public static java.util.List<com.liferay.portlet.social.model.SocialRequest> getUserRequests(
162         long userId, int start, int end)
163         throws com.liferay.portal.SystemException {
164         return getService().getUserRequests(userId, start, end);
165     }
166 
167     public static java.util.List<com.liferay.portlet.social.model.SocialRequest> getUserRequests(
168         long userId, int status, int start, int end)
169         throws com.liferay.portal.SystemException {
170         return getService().getUserRequests(userId, status, start, end);
171     }
172 
173     public static int getUserRequestsCount(long userId)
174         throws com.liferay.portal.SystemException {
175         return getService().getUserRequestsCount(userId);
176     }
177 
178     public static int getUserRequestsCount(long userId, int status)
179         throws com.liferay.portal.SystemException {
180         return getService().getUserRequestsCount(userId, status);
181     }
182 
183     public static boolean hasRequest(long userId, java.lang.String className,
184         long classPK, int type, int status)
185         throws com.liferay.portal.SystemException {
186         return getService().hasRequest(userId, className, classPK, type, status);
187     }
188 
189     public static boolean hasRequest(long userId, java.lang.String className,
190         long classPK, int type, long receiverUserId, int status)
191         throws com.liferay.portal.SystemException {
192         return getService()
193                    .hasRequest(userId, className, classPK, type,
194             receiverUserId, status);
195     }
196 
197     public static com.liferay.portlet.social.model.SocialRequest updateRequest(
198         long requestId, int status,
199         com.liferay.portal.theme.ThemeDisplay themeDisplay)
200         throws com.liferay.portal.PortalException,
201             com.liferay.portal.SystemException {
202         return getService().updateRequest(requestId, status, themeDisplay);
203     }
204 
205     public static SocialRequestLocalService getService() {
206         if (_service == null) {
207             _service = (SocialRequestLocalService)PortalBeanLocatorUtil.locate(SocialRequestLocalService.class.getName());
208         }
209 
210         return _service;
211     }
212 
213     public void setService(SocialRequestLocalService service) {
214         _service = service;
215     }
216 
217     private static SocialRequestLocalService _service;
218 }