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