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 document library file rank with the primary key.
236            *
237            * @param fileRankId the primary key of the document library file rank
238            * @return the document library file rank
239            * @throws PortalException if a document library file rank with the primary key could not be found
240            */
241            public static com.liferay.portlet.documentlibrary.model.DLFileRank getDLFileRank(
242                    long fileRankId)
243                    throws com.liferay.portal.kernel.exception.PortalException {
244                    return getService().getDLFileRank(fileRankId);
245            }
246    
247            /**
248            * Returns a range of all the document library file ranks.
249            *
250            * <p>
251            * 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.
252            * </p>
253            *
254            * @param start the lower bound of the range of document library file ranks
255            * @param end the upper bound of the range of document library file ranks (not inclusive)
256            * @return the range of document library file ranks
257            */
258            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> getDLFileRanks(
259                    int start, int end) {
260                    return getService().getDLFileRanks(start, end);
261            }
262    
263            /**
264            * Returns the number of document library file ranks.
265            *
266            * @return the number of document library file ranks
267            */
268            public static int getDLFileRanksCount() {
269                    return getService().getDLFileRanksCount();
270            }
271    
272            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> getFileRanks(
273                    long groupId, long userId) {
274                    return getService().getFileRanks(groupId, userId);
275            }
276    
277            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
278                    return getService().getIndexableActionableDynamicQuery();
279            }
280    
281            /**
282            * Returns the OSGi service identifier.
283            *
284            * @return the OSGi service identifier
285            */
286            public static java.lang.String getOSGiServiceIdentifier() {
287                    return getService().getOSGiServiceIdentifier();
288            }
289    
290            public static com.liferay.portal.model.PersistedModel getPersistedModel(
291                    java.io.Serializable primaryKeyObj)
292                    throws com.liferay.portal.kernel.exception.PortalException {
293                    return getService().getPersistedModel(primaryKeyObj);
294            }
295    
296            /**
297            * Updates the document library file rank in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
298            *
299            * @param dlFileRank the document library file rank
300            * @return the document library file rank that was updated
301            */
302            public static com.liferay.portlet.documentlibrary.model.DLFileRank updateDLFileRank(
303                    com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank) {
304                    return getService().updateDLFileRank(dlFileRank);
305            }
306    
307            public static com.liferay.portlet.documentlibrary.model.DLFileRank updateFileRank(
308                    long groupId, long companyId, long userId, long fileEntryId,
309                    com.liferay.portal.service.ServiceContext serviceContext) {
310                    return getService()
311                                       .updateFileRank(groupId, companyId, userId, fileEntryId,
312                            serviceContext);
313            }
314    
315            public static DLFileRankLocalService getService() {
316                    if (_service == null) {
317                            _service = (DLFileRankLocalService)PortalBeanLocatorUtil.locate(DLFileRankLocalService.class.getName());
318    
319                            ReferenceRegistry.registerReference(DLFileRankLocalServiceUtil.class,
320                                    "_service");
321                    }
322    
323                    return _service;
324            }
325    
326            private static DLFileRankLocalService _service;
327    }