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 DLFileVersion. This utility wraps 024 * {@link com.liferay.portlet.documentlibrary.service.impl.DLFileVersionLocalServiceImpl} 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 DLFileVersionLocalService 032 * @see com.liferay.portlet.documentlibrary.service.base.DLFileVersionLocalServiceBaseImpl 033 * @see com.liferay.portlet.documentlibrary.service.impl.DLFileVersionLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class DLFileVersionLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLFileVersionLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 044 /** 045 * Adds the document library file version to the database. Also notifies the appropriate model listeners. 046 * 047 * @param dlFileVersion the document library file version 048 * @return the document library file version that was added 049 */ 050 public static com.liferay.document.library.kernel.model.DLFileVersion addDLFileVersion( 051 com.liferay.document.library.kernel.model.DLFileVersion dlFileVersion) { 052 return getService().addDLFileVersion(dlFileVersion); 053 } 054 055 /** 056 * Creates a new document library file version with the primary key. Does not add the document library file version to the database. 057 * 058 * @param fileVersionId the primary key for the new document library file version 059 * @return the new document library file version 060 */ 061 public static com.liferay.document.library.kernel.model.DLFileVersion createDLFileVersion( 062 long fileVersionId) { 063 return getService().createDLFileVersion(fileVersionId); 064 } 065 066 /** 067 * Deletes the document library file version from the database. Also notifies the appropriate model listeners. 068 * 069 * @param dlFileVersion the document library file version 070 * @return the document library file version that was removed 071 */ 072 public static com.liferay.document.library.kernel.model.DLFileVersion deleteDLFileVersion( 073 com.liferay.document.library.kernel.model.DLFileVersion dlFileVersion) { 074 return getService().deleteDLFileVersion(dlFileVersion); 075 } 076 077 /** 078 * Deletes the document library file version with the primary key from the database. Also notifies the appropriate model listeners. 079 * 080 * @param fileVersionId the primary key of the document library file version 081 * @return the document library file version that was removed 082 * @throws PortalException if a document library file version with the primary key could not be found 083 */ 084 public static com.liferay.document.library.kernel.model.DLFileVersion deleteDLFileVersion( 085 long fileVersionId) 086 throws com.liferay.portal.kernel.exception.PortalException { 087 return getService().deleteDLFileVersion(fileVersionId); 088 } 089 090 public static com.liferay.document.library.kernel.model.DLFileVersion fetchDLFileVersion( 091 long fileVersionId) { 092 return getService().fetchDLFileVersion(fileVersionId); 093 } 094 095 /** 096 * Returns the document library file version matching the UUID and group. 097 * 098 * @param uuid the document library file version's UUID 099 * @param groupId the primary key of the group 100 * @return the matching document library file version, or <code>null</code> if a matching document library file version could not be found 101 */ 102 public static com.liferay.document.library.kernel.model.DLFileVersion fetchDLFileVersionByUuidAndGroupId( 103 java.lang.String uuid, long groupId) { 104 return getService().fetchDLFileVersionByUuidAndGroupId(uuid, groupId); 105 } 106 107 public static com.liferay.document.library.kernel.model.DLFileVersion fetchLatestFileVersion( 108 long fileEntryId, boolean excludeWorkingCopy) { 109 return getService() 110 .fetchLatestFileVersion(fileEntryId, excludeWorkingCopy); 111 } 112 113 /** 114 * Returns the document library file version with the primary key. 115 * 116 * @param fileVersionId the primary key of the document library file version 117 * @return the document library file version 118 * @throws PortalException if a document library file version with the primary key could not be found 119 */ 120 public static com.liferay.document.library.kernel.model.DLFileVersion getDLFileVersion( 121 long fileVersionId) 122 throws com.liferay.portal.kernel.exception.PortalException { 123 return getService().getDLFileVersion(fileVersionId); 124 } 125 126 /** 127 * Returns the document library file version matching the UUID and group. 128 * 129 * @param uuid the document library file version's UUID 130 * @param groupId the primary key of the group 131 * @return the matching document library file version 132 * @throws PortalException if a matching document library file version could not be found 133 */ 134 public static com.liferay.document.library.kernel.model.DLFileVersion getDLFileVersionByUuidAndGroupId( 135 java.lang.String uuid, long groupId) 136 throws com.liferay.portal.kernel.exception.PortalException { 137 return getService().getDLFileVersionByUuidAndGroupId(uuid, groupId); 138 } 139 140 public static com.liferay.document.library.kernel.model.DLFileVersion getFileVersion( 141 long fileEntryId, java.lang.String version) 142 throws com.liferay.portal.kernel.exception.PortalException { 143 return getService().getFileVersion(fileEntryId, version); 144 } 145 146 public static com.liferay.document.library.kernel.model.DLFileVersion getFileVersion( 147 long fileVersionId) 148 throws com.liferay.portal.kernel.exception.PortalException { 149 return getService().getFileVersion(fileVersionId); 150 } 151 152 public static com.liferay.document.library.kernel.model.DLFileVersion getFileVersionByUuidAndGroupId( 153 java.lang.String uuid, long groupId) { 154 return getService().getFileVersionByUuidAndGroupId(uuid, groupId); 155 } 156 157 public static com.liferay.document.library.kernel.model.DLFileVersion getLatestFileVersion( 158 long fileEntryId, boolean excludeWorkingCopy) 159 throws com.liferay.portal.kernel.exception.PortalException { 160 return getService().getLatestFileVersion(fileEntryId, excludeWorkingCopy); 161 } 162 163 public static com.liferay.document.library.kernel.model.DLFileVersion getLatestFileVersion( 164 long userId, long fileEntryId) 165 throws com.liferay.portal.kernel.exception.PortalException { 166 return getService().getLatestFileVersion(userId, fileEntryId); 167 } 168 169 /** 170 * Updates the document library file version in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 171 * 172 * @param dlFileVersion the document library file version 173 * @return the document library file version that was updated 174 */ 175 public static com.liferay.document.library.kernel.model.DLFileVersion updateDLFileVersion( 176 com.liferay.document.library.kernel.model.DLFileVersion dlFileVersion) { 177 return getService().updateDLFileVersion(dlFileVersion); 178 } 179 180 public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 181 return getService().getActionableDynamicQuery(); 182 } 183 184 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 185 return getService().dynamicQuery(); 186 } 187 188 public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 189 com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext) { 190 return getService().getExportActionableDynamicQuery(portletDataContext); 191 } 192 193 public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { 194 return getService().getIndexableActionableDynamicQuery(); 195 } 196 197 /** 198 * @throws PortalException 199 */ 200 public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel( 201 com.liferay.portal.kernel.model.PersistedModel persistedModel) 202 throws com.liferay.portal.kernel.exception.PortalException { 203 return getService().deletePersistedModel(persistedModel); 204 } 205 206 public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel( 207 java.io.Serializable primaryKeyObj) 208 throws com.liferay.portal.kernel.exception.PortalException { 209 return getService().getPersistedModel(primaryKeyObj); 210 } 211 212 /** 213 * Returns the number of document library file versions. 214 * 215 * @return the number of document library file versions 216 */ 217 public static int getDLFileVersionsCount() { 218 return getService().getDLFileVersionsCount(); 219 } 220 221 public static int getFileVersionsCount(long fileEntryId, int status) { 222 return getService().getFileVersionsCount(fileEntryId, status); 223 } 224 225 /** 226 * Returns the OSGi service identifier. 227 * 228 * @return the OSGi service identifier 229 */ 230 public static java.lang.String getOSGiServiceIdentifier() { 231 return getService().getOSGiServiceIdentifier(); 232 } 233 234 /** 235 * Performs a dynamic query on the database and returns the matching rows. 236 * 237 * @param dynamicQuery the dynamic query 238 * @return the matching rows 239 */ 240 public static <T> java.util.List<T> dynamicQuery( 241 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 242 return getService().dynamicQuery(dynamicQuery); 243 } 244 245 /** 246 * Performs a dynamic query on the database and returns a range of the matching rows. 247 * 248 * <p> 249 * 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.DLFileVersionModelImpl}. 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. 250 * </p> 251 * 252 * @param dynamicQuery the dynamic query 253 * @param start the lower bound of the range of model instances 254 * @param end the upper bound of the range of model instances (not inclusive) 255 * @return the range of matching rows 256 */ 257 public static <T> java.util.List<T> dynamicQuery( 258 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 259 int end) { 260 return getService().dynamicQuery(dynamicQuery, start, end); 261 } 262 263 /** 264 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 265 * 266 * <p> 267 * 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.DLFileVersionModelImpl}. 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. 268 * </p> 269 * 270 * @param dynamicQuery the dynamic query 271 * @param start the lower bound of the range of model instances 272 * @param end the upper bound of the range of model instances (not inclusive) 273 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 274 * @return the ordered range of matching rows 275 */ 276 public static <T> java.util.List<T> dynamicQuery( 277 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 278 int end, 279 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 280 return getService() 281 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 282 } 283 284 /** 285 * Returns a range of all the document library file versions. 286 * 287 * <p> 288 * 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.DLFileVersionModelImpl}. 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. 289 * </p> 290 * 291 * @param start the lower bound of the range of document library file versions 292 * @param end the upper bound of the range of document library file versions (not inclusive) 293 * @return the range of document library file versions 294 */ 295 public static java.util.List<com.liferay.document.library.kernel.model.DLFileVersion> getDLFileVersions( 296 int start, int end) { 297 return getService().getDLFileVersions(start, end); 298 } 299 300 /** 301 * Returns all the document library file versions matching the UUID and company. 302 * 303 * @param uuid the UUID of the document library file versions 304 * @param companyId the primary key of the company 305 * @return the matching document library file versions, or an empty list if no matches were found 306 */ 307 public static java.util.List<com.liferay.document.library.kernel.model.DLFileVersion> getDLFileVersionsByUuidAndCompanyId( 308 java.lang.String uuid, long companyId) { 309 return getService().getDLFileVersionsByUuidAndCompanyId(uuid, companyId); 310 } 311 312 /** 313 * Returns a range of document library file versions matching the UUID and company. 314 * 315 * @param uuid the UUID of the document library file versions 316 * @param companyId the primary key of the company 317 * @param start the lower bound of the range of document library file versions 318 * @param end the upper bound of the range of document library file versions (not inclusive) 319 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 320 * @return the range of matching document library file versions, or an empty list if no matches were found 321 */ 322 public static java.util.List<com.liferay.document.library.kernel.model.DLFileVersion> getDLFileVersionsByUuidAndCompanyId( 323 java.lang.String uuid, long companyId, int start, int end, 324 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFileVersion> orderByComparator) { 325 return getService() 326 .getDLFileVersionsByUuidAndCompanyId(uuid, companyId, start, 327 end, orderByComparator); 328 } 329 330 public static java.util.List<com.liferay.document.library.kernel.model.DLFileVersion> getFileVersions( 331 long fileEntryId, int status) { 332 return getService().getFileVersions(fileEntryId, status); 333 } 334 335 /** 336 * Returns the number of rows matching the dynamic query. 337 * 338 * @param dynamicQuery the dynamic query 339 * @return the number of rows matching the dynamic query 340 */ 341 public static long dynamicQueryCount( 342 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 343 return getService().dynamicQueryCount(dynamicQuery); 344 } 345 346 /** 347 * Returns the number of rows matching the dynamic query. 348 * 349 * @param dynamicQuery the dynamic query 350 * @param projection the projection to apply to the query 351 * @return the number of rows matching the dynamic query 352 */ 353 public static long dynamicQueryCount( 354 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 355 com.liferay.portal.kernel.dao.orm.Projection projection) { 356 return getService().dynamicQueryCount(dynamicQuery, projection); 357 } 358 359 public static void rebuildTree(long companyId) 360 throws com.liferay.portal.kernel.exception.PortalException { 361 getService().rebuildTree(companyId); 362 } 363 364 public static void setTreePaths(long folderId, java.lang.String treePath) 365 throws com.liferay.portal.kernel.exception.PortalException { 366 getService().setTreePaths(folderId, treePath); 367 } 368 369 public static DLFileVersionLocalService getService() { 370 if (_service == null) { 371 _service = (DLFileVersionLocalService)PortalBeanLocatorUtil.locate(DLFileVersionLocalService.class.getName()); 372 373 ReferenceRegistry.registerReference(DLFileVersionLocalServiceUtil.class, 374 "_service"); 375 } 376 377 return _service; 378 } 379 380 private static DLFileVersionLocalService _service; 381 }