1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portlet.messageboards.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.util.MethodCache;
19  import com.liferay.portal.kernel.util.ReferenceRegistry;
20  
21  /**
22   * <a href="MBBanLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
23   *
24   * <p>
25   * ServiceBuilder generated this class. Modifications in this class will be
26   * overwritten the next time is generated.
27   * </p>
28   *
29   * <p>
30   * This class provides static methods for the
31   * {@link MBBanLocalService} bean. The static methods of
32   * this class calls the same methods of the bean instance. It's convenient to be
33   * able to just write one line to call a method on a bean instead of writing a
34   * lookup call and a method call.
35   * </p>
36   *
37   * @author    Brian Wing Shun Chan
38   * @see       MBBanLocalService
39   * @generated
40   */
41  public class MBBanLocalServiceUtil {
42      public static com.liferay.portlet.messageboards.model.MBBan addMBBan(
43          com.liferay.portlet.messageboards.model.MBBan mbBan)
44          throws com.liferay.portal.SystemException {
45          return getService().addMBBan(mbBan);
46      }
47  
48      public static com.liferay.portlet.messageboards.model.MBBan createMBBan(
49          long banId) {
50          return getService().createMBBan(banId);
51      }
52  
53      public static void deleteMBBan(long banId)
54          throws com.liferay.portal.PortalException,
55              com.liferay.portal.SystemException {
56          getService().deleteMBBan(banId);
57      }
58  
59      public static void deleteMBBan(
60          com.liferay.portlet.messageboards.model.MBBan mbBan)
61          throws com.liferay.portal.SystemException {
62          getService().deleteMBBan(mbBan);
63      }
64  
65      @SuppressWarnings("rawtypes")
66      public static java.util.List dynamicQuery(
67          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
68          throws com.liferay.portal.SystemException {
69          return getService().dynamicQuery(dynamicQuery);
70      }
71  
72      @SuppressWarnings("rawtypes")
73      public static java.util.List dynamicQuery(
74          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
75          int end) throws com.liferay.portal.SystemException {
76          return getService().dynamicQuery(dynamicQuery, start, end);
77      }
78  
79      @SuppressWarnings("rawtypes")
80      public static java.util.List dynamicQuery(
81          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
82          int end,
83          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
84          throws com.liferay.portal.SystemException {
85          return getService()
86                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
87      }
88  
89      public static int dynamicQueryCount(
90          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
91          throws com.liferay.portal.SystemException {
92          return getService().dynamicQueryCount(dynamicQuery);
93      }
94  
95      public static com.liferay.portlet.messageboards.model.MBBan getMBBan(
96          long banId)
97          throws com.liferay.portal.PortalException,
98              com.liferay.portal.SystemException {
99          return getService().getMBBan(banId);
100     }
101 
102     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> getMBBans(
103         int start, int end) throws com.liferay.portal.SystemException {
104         return getService().getMBBans(start, end);
105     }
106 
107     public static int getMBBansCount()
108         throws com.liferay.portal.SystemException {
109         return getService().getMBBansCount();
110     }
111 
112     public static com.liferay.portlet.messageboards.model.MBBan updateMBBan(
113         com.liferay.portlet.messageboards.model.MBBan mbBan)
114         throws com.liferay.portal.SystemException {
115         return getService().updateMBBan(mbBan);
116     }
117 
118     public static com.liferay.portlet.messageboards.model.MBBan updateMBBan(
119         com.liferay.portlet.messageboards.model.MBBan mbBan, boolean merge)
120         throws com.liferay.portal.SystemException {
121         return getService().updateMBBan(mbBan, merge);
122     }
123 
124     public static com.liferay.portlet.messageboards.model.MBBan addBan(
125         long userId, long banUserId,
126         com.liferay.portal.service.ServiceContext serviceContext)
127         throws com.liferay.portal.PortalException,
128             com.liferay.portal.SystemException {
129         return getService().addBan(userId, banUserId, serviceContext);
130     }
131 
132     public static void checkBan(long groupId, long banUserId)
133         throws com.liferay.portal.PortalException,
134             com.liferay.portal.SystemException {
135         getService().checkBan(groupId, banUserId);
136     }
137 
138     public static void deleteBan(long banUserId,
139         com.liferay.portal.service.ServiceContext serviceContext)
140         throws com.liferay.portal.SystemException {
141         getService().deleteBan(banUserId, serviceContext);
142     }
143 
144     public static void deleteBansByBanUserId(long banUserId)
145         throws com.liferay.portal.SystemException {
146         getService().deleteBansByBanUserId(banUserId);
147     }
148 
149     public static void deleteBansByGroupId(long groupId)
150         throws com.liferay.portal.SystemException {
151         getService().deleteBansByGroupId(groupId);
152     }
153 
154     public static void expireBans() throws com.liferay.portal.SystemException {
155         getService().expireBans();
156     }
157 
158     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> getBans(
159         long groupId, int start, int end)
160         throws com.liferay.portal.SystemException {
161         return getService().getBans(groupId, start, end);
162     }
163 
164     public static int getBansCount(long groupId)
165         throws com.liferay.portal.SystemException {
166         return getService().getBansCount(groupId);
167     }
168 
169     public static boolean hasBan(long groupId, long banUserId)
170         throws com.liferay.portal.SystemException {
171         return getService().hasBan(groupId, banUserId);
172     }
173 
174     public static MBBanLocalService getService() {
175         if (_service == null) {
176             _service = (MBBanLocalService)PortalBeanLocatorUtil.locate(MBBanLocalService.class.getName());
177 
178             ReferenceRegistry.registerReference(MBBanLocalServiceUtil.class,
179                 "_service");
180             MethodCache.remove(MBBanLocalService.class);
181         }
182 
183         return _service;
184     }
185 
186     public void setService(MBBanLocalService service) {
187         MethodCache.remove(MBBanLocalService.class);
188 
189         _service = service;
190 
191         ReferenceRegistry.registerReference(MBBanLocalServiceUtil.class,
192             "_service");
193         MethodCache.remove(MBBanLocalService.class);
194     }
195 
196     private static MBBanLocalService _service;
197 }