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 MBCategory. This utility wraps
024     * {@link com.liferay.portlet.messageboards.service.impl.MBCategoryLocalServiceImpl} 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 MBCategoryLocalService
032     * @see com.liferay.portlet.messageboards.service.base.MBCategoryLocalServiceBaseImpl
033     * @see com.liferay.portlet.messageboards.service.impl.MBCategoryLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class MBCategoryLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.messageboards.service.impl.MBCategoryLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043            public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
044                    long userId, long parentCategoryId, java.lang.String name,
045                    java.lang.String description, java.lang.String displayStyle,
046                    java.lang.String emailAddress, java.lang.String inProtocol,
047                    java.lang.String inServerName, int inServerPort, boolean inUseSSL,
048                    java.lang.String inUserName, java.lang.String inPassword,
049                    int inReadInterval, java.lang.String outEmailAddress,
050                    boolean outCustom, java.lang.String outServerName, int outServerPort,
051                    boolean outUseSSL, java.lang.String outUserName,
052                    java.lang.String outPassword, boolean allowAnonymous,
053                    boolean mailingListActive,
054                    com.liferay.portal.service.ServiceContext serviceContext)
055                    throws com.liferay.portal.kernel.exception.PortalException {
056                    return getService()
057                                       .addCategory(userId, parentCategoryId, name, description,
058                            displayStyle, emailAddress, inProtocol, inServerName, inServerPort,
059                            inUseSSL, inUserName, inPassword, inReadInterval, outEmailAddress,
060                            outCustom, outServerName, outServerPort, outUseSSL, outUserName,
061                            outPassword, allowAnonymous, mailingListActive, serviceContext);
062            }
063    
064            public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
065                    long userId, long parentCategoryId, java.lang.String name,
066                    java.lang.String description,
067                    com.liferay.portal.service.ServiceContext serviceContext)
068                    throws com.liferay.portal.kernel.exception.PortalException {
069                    return getService()
070                                       .addCategory(userId, parentCategoryId, name, description,
071                            serviceContext);
072            }
073    
074            public static void addCategoryResources(
075                    com.liferay.portlet.messageboards.model.MBCategory category,
076                    boolean addGroupPermissions, boolean addGuestPermissions)
077                    throws com.liferay.portal.kernel.exception.PortalException {
078                    getService()
079                            .addCategoryResources(category, addGroupPermissions,
080                            addGuestPermissions);
081            }
082    
083            public static void addCategoryResources(
084                    com.liferay.portlet.messageboards.model.MBCategory category,
085                    com.liferay.portal.service.permission.ModelPermissions modelPermissions)
086                    throws com.liferay.portal.kernel.exception.PortalException {
087                    getService().addCategoryResources(category, modelPermissions);
088            }
089    
090            public static void addCategoryResources(long categoryId,
091                    boolean addGroupPermissions, boolean addGuestPermissions)
092                    throws com.liferay.portal.kernel.exception.PortalException {
093                    getService()
094                            .addCategoryResources(categoryId, addGroupPermissions,
095                            addGuestPermissions);
096            }
097    
098            public static void addCategoryResources(long categoryId,
099                    com.liferay.portal.service.permission.ModelPermissions modelPermissions)
100                    throws com.liferay.portal.kernel.exception.PortalException {
101                    getService().addCategoryResources(categoryId, modelPermissions);
102            }
103    
104            /**
105            * Adds the message boards category to the database. Also notifies the appropriate model listeners.
106            *
107            * @param mbCategory the message boards category
108            * @return the message boards category that was added
109            */
110            public static com.liferay.portlet.messageboards.model.MBCategory addMBCategory(
111                    com.liferay.portlet.messageboards.model.MBCategory mbCategory) {
112                    return getService().addMBCategory(mbCategory);
113            }
114    
115            /**
116            * Creates a new message boards category with the primary key. Does not add the message boards category to the database.
117            *
118            * @param categoryId the primary key for the new message boards category
119            * @return the new message boards category
120            */
121            public static com.liferay.portlet.messageboards.model.MBCategory createMBCategory(
122                    long categoryId) {
123                    return getService().createMBCategory(categoryId);
124            }
125    
126            public static void deleteCategories(long groupId)
127                    throws com.liferay.portal.kernel.exception.PortalException {
128                    getService().deleteCategories(groupId);
129            }
130    
131            public static void deleteCategory(
132                    com.liferay.portlet.messageboards.model.MBCategory category)
133                    throws com.liferay.portal.kernel.exception.PortalException {
134                    getService().deleteCategory(category);
135            }
136    
137            public static void deleteCategory(
138                    com.liferay.portlet.messageboards.model.MBCategory category,
139                    boolean includeTrashedEntries)
140                    throws com.liferay.portal.kernel.exception.PortalException {
141                    getService().deleteCategory(category, includeTrashedEntries);
142            }
143    
144            public static void deleteCategory(long categoryId)
145                    throws com.liferay.portal.kernel.exception.PortalException {
146                    getService().deleteCategory(categoryId);
147            }
148    
149            /**
150            * Deletes the message boards category with the primary key from the database. Also notifies the appropriate model listeners.
151            *
152            * @param categoryId the primary key of the message boards category
153            * @return the message boards category that was removed
154            * @throws PortalException if a message boards category with the primary key could not be found
155            */
156            public static com.liferay.portlet.messageboards.model.MBCategory deleteMBCategory(
157                    long categoryId)
158                    throws com.liferay.portal.kernel.exception.PortalException {
159                    return getService().deleteMBCategory(categoryId);
160            }
161    
162            /**
163            * Deletes the message boards category from the database. Also notifies the appropriate model listeners.
164            *
165            * @param mbCategory the message boards category
166            * @return the message boards category that was removed
167            */
168            public static com.liferay.portlet.messageboards.model.MBCategory deleteMBCategory(
169                    com.liferay.portlet.messageboards.model.MBCategory mbCategory) {
170                    return getService().deleteMBCategory(mbCategory);
171            }
172    
173            /**
174            * @throws PortalException
175            */
176            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
177                    com.liferay.portal.model.PersistedModel persistedModel)
178                    throws com.liferay.portal.kernel.exception.PortalException {
179                    return getService().deletePersistedModel(persistedModel);
180            }
181    
182            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
183                    return getService().dynamicQuery();
184            }
185    
186            /**
187            * Performs a dynamic query on the database and returns the matching rows.
188            *
189            * @param dynamicQuery the dynamic query
190            * @return the matching rows
191            */
192            public static <T> java.util.List<T> dynamicQuery(
193                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
194                    return getService().dynamicQuery(dynamicQuery);
195            }
196    
197            /**
198            * Performs a dynamic query on the database and returns a range of the matching rows.
199            *
200            * <p>
201            * 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.MBCategoryModelImpl}. 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.
202            * </p>
203            *
204            * @param dynamicQuery the dynamic query
205            * @param start the lower bound of the range of model instances
206            * @param end the upper bound of the range of model instances (not inclusive)
207            * @return the range of matching rows
208            */
209            public static <T> java.util.List<T> dynamicQuery(
210                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
211                    int end) {
212                    return getService().dynamicQuery(dynamicQuery, start, end);
213            }
214    
215            /**
216            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
217            *
218            * <p>
219            * 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.MBCategoryModelImpl}. 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.
220            * </p>
221            *
222            * @param dynamicQuery the dynamic query
223            * @param start the lower bound of the range of model instances
224            * @param end the upper bound of the range of model instances (not inclusive)
225            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
226            * @return the ordered range of matching rows
227            */
228            public static <T> java.util.List<T> dynamicQuery(
229                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
230                    int end,
231                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
232                    return getService()
233                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
234            }
235    
236            /**
237            * Returns the number of rows matching the dynamic query.
238            *
239            * @param dynamicQuery the dynamic query
240            * @return the number of rows matching the dynamic query
241            */
242            public static long dynamicQueryCount(
243                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
244                    return getService().dynamicQueryCount(dynamicQuery);
245            }
246    
247            /**
248            * Returns the number of rows matching the dynamic query.
249            *
250            * @param dynamicQuery the dynamic query
251            * @param projection the projection to apply to the query
252            * @return the number of rows matching the dynamic query
253            */
254            public static long dynamicQueryCount(
255                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
256                    com.liferay.portal.kernel.dao.orm.Projection projection) {
257                    return getService().dynamicQueryCount(dynamicQuery, projection);
258            }
259    
260            public static com.liferay.portlet.messageboards.model.MBCategory fetchMBCategory(
261                    long categoryId) {
262                    return getService().fetchMBCategory(categoryId);
263            }
264    
265            /**
266            * Returns the message boards category matching the UUID and group.
267            *
268            * @param uuid the message boards category's UUID
269            * @param groupId the primary key of the group
270            * @return the matching message boards category, or <code>null</code> if a matching message boards category could not be found
271            */
272            public static com.liferay.portlet.messageboards.model.MBCategory fetchMBCategoryByUuidAndGroupId(
273                    java.lang.String uuid, long groupId) {
274                    return getService().fetchMBCategoryByUuidAndGroupId(uuid, groupId);
275            }
276    
277            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
278                    return getService().getActionableDynamicQuery();
279            }
280    
281            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
282                    long groupId) {
283                    return getService().getCategories(groupId);
284            }
285    
286            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
287                    long groupId, long excludedCategoryId, long parentCategoryId,
288                    int status, int start, int end) {
289                    return getService()
290                                       .getCategories(groupId, excludedCategoryId,
291                            parentCategoryId, status, start, end);
292            }
293    
294            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
295                    long groupId, long[] excludedCategoryIds, long[] parentCategoryIds,
296                    int status, int start, int end) {
297                    return getService()
298                                       .getCategories(groupId, excludedCategoryIds,
299                            parentCategoryIds, status, start, end);
300            }
301    
302            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
303                    long groupId, long parentCategoryId, int start, int end) {
304                    return getService().getCategories(groupId, parentCategoryId, start, end);
305            }
306    
307            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
308                    long groupId, long parentCategoryId, int status, int start, int end) {
309                    return getService()
310                                       .getCategories(groupId, parentCategoryId, status, start, end);
311            }
312    
313            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
314                    long groupId, long[] parentCategoryIds, int start, int end) {
315                    return getService().getCategories(groupId, parentCategoryIds, start, end);
316            }
317    
318            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
319                    long groupId, long[] parentCategoryIds, int status, int start, int end) {
320                    return getService()
321                                       .getCategories(groupId, parentCategoryIds, status, start, end);
322            }
323    
324            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
325                    long groupId, int status) {
326                    return getService().getCategories(groupId, status);
327            }
328    
329            public static java.util.List<java.lang.Object> getCategoriesAndThreads(
330                    long groupId, long categoryId) {
331                    return getService().getCategoriesAndThreads(groupId, categoryId);
332            }
333    
334            public static java.util.List<java.lang.Object> getCategoriesAndThreads(
335                    long groupId, long categoryId, int status) {
336                    return getService().getCategoriesAndThreads(groupId, categoryId, status);
337            }
338    
339            public static java.util.List<java.lang.Object> getCategoriesAndThreads(
340                    long groupId, long categoryId, int status, int start, int end) {
341                    return getService()
342                                       .getCategoriesAndThreads(groupId, categoryId, status, start,
343                            end);
344            }
345    
346            public static int getCategoriesAndThreadsCount(long groupId, long categoryId) {
347                    return getService().getCategoriesAndThreadsCount(groupId, categoryId);
348            }
349    
350            public static int getCategoriesAndThreadsCount(long groupId,
351                    long categoryId, int status) {
352                    return getService()
353                                       .getCategoriesAndThreadsCount(groupId, categoryId, status);
354            }
355    
356            public static int getCategoriesCount(long groupId) {
357                    return getService().getCategoriesCount(groupId);
358            }
359    
360            public static int getCategoriesCount(long groupId, long excludedCategoryId,
361                    long parentCategoryId, int status) {
362                    return getService()
363                                       .getCategoriesCount(groupId, excludedCategoryId,
364                            parentCategoryId, status);
365            }
366    
367            public static int getCategoriesCount(long groupId,
368                    long[] excludedCategoryIds, long[] parentCategoryIds, int status) {
369                    return getService()
370                                       .getCategoriesCount(groupId, excludedCategoryIds,
371                            parentCategoryIds, status);
372            }
373    
374            public static int getCategoriesCount(long groupId, long parentCategoryId) {
375                    return getService().getCategoriesCount(groupId, parentCategoryId);
376            }
377    
378            public static int getCategoriesCount(long groupId, long parentCategoryId,
379                    int status) {
380                    return getService().getCategoriesCount(groupId, parentCategoryId, status);
381            }
382    
383            public static int getCategoriesCount(long groupId, long[] parentCategoryIds) {
384                    return getService().getCategoriesCount(groupId, parentCategoryIds);
385            }
386    
387            public static int getCategoriesCount(long groupId,
388                    long[] parentCategoryIds, int status) {
389                    return getService()
390                                       .getCategoriesCount(groupId, parentCategoryIds, status);
391            }
392    
393            public static int getCategoriesCount(long groupId, int status) {
394                    return getService().getCategoriesCount(groupId, status);
395            }
396    
397            public static com.liferay.portlet.messageboards.model.MBCategory getCategory(
398                    long categoryId)
399                    throws com.liferay.portal.kernel.exception.PortalException {
400                    return getService().getCategory(categoryId);
401            }
402    
403            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCompanyCategories(
404                    long companyId, int start, int end) {
405                    return getService().getCompanyCategories(companyId, start, end);
406            }
407    
408            public static int getCompanyCategoriesCount(long companyId) {
409                    return getService().getCompanyCategoriesCount(companyId);
410            }
411    
412            public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
413                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext) {
414                    return getService().getExportActionableDynamicQuery(portletDataContext);
415            }
416    
417            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
418                    return getService().getIndexableActionableDynamicQuery();
419            }
420    
421            /**
422            * Returns a range of all the message boards categories.
423            *
424            * <p>
425            * 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.MBCategoryModelImpl}. 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.
426            * </p>
427            *
428            * @param start the lower bound of the range of message boards categories
429            * @param end the upper bound of the range of message boards categories (not inclusive)
430            * @return the range of message boards categories
431            */
432            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getMBCategories(
433                    int start, int end) {
434                    return getService().getMBCategories(start, end);
435            }
436    
437            /**
438            * Returns all the message boards categories matching the UUID and company.
439            *
440            * @param uuid the UUID of the message boards categories
441            * @param companyId the primary key of the company
442            * @return the matching message boards categories, or an empty list if no matches were found
443            */
444            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getMBCategoriesByUuidAndCompanyId(
445                    java.lang.String uuid, long companyId) {
446                    return getService().getMBCategoriesByUuidAndCompanyId(uuid, companyId);
447            }
448    
449            /**
450            * Returns a range of message boards categories matching the UUID and company.
451            *
452            * @param uuid the UUID of the message boards categories
453            * @param companyId the primary key of the company
454            * @param start the lower bound of the range of message boards categories
455            * @param end the upper bound of the range of message boards categories (not inclusive)
456            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
457            * @return the range of matching message boards categories, or an empty list if no matches were found
458            */
459            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getMBCategoriesByUuidAndCompanyId(
460                    java.lang.String uuid, long companyId, int start, int end,
461                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBCategory> orderByComparator) {
462                    return getService()
463                                       .getMBCategoriesByUuidAndCompanyId(uuid, companyId, start,
464                            end, orderByComparator);
465            }
466    
467            /**
468            * Returns the number of message boards categories.
469            *
470            * @return the number of message boards categories
471            */
472            public static int getMBCategoriesCount() {
473                    return getService().getMBCategoriesCount();
474            }
475    
476            /**
477            * Returns the message boards category with the primary key.
478            *
479            * @param categoryId the primary key of the message boards category
480            * @return the message boards category
481            * @throws PortalException if a message boards category with the primary key could not be found
482            */
483            public static com.liferay.portlet.messageboards.model.MBCategory getMBCategory(
484                    long categoryId)
485                    throws com.liferay.portal.kernel.exception.PortalException {
486                    return getService().getMBCategory(categoryId);
487            }
488    
489            /**
490            * Returns the message boards category matching the UUID and group.
491            *
492            * @param uuid the message boards category's UUID
493            * @param groupId the primary key of the group
494            * @return the matching message boards category
495            * @throws PortalException if a matching message boards category could not be found
496            */
497            public static com.liferay.portlet.messageboards.model.MBCategory getMBCategoryByUuidAndGroupId(
498                    java.lang.String uuid, long groupId)
499                    throws com.liferay.portal.kernel.exception.PortalException {
500                    return getService().getMBCategoryByUuidAndGroupId(uuid, groupId);
501            }
502    
503            /**
504            * Returns the OSGi service identifier.
505            *
506            * @return the OSGi service identifier
507            */
508            public static java.lang.String getOSGiServiceIdentifier() {
509                    return getService().getOSGiServiceIdentifier();
510            }
511    
512            public static com.liferay.portal.model.PersistedModel getPersistedModel(
513                    java.io.Serializable primaryKeyObj)
514                    throws com.liferay.portal.kernel.exception.PortalException {
515                    return getService().getPersistedModel(primaryKeyObj);
516            }
517    
518            public static java.util.List<java.lang.Long> getSubcategoryIds(
519                    java.util.List<java.lang.Long> categoryIds, long groupId,
520                    long categoryId) {
521                    return getService().getSubcategoryIds(categoryIds, groupId, categoryId);
522            }
523    
524            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getSubscribedCategories(
525                    long groupId, long userId, int start, int end) {
526                    return getService().getSubscribedCategories(groupId, userId, start, end);
527            }
528    
529            public static int getSubscribedCategoriesCount(long groupId, long userId) {
530                    return getService().getSubscribedCategoriesCount(groupId, userId);
531            }
532    
533            public static void moveCategoriesToTrash(long groupId, long userId)
534                    throws com.liferay.portal.kernel.exception.PortalException {
535                    getService().moveCategoriesToTrash(groupId, userId);
536            }
537    
538            public static com.liferay.portlet.messageboards.model.MBCategory moveCategory(
539                    long categoryId, long parentCategoryId, boolean mergeWithParentCategory)
540                    throws com.liferay.portal.kernel.exception.PortalException {
541                    return getService()
542                                       .moveCategory(categoryId, parentCategoryId,
543                            mergeWithParentCategory);
544            }
545    
546            public static com.liferay.portlet.messageboards.model.MBCategory moveCategoryFromTrash(
547                    long userId, long categoryId, long newCategoryId)
548                    throws com.liferay.portal.kernel.exception.PortalException {
549                    return getService()
550                                       .moveCategoryFromTrash(userId, categoryId, newCategoryId);
551            }
552    
553            public static com.liferay.portlet.messageboards.model.MBCategory moveCategoryToTrash(
554                    long userId, long categoryId)
555                    throws com.liferay.portal.kernel.exception.PortalException {
556                    return getService().moveCategoryToTrash(userId, categoryId);
557            }
558    
559            public static void restoreCategoryFromTrash(long userId, long categoryId)
560                    throws com.liferay.portal.kernel.exception.PortalException {
561                    getService().restoreCategoryFromTrash(userId, categoryId);
562            }
563    
564            public static void subscribeCategory(long userId, long groupId,
565                    long categoryId)
566                    throws com.liferay.portal.kernel.exception.PortalException {
567                    getService().subscribeCategory(userId, groupId, categoryId);
568            }
569    
570            public static void unsubscribeCategory(long userId, long groupId,
571                    long categoryId)
572                    throws com.liferay.portal.kernel.exception.PortalException {
573                    getService().unsubscribeCategory(userId, groupId, categoryId);
574            }
575    
576            public static com.liferay.portlet.messageboards.model.MBCategory updateCategory(
577                    long categoryId, long parentCategoryId, java.lang.String name,
578                    java.lang.String description, java.lang.String displayStyle,
579                    java.lang.String emailAddress, java.lang.String inProtocol,
580                    java.lang.String inServerName, int inServerPort, boolean inUseSSL,
581                    java.lang.String inUserName, java.lang.String inPassword,
582                    int inReadInterval, java.lang.String outEmailAddress,
583                    boolean outCustom, java.lang.String outServerName, int outServerPort,
584                    boolean outUseSSL, java.lang.String outUserName,
585                    java.lang.String outPassword, boolean allowAnonymous,
586                    boolean mailingListActive, boolean mergeWithParentCategory,
587                    com.liferay.portal.service.ServiceContext serviceContext)
588                    throws com.liferay.portal.kernel.exception.PortalException {
589                    return getService()
590                                       .updateCategory(categoryId, parentCategoryId, name,
591                            description, displayStyle, emailAddress, inProtocol, inServerName,
592                            inServerPort, inUseSSL, inUserName, inPassword, inReadInterval,
593                            outEmailAddress, outCustom, outServerName, outServerPort,
594                            outUseSSL, outUserName, outPassword, allowAnonymous,
595                            mailingListActive, mergeWithParentCategory, serviceContext);
596            }
597    
598            /**
599            * Updates the message boards category in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
600            *
601            * @param mbCategory the message boards category
602            * @return the message boards category that was updated
603            */
604            public static com.liferay.portlet.messageboards.model.MBCategory updateMBCategory(
605                    com.liferay.portlet.messageboards.model.MBCategory mbCategory) {
606                    return getService().updateMBCategory(mbCategory);
607            }
608    
609            public static com.liferay.portlet.messageboards.model.MBCategory updateMessageCount(
610                    long categoryId) {
611                    return getService().updateMessageCount(categoryId);
612            }
613    
614            public static com.liferay.portlet.messageboards.model.MBCategory updateStatistics(
615                    long categoryId) {
616                    return getService().updateStatistics(categoryId);
617            }
618    
619            public static com.liferay.portlet.messageboards.model.MBCategory updateStatus(
620                    long userId, long categoryId, int status)
621                    throws com.liferay.portal.kernel.exception.PortalException {
622                    return getService().updateStatus(userId, categoryId, status);
623            }
624    
625            public static com.liferay.portlet.messageboards.model.MBCategory updateThreadCount(
626                    long categoryId) {
627                    return getService().updateThreadCount(categoryId);
628            }
629    
630            public static MBCategoryLocalService getService() {
631                    if (_service == null) {
632                            _service = (MBCategoryLocalService)PortalBeanLocatorUtil.locate(MBCategoryLocalService.class.getName());
633    
634                            ReferenceRegistry.registerReference(MBCategoryLocalServiceUtil.class,
635                                    "_service");
636                    }
637    
638                    return _service;
639            }
640    
641            private static MBCategoryLocalService _service;
642    }