1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions 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  
26  /**
27   * <a href="SocialRequestLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This class provides static methods for the
36   * <code>com.liferay.portlet.social.service.SocialRequestLocalService</code>
37   * bean. The static methods of this class calls the same methods of the bean
38   * instance. It's convenient to be able to just write one line to call a method
39   * on a bean instead of writing a lookup call and a method call.
40   * </p>
41   *
42   * <p>
43   * <code>com.liferay.portlet.social.service.SocialRequestLocalServiceFactory</code>
44   * is responsible for the lookup of the bean.
45   * </p>
46   *
47   * @author Brian Wing Shun Chan
48   *
49   * @see com.liferay.portlet.social.service.SocialRequestLocalService
50   * @see com.liferay.portlet.social.service.SocialRequestLocalServiceFactory
51   *
52   */
53  public class SocialRequestLocalServiceUtil {
54      public static com.liferay.portlet.social.model.SocialRequest addSocialRequest(
55          com.liferay.portlet.social.model.SocialRequest socialRequest)
56          throws com.liferay.portal.SystemException {
57          SocialRequestLocalService socialRequestLocalService = SocialRequestLocalServiceFactory.getService();
58  
59          return socialRequestLocalService.addSocialRequest(socialRequest);
60      }
61  
62      public static void deleteSocialRequest(long requestId)
63          throws com.liferay.portal.PortalException,
64              com.liferay.portal.SystemException {
65          SocialRequestLocalService socialRequestLocalService = SocialRequestLocalServiceFactory.getService();
66  
67          socialRequestLocalService.deleteSocialRequest(requestId);
68      }
69  
70      public static void deleteSocialRequest(
71          com.liferay.portlet.social.model.SocialRequest socialRequest)
72          throws com.liferay.portal.SystemException {
73          SocialRequestLocalService socialRequestLocalService = SocialRequestLocalServiceFactory.getService();
74  
75          socialRequestLocalService.deleteSocialRequest(socialRequest);
76      }
77  
78      public static java.util.List<Object> dynamicQuery(
79          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
80          throws com.liferay.portal.SystemException {
81          SocialRequestLocalService socialRequestLocalService = SocialRequestLocalServiceFactory.getService();
82  
83          return socialRequestLocalService.dynamicQuery(dynamicQuery);
84      }
85  
86      public static java.util.List<Object> dynamicQuery(
87          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
88          int end) throws com.liferay.portal.SystemException {
89          SocialRequestLocalService socialRequestLocalService = SocialRequestLocalServiceFactory.getService();
90  
91          return socialRequestLocalService.dynamicQuery(dynamicQuery, start, end);
92      }
93  
94      public static com.liferay.portlet.social.model.SocialRequest getSocialRequest(
95          long requestId)
96          throws com.liferay.portal.PortalException,
97              com.liferay.portal.SystemException {
98          SocialRequestLocalService socialRequestLocalService = SocialRequestLocalServiceFactory.getService();
99  
100         return socialRequestLocalService.getSocialRequest(requestId);
101     }
102 
103     public static com.liferay.portlet.social.model.SocialRequest updateSocialRequest(
104         com.liferay.portlet.social.model.SocialRequest socialRequest)
105         throws com.liferay.portal.SystemException {
106         SocialRequestLocalService socialRequestLocalService = SocialRequestLocalServiceFactory.getService();
107 
108         return socialRequestLocalService.updateSocialRequest(socialRequest);
109     }
110 
111     public static com.liferay.portlet.social.model.SocialRequest addRequest(
112         long userId, long groupId, java.lang.String className, long classPK,
113         int type, java.lang.String extraData, long receiverUserId)
114         throws com.liferay.portal.PortalException,
115             com.liferay.portal.SystemException {
116         SocialRequestLocalService socialRequestLocalService = SocialRequestLocalServiceFactory.getService();
117 
118         return socialRequestLocalService.addRequest(userId, groupId, className,
119             classPK, type, extraData, receiverUserId);
120     }
121 
122     public static void deleteReceiverUserRequests(long receiverUserId)
123         throws com.liferay.portal.SystemException {
124         SocialRequestLocalService socialRequestLocalService = SocialRequestLocalServiceFactory.getService();
125 
126         socialRequestLocalService.deleteReceiverUserRequests(receiverUserId);
127     }
128 
129     public static void deleteRequest(long requestId)
130         throws com.liferay.portal.PortalException,
131             com.liferay.portal.SystemException {
132         SocialRequestLocalService socialRequestLocalService = SocialRequestLocalServiceFactory.getService();
133 
134         socialRequestLocalService.deleteRequest(requestId);
135     }
136 
137     public static void deleteUserRequests(long userId)
138         throws com.liferay.portal.SystemException {
139         SocialRequestLocalService socialRequestLocalService = SocialRequestLocalServiceFactory.getService();
140 
141         socialRequestLocalService.deleteUserRequests(userId);
142     }
143 
144     public static java.util.List<com.liferay.portlet.social.model.SocialRequest> getReceiverUserRequests(
145         long receiverUserId, int start, int end)
146         throws com.liferay.portal.SystemException {
147         SocialRequestLocalService socialRequestLocalService = SocialRequestLocalServiceFactory.getService();
148 
149         return socialRequestLocalService.getReceiverUserRequests(receiverUserId,
150             start, end);
151     }
152 
153     public static java.util.List<com.liferay.portlet.social.model.SocialRequest> getReceiverUserRequests(
154         long receiverUserId, int status, int start, int end)
155         throws com.liferay.portal.SystemException {
156         SocialRequestLocalService socialRequestLocalService = SocialRequestLocalServiceFactory.getService();
157 
158         return socialRequestLocalService.getReceiverUserRequests(receiverUserId,
159             status, start, end);
160     }
161 
162     public static int getReceiverUserRequestsCount(long receiverUserId)
163         throws com.liferay.portal.SystemException {
164         SocialRequestLocalService socialRequestLocalService = SocialRequestLocalServiceFactory.getService();
165 
166         return socialRequestLocalService.getReceiverUserRequestsCount(receiverUserId);
167     }
168 
169     public static int getReceiverUserRequestsCount(long receiverUserId,
170         int status) throws com.liferay.portal.SystemException {
171         SocialRequestLocalService socialRequestLocalService = SocialRequestLocalServiceFactory.getService();
172 
173         return socialRequestLocalService.getReceiverUserRequestsCount(receiverUserId,
174             status);
175     }
176 
177     public static java.util.List<com.liferay.portlet.social.model.SocialRequest> getUserRequests(
178         long userId, int start, int end)
179         throws com.liferay.portal.SystemException {
180         SocialRequestLocalService socialRequestLocalService = SocialRequestLocalServiceFactory.getService();
181 
182         return socialRequestLocalService.getUserRequests(userId, start, end);
183     }
184 
185     public static java.util.List<com.liferay.portlet.social.model.SocialRequest> getUserRequests(
186         long userId, int status, int start, int end)
187         throws com.liferay.portal.SystemException {
188         SocialRequestLocalService socialRequestLocalService = SocialRequestLocalServiceFactory.getService();
189 
190         return socialRequestLocalService.getUserRequests(userId, status, start,
191             end);
192     }
193 
194     public static int getUserRequestsCount(long userId)
195         throws com.liferay.portal.SystemException {
196         SocialRequestLocalService socialRequestLocalService = SocialRequestLocalServiceFactory.getService();
197 
198         return socialRequestLocalService.getUserRequestsCount(userId);
199     }
200 
201     public static int getUserRequestsCount(long userId, int status)
202         throws com.liferay.portal.SystemException {
203         SocialRequestLocalService socialRequestLocalService = SocialRequestLocalServiceFactory.getService();
204 
205         return socialRequestLocalService.getUserRequestsCount(userId, status);
206     }
207 
208     public static boolean hasRequest(long userId, java.lang.String className,
209         long classPK, int type, int status)
210         throws com.liferay.portal.SystemException {
211         SocialRequestLocalService socialRequestLocalService = SocialRequestLocalServiceFactory.getService();
212 
213         return socialRequestLocalService.hasRequest(userId, className, classPK,
214             type, status);
215     }
216 
217     public static boolean hasRequest(long userId, java.lang.String className,
218         long classPK, int type, long receiverUserId, int status)
219         throws com.liferay.portal.SystemException {
220         SocialRequestLocalService socialRequestLocalService = SocialRequestLocalServiceFactory.getService();
221 
222         return socialRequestLocalService.hasRequest(userId, className, classPK,
223             type, receiverUserId, status);
224     }
225 
226     public static com.liferay.portlet.social.model.SocialRequest updateRequest(
227         long requestId, int status,
228         com.liferay.portal.theme.ThemeDisplay themeDisplay)
229         throws com.liferay.portal.PortalException,
230             com.liferay.portal.SystemException {
231         SocialRequestLocalService socialRequestLocalService = SocialRequestLocalServiceFactory.getService();
232 
233         return socialRequestLocalService.updateRequest(requestId, status,
234             themeDisplay);
235     }
236 }