001    /**
002     * Copyright (c) 2000-present 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.messageboards.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 MBBan. This utility wraps
024     * {@link com.liferay.portlet.messageboards.service.impl.MBBanLocalServiceImpl} 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 MBBanLocalService
032     * @see com.liferay.portlet.messageboards.service.base.MBBanLocalServiceBaseImpl
033     * @see com.liferay.portlet.messageboards.service.impl.MBBanLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class MBBanLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.messageboards.service.impl.MBBanLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043            public static com.liferay.portlet.messageboards.model.MBBan addBan(
044                    long userId, long banUserId,
045                    com.liferay.portal.service.ServiceContext serviceContext)
046                    throws com.liferay.portal.kernel.exception.PortalException {
047                    return getService().addBan(userId, banUserId, serviceContext);
048            }
049    
050            /**
051            * Adds the message boards ban to the database. Also notifies the appropriate model listeners.
052            *
053            * @param mbBan the message boards ban
054            * @return the message boards ban that was added
055            */
056            public static com.liferay.portlet.messageboards.model.MBBan addMBBan(
057                    com.liferay.portlet.messageboards.model.MBBan mbBan) {
058                    return getService().addMBBan(mbBan);
059            }
060    
061            public static void checkBan(long groupId, long banUserId)
062                    throws com.liferay.portal.kernel.exception.PortalException {
063                    getService().checkBan(groupId, banUserId);
064            }
065    
066            /**
067            * Creates a new message boards ban with the primary key. Does not add the message boards ban to the database.
068            *
069            * @param banId the primary key for the new message boards ban
070            * @return the new message boards ban
071            */
072            public static com.liferay.portlet.messageboards.model.MBBan createMBBan(
073                    long banId) {
074                    return getService().createMBBan(banId);
075            }
076    
077            public static void deleteBan(
078                    com.liferay.portlet.messageboards.model.MBBan ban) {
079                    getService().deleteBan(ban);
080            }
081    
082            public static void deleteBan(long banId)
083                    throws com.liferay.portal.kernel.exception.PortalException {
084                    getService().deleteBan(banId);
085            }
086    
087            public static void deleteBan(long banUserId,
088                    com.liferay.portal.service.ServiceContext serviceContext) {
089                    getService().deleteBan(banUserId, serviceContext);
090            }
091    
092            public static void deleteBansByBanUserId(long banUserId) {
093                    getService().deleteBansByBanUserId(banUserId);
094            }
095    
096            public static void deleteBansByGroupId(long groupId) {
097                    getService().deleteBansByGroupId(groupId);
098            }
099    
100            /**
101            * Deletes the message boards ban with the primary key from the database. Also notifies the appropriate model listeners.
102            *
103            * @param banId the primary key of the message boards ban
104            * @return the message boards ban that was removed
105            * @throws PortalException if a message boards ban with the primary key could not be found
106            */
107            public static com.liferay.portlet.messageboards.model.MBBan deleteMBBan(
108                    long banId) throws com.liferay.portal.kernel.exception.PortalException {
109                    return getService().deleteMBBan(banId);
110            }
111    
112            /**
113            * Deletes the message boards ban from the database. Also notifies the appropriate model listeners.
114            *
115            * @param mbBan the message boards ban
116            * @return the message boards ban that was removed
117            */
118            public static com.liferay.portlet.messageboards.model.MBBan deleteMBBan(
119                    com.liferay.portlet.messageboards.model.MBBan mbBan) {
120                    return getService().deleteMBBan(mbBan);
121            }
122    
123            /**
124            * @throws PortalException
125            */
126            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
127                    com.liferay.portal.model.PersistedModel persistedModel)
128                    throws com.liferay.portal.kernel.exception.PortalException {
129                    return getService().deletePersistedModel(persistedModel);
130            }
131    
132            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
133                    return getService().dynamicQuery();
134            }
135    
136            /**
137            * Performs a dynamic query on the database and returns the matching rows.
138            *
139            * @param dynamicQuery the dynamic query
140            * @return the matching rows
141            */
142            public static <T> java.util.List<T> dynamicQuery(
143                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
144                    return getService().dynamicQuery(dynamicQuery);
145            }
146    
147            /**
148            * Performs a dynamic query on the database and returns a range of the matching rows.
149            *
150            * <p>
151            * 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.messageboards.model.impl.MBBanModelImpl}. 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.
152            * </p>
153            *
154            * @param dynamicQuery the dynamic query
155            * @param start the lower bound of the range of model instances
156            * @param end the upper bound of the range of model instances (not inclusive)
157            * @return the range of matching rows
158            */
159            public static <T> java.util.List<T> dynamicQuery(
160                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
161                    int end) {
162                    return getService().dynamicQuery(dynamicQuery, start, end);
163            }
164    
165            /**
166            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
167            *
168            * <p>
169            * 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.messageboards.model.impl.MBBanModelImpl}. 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.
170            * </p>
171            *
172            * @param dynamicQuery the dynamic query
173            * @param start the lower bound of the range of model instances
174            * @param end the upper bound of the range of model instances (not inclusive)
175            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
176            * @return the ordered range of matching rows
177            */
178            public static <T> java.util.List<T> dynamicQuery(
179                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
180                    int end,
181                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
182                    return getService()
183                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
184            }
185    
186            /**
187            * Returns the number of rows matching the dynamic query.
188            *
189            * @param dynamicQuery the dynamic query
190            * @return the number of rows matching the dynamic query
191            */
192            public static long dynamicQueryCount(
193                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
194                    return getService().dynamicQueryCount(dynamicQuery);
195            }
196    
197            /**
198            * Returns the number of rows matching the dynamic query.
199            *
200            * @param dynamicQuery the dynamic query
201            * @param projection the projection to apply to the query
202            * @return the number of rows matching the dynamic query
203            */
204            public static long dynamicQueryCount(
205                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
206                    com.liferay.portal.kernel.dao.orm.Projection projection) {
207                    return getService().dynamicQueryCount(dynamicQuery, projection);
208            }
209    
210            public static void expireBans() {
211                    getService().expireBans();
212            }
213    
214            public static com.liferay.portlet.messageboards.model.MBBan fetchMBBan(
215                    long banId) {
216                    return getService().fetchMBBan(banId);
217            }
218    
219            /**
220            * Returns the message boards ban matching the UUID and group.
221            *
222            * @param uuid the message boards ban's UUID
223            * @param groupId the primary key of the group
224            * @return the matching message boards ban, or <code>null</code> if a matching message boards ban could not be found
225            */
226            public static com.liferay.portlet.messageboards.model.MBBan fetchMBBanByUuidAndGroupId(
227                    java.lang.String uuid, long groupId) {
228                    return getService().fetchMBBanByUuidAndGroupId(uuid, groupId);
229            }
230    
231            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
232                    return getService().getActionableDynamicQuery();
233            }
234    
235            public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> getBans(
236                    long groupId, int start, int end) {
237                    return getService().getBans(groupId, start, end);
238            }
239    
240            public static int getBansCount(long groupId) {
241                    return getService().getBansCount(groupId);
242            }
243    
244            public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
245                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext) {
246                    return getService().getExportActionableDynamicQuery(portletDataContext);
247            }
248    
249            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
250                    return getService().getIndexableActionableDynamicQuery();
251            }
252    
253            /**
254            * Returns the message boards ban with the primary key.
255            *
256            * @param banId the primary key of the message boards ban
257            * @return the message boards ban
258            * @throws PortalException if a message boards ban with the primary key could not be found
259            */
260            public static com.liferay.portlet.messageboards.model.MBBan getMBBan(
261                    long banId) throws com.liferay.portal.kernel.exception.PortalException {
262                    return getService().getMBBan(banId);
263            }
264    
265            /**
266            * Returns the message boards ban matching the UUID and group.
267            *
268            * @param uuid the message boards ban's UUID
269            * @param groupId the primary key of the group
270            * @return the matching message boards ban
271            * @throws PortalException if a matching message boards ban could not be found
272            */
273            public static com.liferay.portlet.messageboards.model.MBBan getMBBanByUuidAndGroupId(
274                    java.lang.String uuid, long groupId)
275                    throws com.liferay.portal.kernel.exception.PortalException {
276                    return getService().getMBBanByUuidAndGroupId(uuid, groupId);
277            }
278    
279            /**
280            * Returns a range of all the message boards bans.
281            *
282            * <p>
283            * 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.messageboards.model.impl.MBBanModelImpl}. 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.
284            * </p>
285            *
286            * @param start the lower bound of the range of message boards bans
287            * @param end the upper bound of the range of message boards bans (not inclusive)
288            * @return the range of message boards bans
289            */
290            public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> getMBBans(
291                    int start, int end) {
292                    return getService().getMBBans(start, end);
293            }
294    
295            /**
296            * Returns all the message boards bans matching the UUID and company.
297            *
298            * @param uuid the UUID of the message boards bans
299            * @param companyId the primary key of the company
300            * @return the matching message boards bans, or an empty list if no matches were found
301            */
302            public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> getMBBansByUuidAndCompanyId(
303                    java.lang.String uuid, long companyId) {
304                    return getService().getMBBansByUuidAndCompanyId(uuid, companyId);
305            }
306    
307            /**
308            * Returns a range of message boards bans matching the UUID and company.
309            *
310            * @param uuid the UUID of the message boards bans
311            * @param companyId the primary key of the company
312            * @param start the lower bound of the range of message boards bans
313            * @param end the upper bound of the range of message boards bans (not inclusive)
314            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
315            * @return the range of matching message boards bans, or an empty list if no matches were found
316            */
317            public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> getMBBansByUuidAndCompanyId(
318                    java.lang.String uuid, long companyId, int start, int end,
319                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) {
320                    return getService()
321                                       .getMBBansByUuidAndCompanyId(uuid, companyId, start, end,
322                            orderByComparator);
323            }
324    
325            /**
326            * Returns the number of message boards bans.
327            *
328            * @return the number of message boards bans
329            */
330            public static int getMBBansCount() {
331                    return getService().getMBBansCount();
332            }
333    
334            /**
335            * Returns the OSGi service identifier.
336            *
337            * @return the OSGi service identifier
338            */
339            public static java.lang.String getOSGiServiceIdentifier() {
340                    return getService().getOSGiServiceIdentifier();
341            }
342    
343            public static com.liferay.portal.model.PersistedModel getPersistedModel(
344                    java.io.Serializable primaryKeyObj)
345                    throws com.liferay.portal.kernel.exception.PortalException {
346                    return getService().getPersistedModel(primaryKeyObj);
347            }
348    
349            public static boolean hasBan(long groupId, long banUserId) {
350                    return getService().hasBan(groupId, banUserId);
351            }
352    
353            /**
354            * Updates the message boards ban in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
355            *
356            * @param mbBan the message boards ban
357            * @return the message boards ban that was updated
358            */
359            public static com.liferay.portlet.messageboards.model.MBBan updateMBBan(
360                    com.liferay.portlet.messageboards.model.MBBan mbBan) {
361                    return getService().updateMBBan(mbBan);
362            }
363    
364            public static MBBanLocalService getService() {
365                    if (_service == null) {
366                            _service = (MBBanLocalService)PortalBeanLocatorUtil.locate(MBBanLocalService.class.getName());
367    
368                            ReferenceRegistry.registerReference(MBBanLocalServiceUtil.class,
369                                    "_service");
370                    }
371    
372                    return _service;
373            }
374    
375            private static MBBanLocalService _service;
376    }