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