001 /** 002 * Copyright (c) 2000-2013 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 * @throws SystemException if a system exception occurred 058 */ 059 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 060 public com.liferay.portlet.documentlibrary.model.DLFileRank addDLFileRank( 061 com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank) 062 throws com.liferay.portal.kernel.exception.SystemException; 063 064 /** 065 * Creates a new document library file rank with the primary key. Does not add the document library file rank to the database. 066 * 067 * @param fileRankId the primary key for the new document library file rank 068 * @return the new document library file rank 069 */ 070 public com.liferay.portlet.documentlibrary.model.DLFileRank createDLFileRank( 071 long fileRankId); 072 073 /** 074 * Deletes the document library file rank with the primary key from the database. Also notifies the appropriate model listeners. 075 * 076 * @param fileRankId the primary key of the document library file rank 077 * @return the document library file rank that was removed 078 * @throws PortalException if a document library file rank with the primary key could not be found 079 * @throws SystemException if a system exception occurred 080 */ 081 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 082 public com.liferay.portlet.documentlibrary.model.DLFileRank deleteDLFileRank( 083 long fileRankId) 084 throws com.liferay.portal.kernel.exception.PortalException, 085 com.liferay.portal.kernel.exception.SystemException; 086 087 /** 088 * Deletes the document library file rank from the database. Also notifies the appropriate model listeners. 089 * 090 * @param dlFileRank the document library file rank 091 * @return the document library file rank that was removed 092 * @throws SystemException if a system exception occurred 093 */ 094 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 095 public com.liferay.portlet.documentlibrary.model.DLFileRank deleteDLFileRank( 096 com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank) 097 throws com.liferay.portal.kernel.exception.SystemException; 098 099 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery(); 100 101 /** 102 * Performs a dynamic query on the database and returns the matching rows. 103 * 104 * @param dynamicQuery the dynamic query 105 * @return the matching rows 106 * @throws SystemException if a system exception occurred 107 */ 108 @SuppressWarnings("rawtypes") 109 public java.util.List dynamicQuery( 110 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 111 throws com.liferay.portal.kernel.exception.SystemException; 112 113 /** 114 * Performs a dynamic query on the database and returns a range of the matching rows. 115 * 116 * <p> 117 * 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. 118 * </p> 119 * 120 * @param dynamicQuery the dynamic query 121 * @param start the lower bound of the range of model instances 122 * @param end the upper bound of the range of model instances (not inclusive) 123 * @return the range of matching rows 124 * @throws SystemException if a system exception occurred 125 */ 126 @SuppressWarnings("rawtypes") 127 public java.util.List dynamicQuery( 128 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 129 int end) throws com.liferay.portal.kernel.exception.SystemException; 130 131 /** 132 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 133 * 134 * <p> 135 * 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. 136 * </p> 137 * 138 * @param dynamicQuery the dynamic query 139 * @param start the lower bound of the range of model instances 140 * @param end the upper bound of the range of model instances (not inclusive) 141 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 142 * @return the ordered range of matching rows 143 * @throws SystemException if a system exception occurred 144 */ 145 @SuppressWarnings("rawtypes") 146 public java.util.List dynamicQuery( 147 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 148 int end, 149 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 150 throws com.liferay.portal.kernel.exception.SystemException; 151 152 /** 153 * Returns the number of rows that match the dynamic query. 154 * 155 * @param dynamicQuery the dynamic query 156 * @return the number of rows that match the dynamic query 157 * @throws SystemException if a system exception occurred 158 */ 159 public long dynamicQueryCount( 160 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 161 throws com.liferay.portal.kernel.exception.SystemException; 162 163 /** 164 * Returns the number of rows that match the dynamic query. 165 * 166 * @param dynamicQuery the dynamic query 167 * @param projection the projection to apply to the query 168 * @return the number of rows that match the dynamic query 169 * @throws SystemException if a system exception occurred 170 */ 171 public long dynamicQueryCount( 172 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 173 com.liferay.portal.kernel.dao.orm.Projection projection) 174 throws com.liferay.portal.kernel.exception.SystemException; 175 176 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 177 public com.liferay.portlet.documentlibrary.model.DLFileRank fetchDLFileRank( 178 long fileRankId) 179 throws com.liferay.portal.kernel.exception.SystemException; 180 181 /** 182 * Returns the document library file rank with the primary key. 183 * 184 * @param fileRankId the primary key of the document library file rank 185 * @return the document library file rank 186 * @throws PortalException if a document library file rank with the primary key could not be found 187 * @throws SystemException if a system exception occurred 188 */ 189 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 190 public com.liferay.portlet.documentlibrary.model.DLFileRank getDLFileRank( 191 long fileRankId) 192 throws com.liferay.portal.kernel.exception.PortalException, 193 com.liferay.portal.kernel.exception.SystemException; 194 195 @Override 196 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 197 public com.liferay.portal.model.PersistedModel getPersistedModel( 198 java.io.Serializable primaryKeyObj) 199 throws com.liferay.portal.kernel.exception.PortalException, 200 com.liferay.portal.kernel.exception.SystemException; 201 202 /** 203 * Returns a range of all the document library file ranks. 204 * 205 * <p> 206 * 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. 207 * </p> 208 * 209 * @param start the lower bound of the range of document library file ranks 210 * @param end the upper bound of the range of document library file ranks (not inclusive) 211 * @return the range of document library file ranks 212 * @throws SystemException if a system exception occurred 213 */ 214 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 215 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> getDLFileRanks( 216 int start, int end) 217 throws com.liferay.portal.kernel.exception.SystemException; 218 219 /** 220 * Returns the number of document library file ranks. 221 * 222 * @return the number of document library file ranks 223 * @throws SystemException if a system exception occurred 224 */ 225 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 226 public int getDLFileRanksCount() 227 throws com.liferay.portal.kernel.exception.SystemException; 228 229 /** 230 * Updates the document library file rank in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 231 * 232 * @param dlFileRank the document library file rank 233 * @return the document library file rank that was updated 234 * @throws SystemException if a system exception occurred 235 */ 236 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 237 public com.liferay.portlet.documentlibrary.model.DLFileRank updateDLFileRank( 238 com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank) 239 throws com.liferay.portal.kernel.exception.SystemException; 240 241 /** 242 * Returns the Spring bean ID for this bean. 243 * 244 * @return the Spring bean ID for this bean 245 */ 246 public java.lang.String getBeanIdentifier(); 247 248 /** 249 * Sets the Spring bean ID for this bean. 250 * 251 * @param beanIdentifier the Spring bean ID for this bean 252 */ 253 public void setBeanIdentifier(java.lang.String beanIdentifier); 254 255 public com.liferay.portlet.documentlibrary.model.DLFileRank addFileRank( 256 long groupId, long companyId, long userId, long fileEntryId, 257 com.liferay.portal.service.ServiceContext serviceContext) 258 throws com.liferay.portal.kernel.exception.SystemException; 259 260 public void checkFileRanks() 261 throws com.liferay.portal.kernel.exception.SystemException; 262 263 @com.liferay.portal.kernel.systemevent.SystemEvent(action = SystemEventConstants.ACTION_SKIP, send = false, type = SystemEventConstants.TYPE_DELETE) 264 public void deleteFileRank( 265 com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank) 266 throws com.liferay.portal.kernel.exception.SystemException; 267 268 public void deleteFileRank(long fileRankId) 269 throws com.liferay.portal.kernel.exception.PortalException, 270 com.liferay.portal.kernel.exception.SystemException; 271 272 public void deleteFileRanksByFileEntryId(long fileEntryId) 273 throws com.liferay.portal.kernel.exception.SystemException; 274 275 public void deleteFileRanksByUserId(long userId) 276 throws com.liferay.portal.kernel.exception.SystemException; 277 278 public void disableFileRanks(long fileEntryId) 279 throws com.liferay.portal.kernel.exception.SystemException; 280 281 public void disableFileRanksByFolderId(long folderId) 282 throws com.liferay.portal.kernel.exception.PortalException, 283 com.liferay.portal.kernel.exception.SystemException; 284 285 public void enableFileRanks(long fileEntryId) 286 throws com.liferay.portal.kernel.exception.SystemException; 287 288 public void enableFileRanksByFolderId(long folderId) 289 throws com.liferay.portal.kernel.exception.PortalException, 290 com.liferay.portal.kernel.exception.SystemException; 291 292 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 293 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> getFileRanks( 294 long groupId, long userId) 295 throws com.liferay.portal.kernel.exception.SystemException; 296 297 public com.liferay.portlet.documentlibrary.model.DLFileRank updateFileRank( 298 long groupId, long companyId, long userId, long fileEntryId, 299 com.liferay.portal.service.ServiceContext serviceContext) 300 throws com.liferay.portal.kernel.exception.SystemException; 301 }