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.journal.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 JournalFeed. This utility wraps
024     * {@link com.liferay.portlet.journal.service.impl.JournalFeedLocalServiceImpl} 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 JournalFeedLocalService
032     * @see com.liferay.portlet.journal.service.base.JournalFeedLocalServiceBaseImpl
033     * @see com.liferay.portlet.journal.service.impl.JournalFeedLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class JournalFeedLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.journal.service.impl.JournalFeedLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043            public static com.liferay.portlet.journal.model.JournalFeed addFeed(
044                    long userId, long groupId, java.lang.String feedId, boolean autoFeedId,
045                    java.lang.String name, java.lang.String description,
046                    java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey,
047                    java.lang.String ddmRendererTemplateKey, int delta,
048                    java.lang.String orderByCol, java.lang.String orderByType,
049                    java.lang.String targetLayoutFriendlyUrl,
050                    java.lang.String targetPortletId, java.lang.String contentField,
051                    java.lang.String feedFormat, double feedVersion,
052                    com.liferay.portal.service.ServiceContext serviceContext)
053                    throws com.liferay.portal.kernel.exception.PortalException {
054                    return getService()
055                                       .addFeed(userId, groupId, feedId, autoFeedId, name,
056                            description, ddmStructureKey, ddmTemplateKey,
057                            ddmRendererTemplateKey, delta, orderByCol, orderByType,
058                            targetLayoutFriendlyUrl, targetPortletId, contentField, feedFormat,
059                            feedVersion, serviceContext);
060            }
061    
062            public static void addFeedResources(
063                    com.liferay.portlet.journal.model.JournalFeed feed,
064                    boolean addGroupPermissions, boolean addGuestPermissions)
065                    throws com.liferay.portal.kernel.exception.PortalException {
066                    getService()
067                            .addFeedResources(feed, addGroupPermissions, addGuestPermissions);
068            }
069    
070            public static void addFeedResources(
071                    com.liferay.portlet.journal.model.JournalFeed feed,
072                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
073                    throws com.liferay.portal.kernel.exception.PortalException {
074                    getService().addFeedResources(feed, groupPermissions, guestPermissions);
075            }
076    
077            public static void addFeedResources(long feedId,
078                    boolean addGroupPermissions, boolean addGuestPermissions)
079                    throws com.liferay.portal.kernel.exception.PortalException {
080                    getService()
081                            .addFeedResources(feedId, addGroupPermissions, addGuestPermissions);
082            }
083    
084            public static void addFeedResources(long feedId,
085                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
086                    throws com.liferay.portal.kernel.exception.PortalException {
087                    getService().addFeedResources(feedId, groupPermissions, guestPermissions);
088            }
089    
090            /**
091            * Adds the journal feed to the database. Also notifies the appropriate model listeners.
092            *
093            * @param journalFeed the journal feed
094            * @return the journal feed that was added
095            */
096            public static com.liferay.portlet.journal.model.JournalFeed addJournalFeed(
097                    com.liferay.portlet.journal.model.JournalFeed journalFeed) {
098                    return getService().addJournalFeed(journalFeed);
099            }
100    
101            /**
102            * Creates a new journal feed with the primary key. Does not add the journal feed to the database.
103            *
104            * @param id the primary key for the new journal feed
105            * @return the new journal feed
106            */
107            public static com.liferay.portlet.journal.model.JournalFeed createJournalFeed(
108                    long id) {
109                    return getService().createJournalFeed(id);
110            }
111    
112            public static void deleteFeed(
113                    com.liferay.portlet.journal.model.JournalFeed feed)
114                    throws com.liferay.portal.kernel.exception.PortalException {
115                    getService().deleteFeed(feed);
116            }
117    
118            public static void deleteFeed(long feedId)
119                    throws com.liferay.portal.kernel.exception.PortalException {
120                    getService().deleteFeed(feedId);
121            }
122    
123            public static void deleteFeed(long groupId, java.lang.String feedId)
124                    throws com.liferay.portal.kernel.exception.PortalException {
125                    getService().deleteFeed(groupId, feedId);
126            }
127    
128            /**
129            * Deletes the journal feed with the primary key from the database. Also notifies the appropriate model listeners.
130            *
131            * @param id the primary key of the journal feed
132            * @return the journal feed that was removed
133            * @throws PortalException if a journal feed with the primary key could not be found
134            */
135            public static com.liferay.portlet.journal.model.JournalFeed deleteJournalFeed(
136                    long id) throws com.liferay.portal.kernel.exception.PortalException {
137                    return getService().deleteJournalFeed(id);
138            }
139    
140            /**
141            * Deletes the journal feed from the database. Also notifies the appropriate model listeners.
142            *
143            * @param journalFeed the journal feed
144            * @return the journal feed that was removed
145            */
146            public static com.liferay.portlet.journal.model.JournalFeed deleteJournalFeed(
147                    com.liferay.portlet.journal.model.JournalFeed journalFeed) {
148                    return getService().deleteJournalFeed(journalFeed);
149            }
150    
151            /**
152            * @throws PortalException
153            */
154            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
155                    com.liferay.portal.model.PersistedModel persistedModel)
156                    throws com.liferay.portal.kernel.exception.PortalException {
157                    return getService().deletePersistedModel(persistedModel);
158            }
159    
160            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
161                    return getService().dynamicQuery();
162            }
163    
164            /**
165            * Performs a dynamic query on the database and returns the matching rows.
166            *
167            * @param dynamicQuery the dynamic query
168            * @return the matching rows
169            */
170            public static <T> java.util.List<T> dynamicQuery(
171                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
172                    return getService().dynamicQuery(dynamicQuery);
173            }
174    
175            /**
176            * Performs a dynamic query on the database and returns a range of the matching rows.
177            *
178            * <p>
179            * 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.journal.model.impl.JournalFeedModelImpl}. 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.
180            * </p>
181            *
182            * @param dynamicQuery the dynamic query
183            * @param start the lower bound of the range of model instances
184            * @param end the upper bound of the range of model instances (not inclusive)
185            * @return the range of matching rows
186            */
187            public static <T> java.util.List<T> dynamicQuery(
188                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
189                    int end) {
190                    return getService().dynamicQuery(dynamicQuery, start, end);
191            }
192    
193            /**
194            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
195            *
196            * <p>
197            * 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.journal.model.impl.JournalFeedModelImpl}. 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.
198            * </p>
199            *
200            * @param dynamicQuery the dynamic query
201            * @param start the lower bound of the range of model instances
202            * @param end the upper bound of the range of model instances (not inclusive)
203            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
204            * @return the ordered range of matching rows
205            */
206            public static <T> java.util.List<T> dynamicQuery(
207                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
208                    int end,
209                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
210                    return getService()
211                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
212            }
213    
214            /**
215            * Returns the number of rows matching the dynamic query.
216            *
217            * @param dynamicQuery the dynamic query
218            * @return the number of rows matching the dynamic query
219            */
220            public static long dynamicQueryCount(
221                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
222                    return getService().dynamicQueryCount(dynamicQuery);
223            }
224    
225            /**
226            * Returns the number of rows matching the dynamic query.
227            *
228            * @param dynamicQuery the dynamic query
229            * @param projection the projection to apply to the query
230            * @return the number of rows matching the dynamic query
231            */
232            public static long dynamicQueryCount(
233                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
234                    com.liferay.portal.kernel.dao.orm.Projection projection) {
235                    return getService().dynamicQueryCount(dynamicQuery, projection);
236            }
237    
238            public static com.liferay.portlet.journal.model.JournalFeed fetchFeed(
239                    long groupId, java.lang.String feedId) {
240                    return getService().fetchFeed(groupId, feedId);
241            }
242    
243            public static com.liferay.portlet.journal.model.JournalFeed fetchJournalFeed(
244                    long id) {
245                    return getService().fetchJournalFeed(id);
246            }
247    
248            /**
249            * Returns the journal feed matching the UUID and group.
250            *
251            * @param uuid the journal feed's UUID
252            * @param groupId the primary key of the group
253            * @return the matching journal feed, or <code>null</code> if a matching journal feed could not be found
254            */
255            public static com.liferay.portlet.journal.model.JournalFeed fetchJournalFeedByUuidAndGroupId(
256                    java.lang.String uuid, long groupId) {
257                    return getService().fetchJournalFeedByUuidAndGroupId(uuid, groupId);
258            }
259    
260            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
261                    return getService().getActionableDynamicQuery();
262            }
263    
264            /**
265            * Returns the Spring bean ID for this bean.
266            *
267            * @return the Spring bean ID for this bean
268            */
269            public static java.lang.String getBeanIdentifier() {
270                    return getService().getBeanIdentifier();
271            }
272    
273            public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
274                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext) {
275                    return getService().getExportActionableDynamicQuery(portletDataContext);
276            }
277    
278            public static com.liferay.portlet.journal.model.JournalFeed getFeed(
279                    long feedId) throws com.liferay.portal.kernel.exception.PortalException {
280                    return getService().getFeed(feedId);
281            }
282    
283            public static com.liferay.portlet.journal.model.JournalFeed getFeed(
284                    long groupId, java.lang.String feedId)
285                    throws com.liferay.portal.kernel.exception.PortalException {
286                    return getService().getFeed(groupId, feedId);
287            }
288    
289            public static java.util.List<com.liferay.portlet.journal.model.JournalFeed> getFeeds() {
290                    return getService().getFeeds();
291            }
292    
293            public static java.util.List<com.liferay.portlet.journal.model.JournalFeed> getFeeds(
294                    long groupId) {
295                    return getService().getFeeds(groupId);
296            }
297    
298            public static java.util.List<com.liferay.portlet.journal.model.JournalFeed> getFeeds(
299                    long groupId, int start, int end) {
300                    return getService().getFeeds(groupId, start, end);
301            }
302    
303            public static int getFeedsCount(long groupId) {
304                    return getService().getFeedsCount(groupId);
305            }
306    
307            /**
308            * Returns the journal feed with the primary key.
309            *
310            * @param id the primary key of the journal feed
311            * @return the journal feed
312            * @throws PortalException if a journal feed with the primary key could not be found
313            */
314            public static com.liferay.portlet.journal.model.JournalFeed getJournalFeed(
315                    long id) throws com.liferay.portal.kernel.exception.PortalException {
316                    return getService().getJournalFeed(id);
317            }
318    
319            /**
320            * Returns the journal feed matching the UUID and group.
321            *
322            * @param uuid the journal feed's UUID
323            * @param groupId the primary key of the group
324            * @return the matching journal feed
325            * @throws PortalException if a matching journal feed could not be found
326            */
327            public static com.liferay.portlet.journal.model.JournalFeed getJournalFeedByUuidAndGroupId(
328                    java.lang.String uuid, long groupId)
329                    throws com.liferay.portal.kernel.exception.PortalException {
330                    return getService().getJournalFeedByUuidAndGroupId(uuid, groupId);
331            }
332    
333            /**
334            * Returns a range of all the journal feeds.
335            *
336            * <p>
337            * 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.journal.model.impl.JournalFeedModelImpl}. 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.
338            * </p>
339            *
340            * @param start the lower bound of the range of journal feeds
341            * @param end the upper bound of the range of journal feeds (not inclusive)
342            * @return the range of journal feeds
343            */
344            public static java.util.List<com.liferay.portlet.journal.model.JournalFeed> getJournalFeeds(
345                    int start, int end) {
346                    return getService().getJournalFeeds(start, end);
347            }
348    
349            /**
350            * Returns all the journal feeds matching the UUID and company.
351            *
352            * @param uuid the UUID of the journal feeds
353            * @param companyId the primary key of the company
354            * @return the matching journal feeds, or an empty list if no matches were found
355            */
356            public static java.util.List<com.liferay.portlet.journal.model.JournalFeed> getJournalFeedsByUuidAndCompanyId(
357                    java.lang.String uuid, long companyId) {
358                    return getService().getJournalFeedsByUuidAndCompanyId(uuid, companyId);
359            }
360    
361            /**
362            * Returns a range of journal feeds matching the UUID and company.
363            *
364            * @param uuid the UUID of the journal feeds
365            * @param companyId the primary key of the company
366            * @param start the lower bound of the range of journal feeds
367            * @param end the upper bound of the range of journal feeds (not inclusive)
368            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
369            * @return the range of matching journal feeds, or an empty list if no matches were found
370            */
371            public static java.util.List<com.liferay.portlet.journal.model.JournalFeed> getJournalFeedsByUuidAndCompanyId(
372                    java.lang.String uuid, long companyId, int start, int end,
373                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalFeed> orderByComparator) {
374                    return getService()
375                                       .getJournalFeedsByUuidAndCompanyId(uuid, companyId, start,
376                            end, orderByComparator);
377            }
378    
379            /**
380            * Returns the number of journal feeds.
381            *
382            * @return the number of journal feeds
383            */
384            public static int getJournalFeedsCount() {
385                    return getService().getJournalFeedsCount();
386            }
387    
388            public static com.liferay.portal.model.PersistedModel getPersistedModel(
389                    java.io.Serializable primaryKeyObj)
390                    throws com.liferay.portal.kernel.exception.PortalException {
391                    return getService().getPersistedModel(primaryKeyObj);
392            }
393    
394            public static java.util.List<com.liferay.portlet.journal.model.JournalFeed> search(
395                    long companyId, long groupId, java.lang.String feedId,
396                    java.lang.String name, java.lang.String description,
397                    boolean andOperator, int start, int end,
398                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalFeed> obc) {
399                    return getService()
400                                       .search(companyId, groupId, feedId, name, description,
401                            andOperator, start, end, obc);
402            }
403    
404            public static java.util.List<com.liferay.portlet.journal.model.JournalFeed> search(
405                    long companyId, long groupId, java.lang.String keywords, int start,
406                    int end,
407                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalFeed> obc) {
408                    return getService().search(companyId, groupId, keywords, start, end, obc);
409            }
410    
411            public static int searchCount(long companyId, long groupId,
412                    java.lang.String feedId, java.lang.String name,
413                    java.lang.String description, boolean andOperator) {
414                    return getService()
415                                       .searchCount(companyId, groupId, feedId, name, description,
416                            andOperator);
417            }
418    
419            public static int searchCount(long companyId, long groupId,
420                    java.lang.String keywords) {
421                    return getService().searchCount(companyId, groupId, keywords);
422            }
423    
424            /**
425            * Sets the Spring bean ID for this bean.
426            *
427            * @param beanIdentifier the Spring bean ID for this bean
428            */
429            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
430                    getService().setBeanIdentifier(beanIdentifier);
431            }
432    
433            public static com.liferay.portlet.journal.model.JournalFeed updateFeed(
434                    long groupId, java.lang.String feedId, java.lang.String name,
435                    java.lang.String description, java.lang.String ddmStructureKey,
436                    java.lang.String ddmTemplateKey,
437                    java.lang.String ddmRendererTemplateKey, int delta,
438                    java.lang.String orderByCol, java.lang.String orderByType,
439                    java.lang.String targetLayoutFriendlyUrl,
440                    java.lang.String targetPortletId, java.lang.String contentField,
441                    java.lang.String feedFormat, double feedVersion,
442                    com.liferay.portal.service.ServiceContext serviceContext)
443                    throws com.liferay.portal.kernel.exception.PortalException {
444                    return getService()
445                                       .updateFeed(groupId, feedId, name, description,
446                            ddmStructureKey, ddmTemplateKey, ddmRendererTemplateKey, delta,
447                            orderByCol, orderByType, targetLayoutFriendlyUrl, targetPortletId,
448                            contentField, feedFormat, feedVersion, serviceContext);
449            }
450    
451            /**
452            * Updates the journal feed in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
453            *
454            * @param journalFeed the journal feed
455            * @return the journal feed that was updated
456            */
457            public static com.liferay.portlet.journal.model.JournalFeed updateJournalFeed(
458                    com.liferay.portlet.journal.model.JournalFeed journalFeed) {
459                    return getService().updateJournalFeed(journalFeed);
460            }
461    
462            public static JournalFeedLocalService getService() {
463                    if (_service == null) {
464                            _service = (JournalFeedLocalService)PortalBeanLocatorUtil.locate(JournalFeedLocalService.class.getName());
465    
466                            ReferenceRegistry.registerReference(JournalFeedLocalServiceUtil.class,
467                                    "_service");
468                    }
469    
470                    return _service;
471            }
472    
473            /**
474             * @deprecated As of 6.2.0
475             */
476            @Deprecated
477            public void setService(JournalFeedLocalService service) {
478            }
479    
480            private static JournalFeedLocalService _service;
481    }