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.bookmarks.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 BookmarksEntry. This utility wraps
024     * {@link com.liferay.portlet.bookmarks.service.impl.BookmarksEntryLocalServiceImpl} 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 BookmarksEntryLocalService
032     * @see com.liferay.portlet.bookmarks.service.base.BookmarksEntryLocalServiceBaseImpl
033     * @see com.liferay.portlet.bookmarks.service.impl.BookmarksEntryLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class BookmarksEntryLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.bookmarks.service.impl.BookmarksEntryLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the bookmarks entry to the database. Also notifies the appropriate model listeners.
046            *
047            * @param bookmarksEntry the bookmarks entry
048            * @return the bookmarks entry that was added
049            */
050            public static com.liferay.portlet.bookmarks.model.BookmarksEntry addBookmarksEntry(
051                    com.liferay.portlet.bookmarks.model.BookmarksEntry bookmarksEntry) {
052                    return getService().addBookmarksEntry(bookmarksEntry);
053            }
054    
055            public static com.liferay.portlet.bookmarks.model.BookmarksEntry addEntry(
056                    long userId, long groupId, long folderId, java.lang.String name,
057                    java.lang.String url, java.lang.String description,
058                    com.liferay.portal.service.ServiceContext serviceContext)
059                    throws com.liferay.portal.kernel.exception.PortalException {
060                    return getService()
061                                       .addEntry(userId, groupId, folderId, name, url, description,
062                            serviceContext);
063            }
064    
065            /**
066            * Creates a new bookmarks entry with the primary key. Does not add the bookmarks entry to the database.
067            *
068            * @param entryId the primary key for the new bookmarks entry
069            * @return the new bookmarks entry
070            */
071            public static com.liferay.portlet.bookmarks.model.BookmarksEntry createBookmarksEntry(
072                    long entryId) {
073                    return getService().createBookmarksEntry(entryId);
074            }
075    
076            /**
077            * Deletes the bookmarks entry from the database. Also notifies the appropriate model listeners.
078            *
079            * @param bookmarksEntry the bookmarks entry
080            * @return the bookmarks entry that was removed
081            */
082            public static com.liferay.portlet.bookmarks.model.BookmarksEntry deleteBookmarksEntry(
083                    com.liferay.portlet.bookmarks.model.BookmarksEntry bookmarksEntry) {
084                    return getService().deleteBookmarksEntry(bookmarksEntry);
085            }
086    
087            /**
088            * Deletes the bookmarks entry with the primary key from the database. Also notifies the appropriate model listeners.
089            *
090            * @param entryId the primary key of the bookmarks entry
091            * @return the bookmarks entry that was removed
092            * @throws PortalException if a bookmarks entry with the primary key could not be found
093            */
094            public static com.liferay.portlet.bookmarks.model.BookmarksEntry deleteBookmarksEntry(
095                    long entryId)
096                    throws com.liferay.portal.kernel.exception.PortalException {
097                    return getService().deleteBookmarksEntry(entryId);
098            }
099    
100            public static void deleteEntries(long groupId, long folderId)
101                    throws com.liferay.portal.kernel.exception.PortalException {
102                    getService().deleteEntries(groupId, folderId);
103            }
104    
105            public static void deleteEntries(long groupId, long folderId,
106                    boolean includeTrashedEntries)
107                    throws com.liferay.portal.kernel.exception.PortalException {
108                    getService().deleteEntries(groupId, folderId, includeTrashedEntries);
109            }
110    
111            public static com.liferay.portlet.bookmarks.model.BookmarksEntry deleteEntry(
112                    com.liferay.portlet.bookmarks.model.BookmarksEntry entry)
113                    throws com.liferay.portal.kernel.exception.PortalException {
114                    return getService().deleteEntry(entry);
115            }
116    
117            public static com.liferay.portlet.bookmarks.model.BookmarksEntry deleteEntry(
118                    long entryId)
119                    throws com.liferay.portal.kernel.exception.PortalException {
120                    return getService().deleteEntry(entryId);
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.bookmarks.model.impl.BookmarksEntryModelImpl}. 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.bookmarks.model.impl.BookmarksEntryModelImpl}. 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 that match the dynamic query.
188            *
189            * @param dynamicQuery the dynamic query
190            * @return the number of rows that match 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 that match 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 that match 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 com.liferay.portlet.bookmarks.model.BookmarksEntry fetchBookmarksEntry(
211                    long entryId) {
212                    return getService().fetchBookmarksEntry(entryId);
213            }
214    
215            /**
216            * Returns the bookmarks entry matching the UUID and group.
217            *
218            * @param uuid the bookmarks entry's UUID
219            * @param groupId the primary key of the group
220            * @return the matching bookmarks entry, or <code>null</code> if a matching bookmarks entry could not be found
221            */
222            public static com.liferay.portlet.bookmarks.model.BookmarksEntry fetchBookmarksEntryByUuidAndGroupId(
223                    java.lang.String uuid, long groupId) {
224                    return getService().fetchBookmarksEntryByUuidAndGroupId(uuid, groupId);
225            }
226    
227            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
228                    return getService().getActionableDynamicQuery();
229            }
230    
231            /**
232            * Returns the Spring bean ID for this bean.
233            *
234            * @return the Spring bean ID for this bean
235            */
236            public static java.lang.String getBeanIdentifier() {
237                    return getService().getBeanIdentifier();
238            }
239    
240            /**
241            * Returns a range of all the bookmarks entries.
242            *
243            * <p>
244            * 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.bookmarks.model.impl.BookmarksEntryModelImpl}. 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.
245            * </p>
246            *
247            * @param start the lower bound of the range of bookmarks entries
248            * @param end the upper bound of the range of bookmarks entries (not inclusive)
249            * @return the range of bookmarks entries
250            */
251            public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getBookmarksEntries(
252                    int start, int end) {
253                    return getService().getBookmarksEntries(start, end);
254            }
255    
256            public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getBookmarksEntriesByUuidAndCompanyId(
257                    java.lang.String uuid, long companyId) {
258                    return getService()
259                                       .getBookmarksEntriesByUuidAndCompanyId(uuid, companyId);
260            }
261    
262            public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getBookmarksEntriesByUuidAndCompanyId(
263                    java.lang.String uuid, long companyId, int start, int end,
264                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.bookmarks.model.BookmarksEntry> orderByComparator) {
265                    return getService()
266                                       .getBookmarksEntriesByUuidAndCompanyId(uuid, companyId,
267                            start, end, orderByComparator);
268            }
269    
270            /**
271            * Returns the number of bookmarks entries.
272            *
273            * @return the number of bookmarks entries
274            */
275            public static int getBookmarksEntriesCount() {
276                    return getService().getBookmarksEntriesCount();
277            }
278    
279            /**
280            * Returns the bookmarks entry with the primary key.
281            *
282            * @param entryId the primary key of the bookmarks entry
283            * @return the bookmarks entry
284            * @throws PortalException if a bookmarks entry with the primary key could not be found
285            */
286            public static com.liferay.portlet.bookmarks.model.BookmarksEntry getBookmarksEntry(
287                    long entryId)
288                    throws com.liferay.portal.kernel.exception.PortalException {
289                    return getService().getBookmarksEntry(entryId);
290            }
291    
292            /**
293            * Returns the bookmarks entry matching the UUID and group.
294            *
295            * @param uuid the bookmarks entry's UUID
296            * @param groupId the primary key of the group
297            * @return the matching bookmarks entry
298            * @throws PortalException if a matching bookmarks entry could not be found
299            */
300            public static com.liferay.portlet.bookmarks.model.BookmarksEntry getBookmarksEntryByUuidAndGroupId(
301                    java.lang.String uuid, long groupId)
302                    throws com.liferay.portal.kernel.exception.PortalException {
303                    return getService().getBookmarksEntryByUuidAndGroupId(uuid, groupId);
304            }
305    
306            public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getEntries(
307                    long groupId, long folderId, int start, int end) {
308                    return getService().getEntries(groupId, folderId, start, end);
309            }
310    
311            public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getEntries(
312                    long groupId, long folderId, int start, int end,
313                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.bookmarks.model.BookmarksEntry> orderByComparator) {
314                    return getService()
315                                       .getEntries(groupId, folderId, start, end, orderByComparator);
316            }
317    
318            public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getEntries(
319                    long groupId, long folderId, int status, int start, int end) {
320                    return getService().getEntries(groupId, folderId, status, start, end);
321            }
322    
323            public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getEntries(
324                    long groupId, long folderId, int status, int start, int end,
325                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.bookmarks.model.BookmarksEntry> orderByComparator) {
326                    return getService()
327                                       .getEntries(groupId, folderId, status, start, end,
328                            orderByComparator);
329            }
330    
331            public static int getEntriesCount(long groupId, long folderId) {
332                    return getService().getEntriesCount(groupId, folderId);
333            }
334    
335            public static int getEntriesCount(long groupId, long folderId, int status) {
336                    return getService().getEntriesCount(groupId, folderId, status);
337            }
338    
339            public static com.liferay.portlet.bookmarks.model.BookmarksEntry getEntry(
340                    long entryId)
341                    throws com.liferay.portal.kernel.exception.PortalException {
342                    return getService().getEntry(entryId);
343            }
344    
345            public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
346                    com.liferay.portal.kernel.lar.PortletDataContext portletDataContext) {
347                    return getService().getExportActionableDynamicQuery(portletDataContext);
348            }
349    
350            public static int getFoldersEntriesCount(long groupId,
351                    java.util.List<java.lang.Long> folderIds) {
352                    return getService().getFoldersEntriesCount(groupId, folderIds);
353            }
354    
355            public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getGroupEntries(
356                    long groupId, int start, int end) {
357                    return getService().getGroupEntries(groupId, start, end);
358            }
359    
360            public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getGroupEntries(
361                    long groupId, long userId, int start, int end) {
362                    return getService().getGroupEntries(groupId, userId, start, end);
363            }
364    
365            public static int getGroupEntriesCount(long groupId) {
366                    return getService().getGroupEntriesCount(groupId);
367            }
368    
369            public static int getGroupEntriesCount(long groupId, long userId) {
370                    return getService().getGroupEntriesCount(groupId, userId);
371            }
372    
373            public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getNoAssetEntries() {
374                    return getService().getNoAssetEntries();
375            }
376    
377            public static com.liferay.portal.model.PersistedModel getPersistedModel(
378                    java.io.Serializable primaryKeyObj)
379                    throws com.liferay.portal.kernel.exception.PortalException {
380                    return getService().getPersistedModel(primaryKeyObj);
381            }
382    
383            public static com.liferay.portlet.bookmarks.model.BookmarksEntry moveEntry(
384                    long entryId, long parentFolderId)
385                    throws com.liferay.portal.kernel.exception.PortalException {
386                    return getService().moveEntry(entryId, parentFolderId);
387            }
388    
389            public static com.liferay.portlet.bookmarks.model.BookmarksEntry moveEntryFromTrash(
390                    long userId, long entryId, long parentFolderId)
391                    throws com.liferay.portal.kernel.exception.PortalException {
392                    return getService().moveEntryFromTrash(userId, entryId, parentFolderId);
393            }
394    
395            public static com.liferay.portlet.bookmarks.model.BookmarksEntry moveEntryToTrash(
396                    long userId, com.liferay.portlet.bookmarks.model.BookmarksEntry entry)
397                    throws com.liferay.portal.kernel.exception.PortalException {
398                    return getService().moveEntryToTrash(userId, entry);
399            }
400    
401            public static com.liferay.portlet.bookmarks.model.BookmarksEntry moveEntryToTrash(
402                    long userId, long entryId)
403                    throws com.liferay.portal.kernel.exception.PortalException {
404                    return getService().moveEntryToTrash(userId, entryId);
405            }
406    
407            public static com.liferay.portlet.bookmarks.model.BookmarksEntry openEntry(
408                    long userId, com.liferay.portlet.bookmarks.model.BookmarksEntry entry) {
409                    return getService().openEntry(userId, entry);
410            }
411    
412            public static com.liferay.portlet.bookmarks.model.BookmarksEntry openEntry(
413                    long userId, long entryId)
414                    throws com.liferay.portal.kernel.exception.PortalException {
415                    return getService().openEntry(userId, entryId);
416            }
417    
418            public static void rebuildTree(long companyId)
419                    throws com.liferay.portal.kernel.exception.PortalException {
420                    getService().rebuildTree(companyId);
421            }
422    
423            public static com.liferay.portlet.bookmarks.model.BookmarksEntry restoreEntryFromTrash(
424                    long userId, long entryId)
425                    throws com.liferay.portal.kernel.exception.PortalException {
426                    return getService().restoreEntryFromTrash(userId, entryId);
427            }
428    
429            public static com.liferay.portal.kernel.search.Hits search(long groupId,
430                    long userId, long creatorUserId, int status, int start, int end)
431                    throws com.liferay.portal.kernel.exception.PortalException {
432                    return getService()
433                                       .search(groupId, userId, creatorUserId, status, start, end);
434            }
435    
436            /**
437            * Sets the Spring bean ID for this bean.
438            *
439            * @param beanIdentifier the Spring bean ID for this bean
440            */
441            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
442                    getService().setBeanIdentifier(beanIdentifier);
443            }
444    
445            public static void setTreePaths(long folderId, java.lang.String treePath,
446                    boolean reindex)
447                    throws com.liferay.portal.kernel.exception.PortalException {
448                    getService().setTreePaths(folderId, treePath, reindex);
449            }
450    
451            public static void subscribeEntry(long userId, long entryId)
452                    throws com.liferay.portal.kernel.exception.PortalException {
453                    getService().subscribeEntry(userId, entryId);
454            }
455    
456            public static void unsubscribeEntry(long userId, long entryId)
457                    throws com.liferay.portal.kernel.exception.PortalException {
458                    getService().unsubscribeEntry(userId, entryId);
459            }
460    
461            public static void updateAsset(long userId,
462                    com.liferay.portlet.bookmarks.model.BookmarksEntry entry,
463                    long[] assetCategoryIds, java.lang.String[] assetTagNames,
464                    long[] assetLinkEntryIds)
465                    throws com.liferay.portal.kernel.exception.PortalException {
466                    getService()
467                            .updateAsset(userId, entry, assetCategoryIds, assetTagNames,
468                            assetLinkEntryIds);
469            }
470    
471            /**
472            * Updates the bookmarks entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
473            *
474            * @param bookmarksEntry the bookmarks entry
475            * @return the bookmarks entry that was updated
476            */
477            public static com.liferay.portlet.bookmarks.model.BookmarksEntry updateBookmarksEntry(
478                    com.liferay.portlet.bookmarks.model.BookmarksEntry bookmarksEntry) {
479                    return getService().updateBookmarksEntry(bookmarksEntry);
480            }
481    
482            public static com.liferay.portlet.bookmarks.model.BookmarksEntry updateEntry(
483                    long userId, long entryId, long groupId, long folderId,
484                    java.lang.String name, java.lang.String url,
485                    java.lang.String description,
486                    com.liferay.portal.service.ServiceContext serviceContext)
487                    throws com.liferay.portal.kernel.exception.PortalException {
488                    return getService()
489                                       .updateEntry(userId, entryId, groupId, folderId, name, url,
490                            description, serviceContext);
491            }
492    
493            public static com.liferay.portlet.bookmarks.model.BookmarksEntry updateStatus(
494                    long userId, com.liferay.portlet.bookmarks.model.BookmarksEntry entry,
495                    int status) throws com.liferay.portal.kernel.exception.PortalException {
496                    return getService().updateStatus(userId, entry, status);
497            }
498    
499            public static BookmarksEntryLocalService getService() {
500                    if (_service == null) {
501                            _service = (BookmarksEntryLocalService)PortalBeanLocatorUtil.locate(BookmarksEntryLocalService.class.getName());
502    
503                            ReferenceRegistry.registerReference(BookmarksEntryLocalServiceUtil.class,
504                                    "_service");
505                    }
506    
507                    return _service;
508            }
509    
510            /**
511             * @deprecated As of 6.2.0
512             */
513            @Deprecated
514            public void setService(BookmarksEntryLocalService service) {
515            }
516    
517            private static BookmarksEntryLocalService _service;
518    }