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.exception.PortalException;
020    import com.liferay.portal.kernel.exception.SystemException;
021    import com.liferay.portal.kernel.search.IndexableType;
022    import com.liferay.portal.kernel.transaction.Isolation;
023    import com.liferay.portal.kernel.transaction.Propagation;
024    import com.liferay.portal.kernel.transaction.Transactional;
025    import com.liferay.portal.model.SystemEventConstants;
026    import com.liferay.portal.service.BaseLocalService;
027    import com.liferay.portal.service.PersistedModelLocalService;
028    
029    /**
030     * Provides the local service interface for DLFileRank. Methods of this
031     * service will not have security checks based on the propagated JAAS
032     * credentials because this service can only be accessed from within the same
033     * VM.
034     *
035     * @author Brian Wing Shun Chan
036     * @see DLFileRankLocalServiceUtil
037     * @see com.liferay.portlet.documentlibrary.service.base.DLFileRankLocalServiceBaseImpl
038     * @see com.liferay.portlet.documentlibrary.service.impl.DLFileRankLocalServiceImpl
039     * @generated
040     */
041    @ProviderType
042    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
043            PortalException.class, SystemException.class})
044    public interface DLFileRankLocalService extends BaseLocalService,
045            PersistedModelLocalService {
046            /*
047             * NOTE FOR DEVELOPERS:
048             *
049             * Never modify or reference this interface directly. Always use {@link DLFileRankLocalServiceUtil} to access the document library file rank local service. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLFileRankLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
050             */
051    
052            /**
053            * Adds the document library file rank to the database. Also notifies the appropriate model listeners.
054            *
055            * @param dlFileRank the document library file rank
056            * @return the document library file rank that was added
057            */
058            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
059            public com.liferay.portlet.documentlibrary.model.DLFileRank addDLFileRank(
060                    com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank);
061    
062            public com.liferay.portlet.documentlibrary.model.DLFileRank addFileRank(
063                    long groupId, long companyId, long userId, long fileEntryId,
064                    com.liferay.portal.service.ServiceContext serviceContext);
065    
066            public void checkFileRanks();
067    
068            /**
069            * Creates a new document library file rank with the primary key. Does not add the document library file rank to the database.
070            *
071            * @param fileRankId the primary key for the new document library file rank
072            * @return the new document library file rank
073            */
074            public com.liferay.portlet.documentlibrary.model.DLFileRank createDLFileRank(
075                    long fileRankId);
076    
077            /**
078            * Deletes the document library file rank from the database. Also notifies the appropriate model listeners.
079            *
080            * @param dlFileRank the document library file rank
081            * @return the document library file rank that was removed
082            */
083            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
084            public com.liferay.portlet.documentlibrary.model.DLFileRank deleteDLFileRank(
085                    com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank);
086    
087            /**
088            * Deletes the document library file rank with the primary key from the database. Also notifies the appropriate model listeners.
089            *
090            * @param fileRankId the primary key of the document library file rank
091            * @return the document library file rank that was removed
092            * @throws PortalException if a document library file rank with the primary key could not be found
093            */
094            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
095            public com.liferay.portlet.documentlibrary.model.DLFileRank deleteDLFileRank(
096                    long fileRankId)
097                    throws com.liferay.portal.kernel.exception.PortalException;
098    
099            @com.liferay.portal.kernel.systemevent.SystemEvent(type = SystemEventConstants.TYPE_DELETE)
100            public void deleteFileRank(
101                    com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank);
102    
103            public void deleteFileRank(long fileRankId)
104                    throws com.liferay.portal.kernel.exception.PortalException;
105    
106            public void deleteFileRanksByFileEntryId(long fileEntryId);
107    
108            public void deleteFileRanksByUserId(long userId);
109    
110            /**
111            * @throws PortalException
112            */
113            @Override
114            public com.liferay.portal.model.PersistedModel deletePersistedModel(
115                    com.liferay.portal.model.PersistedModel persistedModel)
116                    throws com.liferay.portal.kernel.exception.PortalException;
117    
118            public void disableFileRanks(long fileEntryId);
119    
120            public void disableFileRanksByFolderId(long folderId)
121                    throws com.liferay.portal.kernel.exception.PortalException;
122    
123            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
124    
125            /**
126            * Performs a dynamic query on the database and returns the matching rows.
127            *
128            * @param dynamicQuery the dynamic query
129            * @return the matching rows
130            */
131            public <T> java.util.List<T> dynamicQuery(
132                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
133    
134            /**
135            * Performs a dynamic query on the database and returns a range of the matching rows.
136            *
137            * <p>
138            * 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.
139            * </p>
140            *
141            * @param dynamicQuery the dynamic query
142            * @param start the lower bound of the range of model instances
143            * @param end the upper bound of the range of model instances (not inclusive)
144            * @return the range of matching rows
145            */
146            public <T> java.util.List<T> dynamicQuery(
147                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
148                    int end);
149    
150            /**
151            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
152            *
153            * <p>
154            * 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.
155            * </p>
156            *
157            * @param dynamicQuery the dynamic query
158            * @param start the lower bound of the range of model instances
159            * @param end the upper bound of the range of model instances (not inclusive)
160            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
161            * @return the ordered range of matching rows
162            */
163            public <T> java.util.List<T> dynamicQuery(
164                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
165                    int end,
166                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
167    
168            /**
169            * Returns the number of rows matching the dynamic query.
170            *
171            * @param dynamicQuery the dynamic query
172            * @return the number of rows matching the dynamic query
173            */
174            public long dynamicQueryCount(
175                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
176    
177            /**
178            * Returns the number of rows matching the dynamic query.
179            *
180            * @param dynamicQuery the dynamic query
181            * @param projection the projection to apply to the query
182            * @return the number of rows matching the dynamic query
183            */
184            public long dynamicQueryCount(
185                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
186                    com.liferay.portal.kernel.dao.orm.Projection projection);
187    
188            public void enableFileRanks(long fileEntryId);
189    
190            public void enableFileRanksByFolderId(long folderId)
191                    throws com.liferay.portal.kernel.exception.PortalException;
192    
193            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
194            public com.liferay.portlet.documentlibrary.model.DLFileRank fetchDLFileRank(
195                    long fileRankId);
196    
197            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
198            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
199    
200            /**
201            * Returns the Spring bean ID for this bean.
202            *
203            * @return the Spring bean ID for this bean
204            */
205            public java.lang.String getBeanIdentifier();
206    
207            /**
208            * Returns the document library file rank with the primary key.
209            *
210            * @param fileRankId the primary key of the document library file rank
211            * @return the document library file rank
212            * @throws PortalException if a document library file rank with the primary key could not be found
213            */
214            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
215            public com.liferay.portlet.documentlibrary.model.DLFileRank getDLFileRank(
216                    long fileRankId)
217                    throws com.liferay.portal.kernel.exception.PortalException;
218    
219            /**
220            * Returns a range of all the document library file ranks.
221            *
222            * <p>
223            * 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.
224            * </p>
225            *
226            * @param start the lower bound of the range of document library file ranks
227            * @param end the upper bound of the range of document library file ranks (not inclusive)
228            * @return the range of document library file ranks
229            */
230            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
231            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> getDLFileRanks(
232                    int start, int end);
233    
234            /**
235            * Returns the number of document library file ranks.
236            *
237            * @return the number of document library file ranks
238            */
239            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
240            public int getDLFileRanksCount();
241    
242            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
243            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> getFileRanks(
244                    long groupId, long userId);
245    
246            @Override
247            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
248            public com.liferay.portal.model.PersistedModel getPersistedModel(
249                    java.io.Serializable primaryKeyObj)
250                    throws com.liferay.portal.kernel.exception.PortalException;
251    
252            /**
253            * Sets the Spring bean ID for this bean.
254            *
255            * @param beanIdentifier the Spring bean ID for this bean
256            */
257            public void setBeanIdentifier(java.lang.String beanIdentifier);
258    
259            /**
260            * Updates the document library file rank in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
261            *
262            * @param dlFileRank the document library file rank
263            * @return the document library file rank that was updated
264            */
265            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
266            public com.liferay.portlet.documentlibrary.model.DLFileRank updateDLFileRank(
267                    com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank);
268    
269            public com.liferay.portlet.documentlibrary.model.DLFileRank updateFileRank(
270                    long groupId, long companyId, long userId, long fileEntryId,
271                    com.liferay.portal.service.ServiceContext serviceContext);
272    }