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) throws PortalException; 097 098 @com.liferay.portal.kernel.systemevent.SystemEvent(type = SystemEventConstants.TYPE_DELETE) 099 public void deleteFileRank( 100 com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank); 101 102 public void deleteFileRank(long fileRankId) throws PortalException; 103 104 public void deleteFileRanksByFileEntryId(long fileEntryId); 105 106 public void deleteFileRanksByUserId(long userId); 107 108 /** 109 * @throws PortalException 110 */ 111 @Override 112 public com.liferay.portal.model.PersistedModel deletePersistedModel( 113 com.liferay.portal.model.PersistedModel persistedModel) 114 throws PortalException; 115 116 public void disableFileRanks(long fileEntryId); 117 118 public void disableFileRanksByFolderId(long folderId) 119 throws PortalException; 120 121 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery(); 122 123 /** 124 * Performs a dynamic query on the database and returns the matching rows. 125 * 126 * @param dynamicQuery the dynamic query 127 * @return the matching rows 128 */ 129 public <T> java.util.List<T> dynamicQuery( 130 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 131 132 /** 133 * Performs a dynamic query on the database and returns a range of the matching rows. 134 * 135 * <p> 136 * 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. 137 * </p> 138 * 139 * @param dynamicQuery the dynamic query 140 * @param start the lower bound of the range of model instances 141 * @param end the upper bound of the range of model instances (not inclusive) 142 * @return the range of matching rows 143 */ 144 public <T> java.util.List<T> dynamicQuery( 145 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 146 int end); 147 148 /** 149 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 150 * 151 * <p> 152 * 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. 153 * </p> 154 * 155 * @param dynamicQuery the dynamic query 156 * @param start the lower bound of the range of model instances 157 * @param end the upper bound of the range of model instances (not inclusive) 158 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 159 * @return the ordered range of matching rows 160 */ 161 public <T> java.util.List<T> dynamicQuery( 162 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 163 int end, 164 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator); 165 166 /** 167 * Returns the number of rows matching the dynamic query. 168 * 169 * @param dynamicQuery the dynamic query 170 * @return the number of rows matching the dynamic query 171 */ 172 public long dynamicQueryCount( 173 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 174 175 /** 176 * Returns the number of rows matching the dynamic query. 177 * 178 * @param dynamicQuery the dynamic query 179 * @param projection the projection to apply to the query 180 * @return the number of rows matching the dynamic query 181 */ 182 public long dynamicQueryCount( 183 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 184 com.liferay.portal.kernel.dao.orm.Projection projection); 185 186 public void enableFileRanks(long fileEntryId); 187 188 public void enableFileRanksByFolderId(long folderId) 189 throws PortalException; 190 191 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 192 public com.liferay.portlet.documentlibrary.model.DLFileRank fetchDLFileRank( 193 long fileRankId); 194 195 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 196 public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery(); 197 198 /** 199 * Returns the document library file rank with the primary key. 200 * 201 * @param fileRankId the primary key of the document library file rank 202 * @return the document library file rank 203 * @throws PortalException if a document library file rank with the primary key could not be found 204 */ 205 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 206 public com.liferay.portlet.documentlibrary.model.DLFileRank getDLFileRank( 207 long fileRankId) throws PortalException; 208 209 /** 210 * Returns a range of all the document library file ranks. 211 * 212 * <p> 213 * 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. 214 * </p> 215 * 216 * @param start the lower bound of the range of document library file ranks 217 * @param end the upper bound of the range of document library file ranks (not inclusive) 218 * @return the range of document library file ranks 219 */ 220 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 221 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> getDLFileRanks( 222 int start, int end); 223 224 /** 225 * Returns the number of document library file ranks. 226 * 227 * @return the number of document library file ranks 228 */ 229 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 230 public int getDLFileRanksCount(); 231 232 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 233 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> getFileRanks( 234 long groupId, long userId); 235 236 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 237 public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery(); 238 239 /** 240 * Returns the OSGi service identifier. 241 * 242 * @return the OSGi service identifier 243 */ 244 public java.lang.String getOSGiServiceIdentifier(); 245 246 @Override 247 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 248 public com.liferay.portal.model.PersistedModel getPersistedModel( 249 java.io.Serializable primaryKeyObj) throws PortalException; 250 251 /** 252 * Updates the document library file rank in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 253 * 254 * @param dlFileRank the document library file rank 255 * @return the document library file rank that was updated 256 */ 257 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 258 public com.liferay.portlet.documentlibrary.model.DLFileRank updateDLFileRank( 259 com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank); 260 261 public com.liferay.portlet.documentlibrary.model.DLFileRank updateFileRank( 262 long groupId, long companyId, long userId, long fileEntryId, 263 com.liferay.portal.service.ServiceContext serviceContext); 264 }