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