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 type, java.lang.String structureId,
047                    java.lang.String templateId, java.lang.String rendererTemplateId,
048                    int delta, 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, type, structureId, templateId, rendererTemplateId,
057                            delta, orderByCol, orderByType, targetLayoutFriendlyUrl,
058                            targetPortletId, contentField, feedFormat, feedVersion,
059                            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 that match the dynamic query.
216            *
217            * @param dynamicQuery the dynamic query
218            * @return the number of rows that match 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 that match 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 that match 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.portal.kernel.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            public static java.util.List<com.liferay.portlet.journal.model.JournalFeed> getJournalFeedsByUuidAndCompanyId(
350                    java.lang.String uuid, long companyId) {
351                    return getService().getJournalFeedsByUuidAndCompanyId(uuid, companyId);
352            }
353    
354            public static java.util.List<com.liferay.portlet.journal.model.JournalFeed> getJournalFeedsByUuidAndCompanyId(
355                    java.lang.String uuid, long companyId, int start, int end,
356                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalFeed> orderByComparator) {
357                    return getService()
358                                       .getJournalFeedsByUuidAndCompanyId(uuid, companyId, start,
359                            end, orderByComparator);
360            }
361    
362            /**
363            * Returns the number of journal feeds.
364            *
365            * @return the number of journal feeds
366            */
367            public static int getJournalFeedsCount() {
368                    return getService().getJournalFeedsCount();
369            }
370    
371            public static com.liferay.portal.model.PersistedModel getPersistedModel(
372                    java.io.Serializable primaryKeyObj)
373                    throws com.liferay.portal.kernel.exception.PortalException {
374                    return getService().getPersistedModel(primaryKeyObj);
375            }
376    
377            public static java.util.List<com.liferay.portlet.journal.model.JournalFeed> search(
378                    long companyId, long groupId, java.lang.String feedId,
379                    java.lang.String name, java.lang.String description,
380                    boolean andOperator, int start, int end,
381                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalFeed> obc) {
382                    return getService()
383                                       .search(companyId, groupId, feedId, name, description,
384                            andOperator, start, end, obc);
385            }
386    
387            public static java.util.List<com.liferay.portlet.journal.model.JournalFeed> search(
388                    long companyId, long groupId, java.lang.String keywords, int start,
389                    int end,
390                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalFeed> obc) {
391                    return getService().search(companyId, groupId, keywords, start, end, obc);
392            }
393    
394            public static int searchCount(long companyId, long groupId,
395                    java.lang.String feedId, java.lang.String name,
396                    java.lang.String description, boolean andOperator) {
397                    return getService()
398                                       .searchCount(companyId, groupId, feedId, name, description,
399                            andOperator);
400            }
401    
402            public static int searchCount(long companyId, long groupId,
403                    java.lang.String keywords) {
404                    return getService().searchCount(companyId, groupId, keywords);
405            }
406    
407            /**
408            * Sets the Spring bean ID for this bean.
409            *
410            * @param beanIdentifier the Spring bean ID for this bean
411            */
412            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
413                    getService().setBeanIdentifier(beanIdentifier);
414            }
415    
416            public static com.liferay.portlet.journal.model.JournalFeed updateFeed(
417                    long groupId, java.lang.String feedId, java.lang.String name,
418                    java.lang.String description, java.lang.String type,
419                    java.lang.String structureId, java.lang.String templateId,
420                    java.lang.String rendererTemplateId, int delta,
421                    java.lang.String orderByCol, java.lang.String orderByType,
422                    java.lang.String targetLayoutFriendlyUrl,
423                    java.lang.String targetPortletId, java.lang.String contentField,
424                    java.lang.String feedFormat, double feedVersion,
425                    com.liferay.portal.service.ServiceContext serviceContext)
426                    throws com.liferay.portal.kernel.exception.PortalException {
427                    return getService()
428                                       .updateFeed(groupId, feedId, name, description, type,
429                            structureId, templateId, rendererTemplateId, delta, orderByCol,
430                            orderByType, targetLayoutFriendlyUrl, targetPortletId,
431                            contentField, feedFormat, feedVersion, serviceContext);
432            }
433    
434            /**
435            * Updates the journal feed in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
436            *
437            * @param journalFeed the journal feed
438            * @return the journal feed that was updated
439            */
440            public static com.liferay.portlet.journal.model.JournalFeed updateJournalFeed(
441                    com.liferay.portlet.journal.model.JournalFeed journalFeed) {
442                    return getService().updateJournalFeed(journalFeed);
443            }
444    
445            public static JournalFeedLocalService getService() {
446                    if (_service == null) {
447                            _service = (JournalFeedLocalService)PortalBeanLocatorUtil.locate(JournalFeedLocalService.class.getName());
448    
449                            ReferenceRegistry.registerReference(JournalFeedLocalServiceUtil.class,
450                                    "_service");
451                    }
452    
453                    return _service;
454            }
455    
456            /**
457             * @deprecated As of 6.2.0
458             */
459            @Deprecated
460            public void setService(JournalFeedLocalService service) {
461            }
462    
463            private static JournalFeedLocalService _service;
464    }