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 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 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 java.util.List<com.liferay.portlet.documentlibrary.model.DLSyncEvent> findByModifiedTime( 119 long modifiedTime) { 120 return getPersistence().findByModifiedTime(modifiedTime); 121 } 122 123 /** 124 * Returns a range of all the d l sync events where modifiedTime > ?. 125 * 126 * <p> 127 * 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.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. 128 * </p> 129 * 130 * @param modifiedTime the modified time 131 * @param start the lower bound of the range of d l sync events 132 * @param end the upper bound of the range of d l sync events (not inclusive) 133 * @return the range of matching d l sync events 134 */ 135 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLSyncEvent> findByModifiedTime( 136 long modifiedTime, int start, int end) { 137 return getPersistence().findByModifiedTime(modifiedTime, start, end); 138 } 139 140 /** 141 * Returns an ordered range of all the d l sync events where modifiedTime > ?. 142 * 143 * <p> 144 * 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.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. 145 * </p> 146 * 147 * @param modifiedTime the modified time 148 * @param start the lower bound of the range of d l sync events 149 * @param end the upper bound of the range of d l sync events (not inclusive) 150 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 151 * @return the ordered range of matching d l sync events 152 */ 153 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLSyncEvent> findByModifiedTime( 154 long modifiedTime, int start, int end, 155 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLSyncEvent> orderByComparator) { 156 return getPersistence() 157 .findByModifiedTime(modifiedTime, start, end, 158 orderByComparator); 159 } 160 161 /** 162 * Returns the first d l sync event in the ordered set where modifiedTime > ?. 163 * 164 * @param modifiedTime the modified time 165 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 166 * @return the first matching d l sync event 167 * @throws com.liferay.portlet.documentlibrary.NoSuchSyncEventException if a matching d l sync event could not be found 168 */ 169 public static com.liferay.portlet.documentlibrary.model.DLSyncEvent findByModifiedTime_First( 170 long modifiedTime, 171 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLSyncEvent> orderByComparator) 172 throws com.liferay.portlet.documentlibrary.NoSuchSyncEventException { 173 return getPersistence() 174 .findByModifiedTime_First(modifiedTime, orderByComparator); 175 } 176 177 /** 178 * Returns the first d l sync event in the ordered set where modifiedTime > ?. 179 * 180 * @param modifiedTime the modified time 181 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 182 * @return the first matching d l sync event, or <code>null</code> if a matching d l sync event could not be found 183 */ 184 public static com.liferay.portlet.documentlibrary.model.DLSyncEvent fetchByModifiedTime_First( 185 long modifiedTime, 186 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLSyncEvent> orderByComparator) { 187 return getPersistence() 188 .fetchByModifiedTime_First(modifiedTime, orderByComparator); 189 } 190 191 /** 192 * Returns the last d l sync event in the ordered set where modifiedTime > ?. 193 * 194 * @param modifiedTime the modified time 195 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 196 * @return the last matching d l sync event 197 * @throws com.liferay.portlet.documentlibrary.NoSuchSyncEventException if a matching d l sync event could not be found 198 */ 199 public static com.liferay.portlet.documentlibrary.model.DLSyncEvent findByModifiedTime_Last( 200 long modifiedTime, 201 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLSyncEvent> orderByComparator) 202 throws com.liferay.portlet.documentlibrary.NoSuchSyncEventException { 203 return getPersistence() 204 .findByModifiedTime_Last(modifiedTime, orderByComparator); 205 } 206 207 /** 208 * Returns the last d l sync event in the ordered set where modifiedTime > ?. 209 * 210 * @param modifiedTime the modified time 211 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 212 * @return the last matching d l sync event, or <code>null</code> if a matching d l sync event could not be found 213 */ 214 public static com.liferay.portlet.documentlibrary.model.DLSyncEvent fetchByModifiedTime_Last( 215 long modifiedTime, 216 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLSyncEvent> orderByComparator) { 217 return getPersistence() 218 .fetchByModifiedTime_Last(modifiedTime, orderByComparator); 219 } 220 221 /** 222 * Returns the d l sync events before and after the current d l sync event in the ordered set where modifiedTime > ?. 223 * 224 * @param syncEventId the primary key of the current d l sync event 225 * @param modifiedTime the modified time 226 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 227 * @return the previous, current, and next d l sync event 228 * @throws com.liferay.portlet.documentlibrary.NoSuchSyncEventException if a d l sync event with the primary key could not be found 229 */ 230 public static com.liferay.portlet.documentlibrary.model.DLSyncEvent[] findByModifiedTime_PrevAndNext( 231 long syncEventId, long modifiedTime, 232 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLSyncEvent> orderByComparator) 233 throws com.liferay.portlet.documentlibrary.NoSuchSyncEventException { 234 return getPersistence() 235 .findByModifiedTime_PrevAndNext(syncEventId, modifiedTime, 236 orderByComparator); 237 } 238 239 /** 240 * Removes all the d l sync events where modifiedTime > ? from the database. 241 * 242 * @param modifiedTime the modified time 243 */ 244 public static void removeByModifiedTime(long modifiedTime) { 245 getPersistence().removeByModifiedTime(modifiedTime); 246 } 247 248 /** 249 * Returns the number of d l sync events where modifiedTime > ?. 250 * 251 * @param modifiedTime the modified time 252 * @return the number of matching d l sync events 253 */ 254 public static int countByModifiedTime(long modifiedTime) { 255 return getPersistence().countByModifiedTime(modifiedTime); 256 } 257 258 /** 259 * Returns the d l sync event where typePK = ? or throws a {@link com.liferay.portlet.documentlibrary.NoSuchSyncEventException} if it could not be found. 260 * 261 * @param typePK the type p k 262 * @return the matching d l sync event 263 * @throws com.liferay.portlet.documentlibrary.NoSuchSyncEventException if a matching d l sync event could not be found 264 */ 265 public static com.liferay.portlet.documentlibrary.model.DLSyncEvent findByTypePK( 266 long typePK) 267 throws com.liferay.portlet.documentlibrary.NoSuchSyncEventException { 268 return getPersistence().findByTypePK(typePK); 269 } 270 271 /** 272 * Returns the d l sync event where typePK = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 273 * 274 * @param typePK the type p k 275 * @return the matching d l sync event, or <code>null</code> if a matching d l sync event could not be found 276 */ 277 public static com.liferay.portlet.documentlibrary.model.DLSyncEvent fetchByTypePK( 278 long typePK) { 279 return getPersistence().fetchByTypePK(typePK); 280 } 281 282 /** 283 * Returns the d l sync event where typePK = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 284 * 285 * @param typePK the type p k 286 * @param retrieveFromCache whether to use the finder cache 287 * @return the matching d l sync event, or <code>null</code> if a matching d l sync event could not be found 288 */ 289 public static com.liferay.portlet.documentlibrary.model.DLSyncEvent fetchByTypePK( 290 long typePK, boolean retrieveFromCache) { 291 return getPersistence().fetchByTypePK(typePK, retrieveFromCache); 292 } 293 294 /** 295 * Removes the d l sync event where typePK = ? from the database. 296 * 297 * @param typePK the type p k 298 * @return the d l sync event that was removed 299 */ 300 public static com.liferay.portlet.documentlibrary.model.DLSyncEvent removeByTypePK( 301 long typePK) 302 throws com.liferay.portlet.documentlibrary.NoSuchSyncEventException { 303 return getPersistence().removeByTypePK(typePK); 304 } 305 306 /** 307 * Returns the number of d l sync events where typePK = ?. 308 * 309 * @param typePK the type p k 310 * @return the number of matching d l sync events 311 */ 312 public static int countByTypePK(long typePK) { 313 return getPersistence().countByTypePK(typePK); 314 } 315 316 /** 317 * Caches the d l sync event in the entity cache if it is enabled. 318 * 319 * @param dlSyncEvent the d l sync event 320 */ 321 public static void cacheResult( 322 com.liferay.portlet.documentlibrary.model.DLSyncEvent dlSyncEvent) { 323 getPersistence().cacheResult(dlSyncEvent); 324 } 325 326 /** 327 * Caches the d l sync events in the entity cache if it is enabled. 328 * 329 * @param dlSyncEvents the d l sync events 330 */ 331 public static void cacheResult( 332 java.util.List<com.liferay.portlet.documentlibrary.model.DLSyncEvent> dlSyncEvents) { 333 getPersistence().cacheResult(dlSyncEvents); 334 } 335 336 /** 337 * Creates a new d l sync event with the primary key. Does not add the d l sync event to the database. 338 * 339 * @param syncEventId the primary key for the new d l sync event 340 * @return the new d l sync event 341 */ 342 public static com.liferay.portlet.documentlibrary.model.DLSyncEvent create( 343 long syncEventId) { 344 return getPersistence().create(syncEventId); 345 } 346 347 /** 348 * Removes the d l sync event with the primary key from the database. Also notifies the appropriate model listeners. 349 * 350 * @param syncEventId the primary key of the d l sync event 351 * @return the d l sync event that was removed 352 * @throws com.liferay.portlet.documentlibrary.NoSuchSyncEventException if a d l sync event with the primary key could not be found 353 */ 354 public static com.liferay.portlet.documentlibrary.model.DLSyncEvent remove( 355 long syncEventId) 356 throws com.liferay.portlet.documentlibrary.NoSuchSyncEventException { 357 return getPersistence().remove(syncEventId); 358 } 359 360 public static com.liferay.portlet.documentlibrary.model.DLSyncEvent updateImpl( 361 com.liferay.portlet.documentlibrary.model.DLSyncEvent dlSyncEvent) { 362 return getPersistence().updateImpl(dlSyncEvent); 363 } 364 365 /** 366 * Returns the d l sync event with the primary key or throws a {@link com.liferay.portlet.documentlibrary.NoSuchSyncEventException} if it could not be found. 367 * 368 * @param syncEventId the primary key of the d l sync event 369 * @return the d l sync event 370 * @throws com.liferay.portlet.documentlibrary.NoSuchSyncEventException if a d l sync event with the primary key could not be found 371 */ 372 public static com.liferay.portlet.documentlibrary.model.DLSyncEvent findByPrimaryKey( 373 long syncEventId) 374 throws com.liferay.portlet.documentlibrary.NoSuchSyncEventException { 375 return getPersistence().findByPrimaryKey(syncEventId); 376 } 377 378 /** 379 * Returns the d l sync event with the primary key or returns <code>null</code> if it could not be found. 380 * 381 * @param syncEventId the primary key of the d l sync event 382 * @return the d l sync event, or <code>null</code> if a d l sync event with the primary key could not be found 383 */ 384 public static com.liferay.portlet.documentlibrary.model.DLSyncEvent fetchByPrimaryKey( 385 long syncEventId) { 386 return getPersistence().fetchByPrimaryKey(syncEventId); 387 } 388 389 public static java.util.Map<java.io.Serializable, com.liferay.portlet.documentlibrary.model.DLSyncEvent> fetchByPrimaryKeys( 390 java.util.Set<java.io.Serializable> primaryKeys) { 391 return getPersistence().fetchByPrimaryKeys(primaryKeys); 392 } 393 394 /** 395 * Returns all the d l sync events. 396 * 397 * @return the d l sync events 398 */ 399 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLSyncEvent> findAll() { 400 return getPersistence().findAll(); 401 } 402 403 /** 404 * Returns a range of all the d l sync events. 405 * 406 * <p> 407 * 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.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. 408 * </p> 409 * 410 * @param start the lower bound of the range of d l sync events 411 * @param end the upper bound of the range of d l sync events (not inclusive) 412 * @return the range of d l sync events 413 */ 414 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLSyncEvent> findAll( 415 int start, int end) { 416 return getPersistence().findAll(start, end); 417 } 418 419 /** 420 * Returns an ordered range of all the d l sync events. 421 * 422 * <p> 423 * 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.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. 424 * </p> 425 * 426 * @param start the lower bound of the range of d l sync events 427 * @param end the upper bound of the range of d l sync events (not inclusive) 428 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 429 * @return the ordered range of d l sync events 430 */ 431 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLSyncEvent> findAll( 432 int start, int end, 433 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLSyncEvent> orderByComparator) { 434 return getPersistence().findAll(start, end, orderByComparator); 435 } 436 437 /** 438 * Removes all the d l sync events from the database. 439 */ 440 public static void removeAll() { 441 getPersistence().removeAll(); 442 } 443 444 /** 445 * Returns the number of d l sync events. 446 * 447 * @return the number of d l sync events 448 */ 449 public static int countAll() { 450 return getPersistence().countAll(); 451 } 452 453 public static DLSyncEventPersistence getPersistence() { 454 if (_persistence == null) { 455 _persistence = (DLSyncEventPersistence)PortalBeanLocatorUtil.locate(DLSyncEventPersistence.class.getName()); 456 457 ReferenceRegistry.registerReference(DLSyncEventUtil.class, 458 "_persistence"); 459 } 460 461 return _persistence; 462 } 463 464 /** 465 * @deprecated As of 6.2.0 466 */ 467 @Deprecated 468 public void setPersistence(DLSyncEventPersistence persistence) { 469 } 470 471 private static DLSyncEventPersistence _persistence; 472 }