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 JournalArticleResource. This utility wraps
024     * {@link com.liferay.portlet.journal.service.impl.JournalArticleResourceLocalServiceImpl} 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 JournalArticleResourceLocalService
032     * @see com.liferay.portlet.journal.service.base.JournalArticleResourceLocalServiceBaseImpl
033     * @see com.liferay.portlet.journal.service.impl.JournalArticleResourceLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class JournalArticleResourceLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.journal.service.impl.JournalArticleResourceLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the journal article resource to the database. Also notifies the appropriate model listeners.
046            *
047            * @param journalArticleResource the journal article resource
048            * @return the journal article resource that was added
049            */
050            public static com.liferay.portlet.journal.model.JournalArticleResource addJournalArticleResource(
051                    com.liferay.portlet.journal.model.JournalArticleResource journalArticleResource) {
052                    return getService().addJournalArticleResource(journalArticleResource);
053            }
054    
055            /**
056            * Creates a new journal article resource with the primary key. Does not add the journal article resource to the database.
057            *
058            * @param resourcePrimKey the primary key for the new journal article resource
059            * @return the new journal article resource
060            */
061            public static com.liferay.portlet.journal.model.JournalArticleResource createJournalArticleResource(
062                    long resourcePrimKey) {
063                    return getService().createJournalArticleResource(resourcePrimKey);
064            }
065    
066            public static void deleteArticleResource(long groupId,
067                    java.lang.String articleId)
068                    throws com.liferay.portal.kernel.exception.PortalException {
069                    getService().deleteArticleResource(groupId, articleId);
070            }
071    
072            /**
073            * Deletes the journal article resource from the database. Also notifies the appropriate model listeners.
074            *
075            * @param journalArticleResource the journal article resource
076            * @return the journal article resource that was removed
077            */
078            public static com.liferay.portlet.journal.model.JournalArticleResource deleteJournalArticleResource(
079                    com.liferay.portlet.journal.model.JournalArticleResource journalArticleResource) {
080                    return getService().deleteJournalArticleResource(journalArticleResource);
081            }
082    
083            /**
084            * Deletes the journal article resource with the primary key from the database. Also notifies the appropriate model listeners.
085            *
086            * @param resourcePrimKey the primary key of the journal article resource
087            * @return the journal article resource that was removed
088            * @throws PortalException if a journal article resource with the primary key could not be found
089            */
090            public static com.liferay.portlet.journal.model.JournalArticleResource deleteJournalArticleResource(
091                    long resourcePrimKey)
092                    throws com.liferay.portal.kernel.exception.PortalException {
093                    return getService().deleteJournalArticleResource(resourcePrimKey);
094            }
095    
096            /**
097            * @throws PortalException
098            */
099            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
100                    com.liferay.portal.model.PersistedModel persistedModel)
101                    throws com.liferay.portal.kernel.exception.PortalException {
102                    return getService().deletePersistedModel(persistedModel);
103            }
104    
105            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
106                    return getService().dynamicQuery();
107            }
108    
109            /**
110            * Performs a dynamic query on the database and returns the matching rows.
111            *
112            * @param dynamicQuery the dynamic query
113            * @return the matching rows
114            */
115            public static <T> java.util.List<T> dynamicQuery(
116                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
117                    return getService().dynamicQuery(dynamicQuery);
118            }
119    
120            /**
121            * Performs a dynamic query on the database and returns a range of the matching rows.
122            *
123            * <p>
124            * 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.JournalArticleResourceModelImpl}. 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.
125            * </p>
126            *
127            * @param dynamicQuery the dynamic query
128            * @param start the lower bound of the range of model instances
129            * @param end the upper bound of the range of model instances (not inclusive)
130            * @return the range of matching rows
131            */
132            public static <T> java.util.List<T> dynamicQuery(
133                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
134                    int end) {
135                    return getService().dynamicQuery(dynamicQuery, start, end);
136            }
137    
138            /**
139            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
140            *
141            * <p>
142            * 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.JournalArticleResourceModelImpl}. 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.
143            * </p>
144            *
145            * @param dynamicQuery the dynamic query
146            * @param start the lower bound of the range of model instances
147            * @param end the upper bound of the range of model instances (not inclusive)
148            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
149            * @return the ordered range of matching rows
150            */
151            public static <T> java.util.List<T> dynamicQuery(
152                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
153                    int end,
154                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
155                    return getService()
156                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
157            }
158    
159            /**
160            * Returns the number of rows matching the dynamic query.
161            *
162            * @param dynamicQuery the dynamic query
163            * @return the number of rows matching the dynamic query
164            */
165            public static long dynamicQueryCount(
166                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
167                    return getService().dynamicQueryCount(dynamicQuery);
168            }
169    
170            /**
171            * Returns the number of rows matching the dynamic query.
172            *
173            * @param dynamicQuery the dynamic query
174            * @param projection the projection to apply to the query
175            * @return the number of rows matching the dynamic query
176            */
177            public static long dynamicQueryCount(
178                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
179                    com.liferay.portal.kernel.dao.orm.Projection projection) {
180                    return getService().dynamicQueryCount(dynamicQuery, projection);
181            }
182    
183            public static com.liferay.portlet.journal.model.JournalArticleResource fetchArticleResource(
184                    long groupId, java.lang.String articleId) {
185                    return getService().fetchArticleResource(groupId, articleId);
186            }
187    
188            public static com.liferay.portlet.journal.model.JournalArticleResource fetchArticleResource(
189                    java.lang.String uuid, long groupId) {
190                    return getService().fetchArticleResource(uuid, groupId);
191            }
192    
193            public static com.liferay.portlet.journal.model.JournalArticleResource fetchJournalArticleResource(
194                    long resourcePrimKey) {
195                    return getService().fetchJournalArticleResource(resourcePrimKey);
196            }
197    
198            /**
199            * Returns the journal article resource matching the UUID and group.
200            *
201            * @param uuid the journal article resource's UUID
202            * @param groupId the primary key of the group
203            * @return the matching journal article resource, or <code>null</code> if a matching journal article resource could not be found
204            */
205            public static com.liferay.portlet.journal.model.JournalArticleResource fetchJournalArticleResourceByUuidAndGroupId(
206                    java.lang.String uuid, long groupId) {
207                    return getService()
208                                       .fetchJournalArticleResourceByUuidAndGroupId(uuid, groupId);
209            }
210    
211            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
212                    return getService().getActionableDynamicQuery();
213            }
214    
215            public static com.liferay.portlet.journal.model.JournalArticleResource getArticleResource(
216                    long articleResourcePrimKey)
217                    throws com.liferay.portal.kernel.exception.PortalException {
218                    return getService().getArticleResource(articleResourcePrimKey);
219            }
220    
221            public static long getArticleResourcePrimKey(long groupId,
222                    java.lang.String articleId) {
223                    return getService().getArticleResourcePrimKey(groupId, articleId);
224            }
225    
226            public static long getArticleResourcePrimKey(java.lang.String uuid,
227                    long groupId, java.lang.String articleId) {
228                    return getService().getArticleResourcePrimKey(uuid, groupId, articleId);
229            }
230    
231            public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> getArticleResources(
232                    long groupId) {
233                    return getService().getArticleResources(groupId);
234            }
235    
236            /**
237            * Returns the Spring bean ID for this bean.
238            *
239            * @return the Spring bean ID for this bean
240            */
241            public static java.lang.String getBeanIdentifier() {
242                    return getService().getBeanIdentifier();
243            }
244    
245            /**
246            * Returns the journal article resource with the primary key.
247            *
248            * @param resourcePrimKey the primary key of the journal article resource
249            * @return the journal article resource
250            * @throws PortalException if a journal article resource with the primary key could not be found
251            */
252            public static com.liferay.portlet.journal.model.JournalArticleResource getJournalArticleResource(
253                    long resourcePrimKey)
254                    throws com.liferay.portal.kernel.exception.PortalException {
255                    return getService().getJournalArticleResource(resourcePrimKey);
256            }
257    
258            /**
259            * Returns the journal article resource matching the UUID and group.
260            *
261            * @param uuid the journal article resource's UUID
262            * @param groupId the primary key of the group
263            * @return the matching journal article resource
264            * @throws PortalException if a matching journal article resource could not be found
265            */
266            public static com.liferay.portlet.journal.model.JournalArticleResource getJournalArticleResourceByUuidAndGroupId(
267                    java.lang.String uuid, long groupId)
268                    throws com.liferay.portal.kernel.exception.PortalException {
269                    return getService()
270                                       .getJournalArticleResourceByUuidAndGroupId(uuid, groupId);
271            }
272    
273            /**
274            * Returns a range of all the journal article resources.
275            *
276            * <p>
277            * 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.JournalArticleResourceModelImpl}. 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.
278            * </p>
279            *
280            * @param start the lower bound of the range of journal article resources
281            * @param end the upper bound of the range of journal article resources (not inclusive)
282            * @return the range of journal article resources
283            */
284            public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> getJournalArticleResources(
285                    int start, int end) {
286                    return getService().getJournalArticleResources(start, end);
287            }
288    
289            /**
290            * Returns the number of journal article resources.
291            *
292            * @return the number of journal article resources
293            */
294            public static int getJournalArticleResourcesCount() {
295                    return getService().getJournalArticleResourcesCount();
296            }
297    
298            public static com.liferay.portal.model.PersistedModel getPersistedModel(
299                    java.io.Serializable primaryKeyObj)
300                    throws com.liferay.portal.kernel.exception.PortalException {
301                    return getService().getPersistedModel(primaryKeyObj);
302            }
303    
304            /**
305            * Sets the Spring bean ID for this bean.
306            *
307            * @param beanIdentifier the Spring bean ID for this bean
308            */
309            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
310                    getService().setBeanIdentifier(beanIdentifier);
311            }
312    
313            /**
314            * Updates the journal article resource in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
315            *
316            * @param journalArticleResource the journal article resource
317            * @return the journal article resource that was updated
318            */
319            public static com.liferay.portlet.journal.model.JournalArticleResource updateJournalArticleResource(
320                    com.liferay.portlet.journal.model.JournalArticleResource journalArticleResource) {
321                    return getService().updateJournalArticleResource(journalArticleResource);
322            }
323    
324            public static JournalArticleResourceLocalService getService() {
325                    if (_service == null) {
326                            _service = (JournalArticleResourceLocalService)PortalBeanLocatorUtil.locate(JournalArticleResourceLocalService.class.getName());
327    
328                            ReferenceRegistry.registerReference(JournalArticleResourceLocalServiceUtil.class,
329                                    "_service");
330                    }
331    
332                    return _service;
333            }
334    
335            /**
336             * @deprecated As of 6.2.0
337             */
338            @Deprecated
339            public void setService(JournalArticleResourceLocalService service) {
340            }
341    
342            private static JournalArticleResourceLocalService _service;
343    }