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.persistence; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 020 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 021 import com.liferay.portal.kernel.util.OrderByComparator; 022 import com.liferay.portal.kernel.util.ReferenceRegistry; 023 import com.liferay.portal.service.ServiceContext; 024 025 import com.liferay.portlet.documentlibrary.model.DLSyncEvent; 026 027 import java.util.List; 028 029 /** 030 * The persistence utility for the d l sync event service. This utility wraps {@link com.liferay.portlet.documentlibrary.service.persistence.impl.DLSyncEventPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. 031 * 032 * <p> 033 * Caching information and settings can be found in <code>portal.properties</code> 034 * </p> 035 * 036 * @author Brian Wing Shun Chan 037 * @see DLSyncEventPersistence 038 * @see com.liferay.portlet.documentlibrary.service.persistence.impl.DLSyncEventPersistenceImpl 039 * @generated 040 */ 041 @ProviderType 042 public class DLSyncEventUtil { 043 /* 044 * NOTE FOR DEVELOPERS: 045 * 046 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 047 */ 048 049 /** 050 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 051 */ 052 public static void clearCache() { 053 getPersistence().clearCache(); 054 } 055 056 /** 057 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 058 */ 059 public static void clearCache(DLSyncEvent dlSyncEvent) { 060 getPersistence().clearCache(dlSyncEvent); 061 } 062 063 /** 064 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 065 */ 066 public static long countWithDynamicQuery(DynamicQuery dynamicQuery) { 067 return getPersistence().countWithDynamicQuery(dynamicQuery); 068 } 069 070 /** 071 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 072 */ 073 public static List<DLSyncEvent> findWithDynamicQuery( 074 DynamicQuery dynamicQuery) { 075 return getPersistence().findWithDynamicQuery(dynamicQuery); 076 } 077 078 /** 079 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 080 */ 081 public static List<DLSyncEvent> findWithDynamicQuery( 082 DynamicQuery dynamicQuery, int start, int end) { 083 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 084 } 085 086 /** 087 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 088 */ 089 public static List<DLSyncEvent> findWithDynamicQuery( 090 DynamicQuery dynamicQuery, int start, int end, 091 OrderByComparator<DLSyncEvent> orderByComparator) { 092 return getPersistence() 093 .findWithDynamicQuery(dynamicQuery, start, end, 094 orderByComparator); 095 } 096 097 /** 098 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel) 099 */ 100 public static DLSyncEvent update(DLSyncEvent dlSyncEvent) { 101 return getPersistence().update(dlSyncEvent); 102 } 103 104 /** 105 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 106 */ 107 public static DLSyncEvent update(DLSyncEvent dlSyncEvent, 108 ServiceContext serviceContext) { 109 return getPersistence().update(dlSyncEvent, serviceContext); 110 } 111 112 /** 113 * Returns all the d l sync events where modifiedTime > ?. 114 * 115 * @param modifiedTime the modified time 116 * @return the matching d l sync events 117 */ 118 public static List<DLSyncEvent> findByModifiedTime(long modifiedTime) { 119 return getPersistence().findByModifiedTime(modifiedTime); 120 } 121 122 /** 123 * Returns a range of all the d l sync events where modifiedTime > ?. 124 * 125 * <p> 126 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLSyncEventModelImpl}. 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. 127 * </p> 128 * 129 * @param modifiedTime the modified time 130 * @param start the lower bound of the range of d l sync events 131 * @param end the upper bound of the range of d l sync events (not inclusive) 132 * @return the range of matching d l sync events 133 */ 134 public static List<DLSyncEvent> findByModifiedTime(long modifiedTime, 135 int start, int end) { 136 return getPersistence().findByModifiedTime(modifiedTime, start, end); 137 } 138 139 /** 140 * Returns an ordered range of all the d l sync events where modifiedTime > ?. 141 * 142 * <p> 143 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLSyncEventModelImpl}. 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. 144 * </p> 145 * 146 * @param modifiedTime the modified time 147 * @param start the lower bound of the range of d l sync events 148 * @param end the upper bound of the range of d l sync events (not inclusive) 149 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 150 * @return the ordered range of matching d l sync events 151 */ 152 public static List<DLSyncEvent> findByModifiedTime(long modifiedTime, 153 int start, int end, OrderByComparator<DLSyncEvent> orderByComparator) { 154 return getPersistence() 155 .findByModifiedTime(modifiedTime, start, end, 156 orderByComparator); 157 } 158 159 /** 160 * Returns the first d l sync event in the ordered set where modifiedTime > ?. 161 * 162 * @param modifiedTime the modified time 163 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 164 * @return the first matching d l sync event 165 * @throws NoSuchSyncEventException if a matching d l sync event could not be found 166 */ 167 public static DLSyncEvent findByModifiedTime_First(long modifiedTime, 168 OrderByComparator<DLSyncEvent> orderByComparator) 169 throws com.liferay.portlet.documentlibrary.NoSuchSyncEventException { 170 return getPersistence() 171 .findByModifiedTime_First(modifiedTime, orderByComparator); 172 } 173 174 /** 175 * Returns the first d l sync event in the ordered set where modifiedTime > ?. 176 * 177 * @param modifiedTime the modified time 178 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 179 * @return the first matching d l sync event, or <code>null</code> if a matching d l sync event could not be found 180 */ 181 public static DLSyncEvent fetchByModifiedTime_First(long modifiedTime, 182 OrderByComparator<DLSyncEvent> orderByComparator) { 183 return getPersistence() 184 .fetchByModifiedTime_First(modifiedTime, orderByComparator); 185 } 186 187 /** 188 * Returns the last d l sync event in the ordered set where modifiedTime > ?. 189 * 190 * @param modifiedTime the modified time 191 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 192 * @return the last matching d l sync event 193 * @throws NoSuchSyncEventException if a matching d l sync event could not be found 194 */ 195 public static DLSyncEvent findByModifiedTime_Last(long modifiedTime, 196 OrderByComparator<DLSyncEvent> orderByComparator) 197 throws com.liferay.portlet.documentlibrary.NoSuchSyncEventException { 198 return getPersistence() 199 .findByModifiedTime_Last(modifiedTime, orderByComparator); 200 } 201 202 /** 203 * Returns the last d l sync event in the ordered set where modifiedTime > ?. 204 * 205 * @param modifiedTime the modified time 206 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 207 * @return the last matching d l sync event, or <code>null</code> if a matching d l sync event could not be found 208 */ 209 public static DLSyncEvent fetchByModifiedTime_Last(long modifiedTime, 210 OrderByComparator<DLSyncEvent> orderByComparator) { 211 return getPersistence() 212 .fetchByModifiedTime_Last(modifiedTime, orderByComparator); 213 } 214 215 /** 216 * Returns the d l sync events before and after the current d l sync event in the ordered set where modifiedTime > ?. 217 * 218 * @param syncEventId the primary key of the current d l sync event 219 * @param modifiedTime the modified time 220 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 221 * @return the previous, current, and next d l sync event 222 * @throws NoSuchSyncEventException if a d l sync event with the primary key could not be found 223 */ 224 public static DLSyncEvent[] findByModifiedTime_PrevAndNext( 225 long syncEventId, long modifiedTime, 226 OrderByComparator<DLSyncEvent> orderByComparator) 227 throws com.liferay.portlet.documentlibrary.NoSuchSyncEventException { 228 return getPersistence() 229 .findByModifiedTime_PrevAndNext(syncEventId, modifiedTime, 230 orderByComparator); 231 } 232 233 /** 234 * Removes all the d l sync events where modifiedTime > ? from the database. 235 * 236 * @param modifiedTime the modified time 237 */ 238 public static void removeByModifiedTime(long modifiedTime) { 239 getPersistence().removeByModifiedTime(modifiedTime); 240 } 241 242 /** 243 * Returns the number of d l sync events where modifiedTime > ?. 244 * 245 * @param modifiedTime the modified time 246 * @return the number of matching d l sync events 247 */ 248 public static int countByModifiedTime(long modifiedTime) { 249 return getPersistence().countByModifiedTime(modifiedTime); 250 } 251 252 /** 253 * Returns the d l sync event where typePK = ? or throws a {@link NoSuchSyncEventException} if it could not be found. 254 * 255 * @param typePK the type p k 256 * @return the matching d l sync event 257 * @throws NoSuchSyncEventException if a matching d l sync event could not be found 258 */ 259 public static DLSyncEvent findByTypePK(long typePK) 260 throws com.liferay.portlet.documentlibrary.NoSuchSyncEventException { 261 return getPersistence().findByTypePK(typePK); 262 } 263 264 /** 265 * Returns the d l sync event where typePK = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 266 * 267 * @param typePK the type p k 268 * @return the matching d l sync event, or <code>null</code> if a matching d l sync event could not be found 269 */ 270 public static DLSyncEvent fetchByTypePK(long typePK) { 271 return getPersistence().fetchByTypePK(typePK); 272 } 273 274 /** 275 * Returns the d l sync event where typePK = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 276 * 277 * @param typePK the type p k 278 * @param retrieveFromCache whether to use the finder cache 279 * @return the matching d l sync event, or <code>null</code> if a matching d l sync event could not be found 280 */ 281 public static DLSyncEvent fetchByTypePK(long typePK, 282 boolean retrieveFromCache) { 283 return getPersistence().fetchByTypePK(typePK, retrieveFromCache); 284 } 285 286 /** 287 * Removes the d l sync event where typePK = ? from the database. 288 * 289 * @param typePK the type p k 290 * @return the d l sync event that was removed 291 */ 292 public static DLSyncEvent removeByTypePK(long typePK) 293 throws com.liferay.portlet.documentlibrary.NoSuchSyncEventException { 294 return getPersistence().removeByTypePK(typePK); 295 } 296 297 /** 298 * Returns the number of d l sync events where typePK = ?. 299 * 300 * @param typePK the type p k 301 * @return the number of matching d l sync events 302 */ 303 public static int countByTypePK(long typePK) { 304 return getPersistence().countByTypePK(typePK); 305 } 306 307 /** 308 * Caches the d l sync event in the entity cache if it is enabled. 309 * 310 * @param dlSyncEvent the d l sync event 311 */ 312 public static void cacheResult(DLSyncEvent dlSyncEvent) { 313 getPersistence().cacheResult(dlSyncEvent); 314 } 315 316 /** 317 * Caches the d l sync events in the entity cache if it is enabled. 318 * 319 * @param dlSyncEvents the d l sync events 320 */ 321 public static void cacheResult(List<DLSyncEvent> dlSyncEvents) { 322 getPersistence().cacheResult(dlSyncEvents); 323 } 324 325 /** 326 * Creates a new d l sync event with the primary key. Does not add the d l sync event to the database. 327 * 328 * @param syncEventId the primary key for the new d l sync event 329 * @return the new d l sync event 330 */ 331 public static DLSyncEvent create(long syncEventId) { 332 return getPersistence().create(syncEventId); 333 } 334 335 /** 336 * Removes the d l sync event with the primary key from the database. Also notifies the appropriate model listeners. 337 * 338 * @param syncEventId the primary key of the d l sync event 339 * @return the d l sync event that was removed 340 * @throws NoSuchSyncEventException if a d l sync event with the primary key could not be found 341 */ 342 public static DLSyncEvent remove(long syncEventId) 343 throws com.liferay.portlet.documentlibrary.NoSuchSyncEventException { 344 return getPersistence().remove(syncEventId); 345 } 346 347 public static DLSyncEvent updateImpl(DLSyncEvent dlSyncEvent) { 348 return getPersistence().updateImpl(dlSyncEvent); 349 } 350 351 /** 352 * Returns the d l sync event with the primary key or throws a {@link NoSuchSyncEventException} if it could not be found. 353 * 354 * @param syncEventId the primary key of the d l sync event 355 * @return the d l sync event 356 * @throws NoSuchSyncEventException if a d l sync event with the primary key could not be found 357 */ 358 public static DLSyncEvent findByPrimaryKey(long syncEventId) 359 throws com.liferay.portlet.documentlibrary.NoSuchSyncEventException { 360 return getPersistence().findByPrimaryKey(syncEventId); 361 } 362 363 /** 364 * Returns the d l sync event with the primary key or returns <code>null</code> if it could not be found. 365 * 366 * @param syncEventId the primary key of the d l sync event 367 * @return the d l sync event, or <code>null</code> if a d l sync event with the primary key could not be found 368 */ 369 public static DLSyncEvent fetchByPrimaryKey(long syncEventId) { 370 return getPersistence().fetchByPrimaryKey(syncEventId); 371 } 372 373 public static java.util.Map<java.io.Serializable, DLSyncEvent> fetchByPrimaryKeys( 374 java.util.Set<java.io.Serializable> primaryKeys) { 375 return getPersistence().fetchByPrimaryKeys(primaryKeys); 376 } 377 378 /** 379 * Returns all the d l sync events. 380 * 381 * @return the d l sync events 382 */ 383 public static List<DLSyncEvent> findAll() { 384 return getPersistence().findAll(); 385 } 386 387 /** 388 * Returns a range of all the d l sync events. 389 * 390 * <p> 391 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLSyncEventModelImpl}. 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. 392 * </p> 393 * 394 * @param start the lower bound of the range of d l sync events 395 * @param end the upper bound of the range of d l sync events (not inclusive) 396 * @return the range of d l sync events 397 */ 398 public static List<DLSyncEvent> findAll(int start, int end) { 399 return getPersistence().findAll(start, end); 400 } 401 402 /** 403 * Returns an ordered range of all the d l sync events. 404 * 405 * <p> 406 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DLSyncEventModelImpl}. 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. 407 * </p> 408 * 409 * @param start the lower bound of the range of d l sync events 410 * @param end the upper bound of the range of d l sync events (not inclusive) 411 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 412 * @return the ordered range of d l sync events 413 */ 414 public static List<DLSyncEvent> findAll(int start, int end, 415 OrderByComparator<DLSyncEvent> orderByComparator) { 416 return getPersistence().findAll(start, end, orderByComparator); 417 } 418 419 /** 420 * Removes all the d l sync events from the database. 421 */ 422 public static void removeAll() { 423 getPersistence().removeAll(); 424 } 425 426 /** 427 * Returns the number of d l sync events. 428 * 429 * @return the number of d l sync events 430 */ 431 public static int countAll() { 432 return getPersistence().countAll(); 433 } 434 435 public static DLSyncEventPersistence getPersistence() { 436 if (_persistence == null) { 437 _persistence = (DLSyncEventPersistence)PortalBeanLocatorUtil.locate(DLSyncEventPersistence.class.getName()); 438 439 ReferenceRegistry.registerReference(DLSyncEventUtil.class, 440 "_persistence"); 441 } 442 443 return _persistence; 444 } 445 446 /** 447 * @deprecated As of 6.2.0 448 */ 449 @Deprecated 450 public void setPersistence(DLSyncEventPersistence persistence) { 451 } 452 453 private static DLSyncEventPersistence _persistence; 454 }