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.portal.service.persistence; 016 017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 019 import com.liferay.portal.kernel.exception.SystemException; 020 import com.liferay.portal.kernel.util.OrderByComparator; 021 import com.liferay.portal.kernel.util.ReferenceRegistry; 022 import com.liferay.portal.model.UserNotificationDelivery; 023 import com.liferay.portal.service.ServiceContext; 024 025 import java.util.List; 026 027 /** 028 * The persistence utility for the user notification delivery service. This utility wraps {@link UserNotificationDeliveryPersistenceImpl} 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. 029 * 030 * <p> 031 * Caching information and settings can be found in <code>portal.properties</code> 032 * </p> 033 * 034 * @author Brian Wing Shun Chan 035 * @see UserNotificationDeliveryPersistence 036 * @see UserNotificationDeliveryPersistenceImpl 037 * @generated 038 */ 039 public class UserNotificationDeliveryUtil { 040 /* 041 * NOTE FOR DEVELOPERS: 042 * 043 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 044 */ 045 046 /** 047 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 048 */ 049 public static void clearCache() { 050 getPersistence().clearCache(); 051 } 052 053 /** 054 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 055 */ 056 public static void clearCache( 057 UserNotificationDelivery userNotificationDelivery) { 058 getPersistence().clearCache(userNotificationDelivery); 059 } 060 061 /** 062 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 063 */ 064 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 065 throws SystemException { 066 return getPersistence().countWithDynamicQuery(dynamicQuery); 067 } 068 069 /** 070 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 071 */ 072 public static List<UserNotificationDelivery> findWithDynamicQuery( 073 DynamicQuery dynamicQuery) throws SystemException { 074 return getPersistence().findWithDynamicQuery(dynamicQuery); 075 } 076 077 /** 078 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 079 */ 080 public static List<UserNotificationDelivery> findWithDynamicQuery( 081 DynamicQuery dynamicQuery, int start, int end) 082 throws SystemException { 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<UserNotificationDelivery> findWithDynamicQuery( 090 DynamicQuery dynamicQuery, int start, int end, 091 OrderByComparator orderByComparator) throws SystemException { 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 UserNotificationDelivery update( 101 UserNotificationDelivery userNotificationDelivery) 102 throws SystemException { 103 return getPersistence().update(userNotificationDelivery); 104 } 105 106 /** 107 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 108 */ 109 public static UserNotificationDelivery update( 110 UserNotificationDelivery userNotificationDelivery, 111 ServiceContext serviceContext) throws SystemException { 112 return getPersistence().update(userNotificationDelivery, serviceContext); 113 } 114 115 /** 116 * Returns all the user notification deliveries where userId = ?. 117 * 118 * @param userId the user ID 119 * @return the matching user notification deliveries 120 * @throws SystemException if a system exception occurred 121 */ 122 public static java.util.List<com.liferay.portal.model.UserNotificationDelivery> findByUserId( 123 long userId) throws com.liferay.portal.kernel.exception.SystemException { 124 return getPersistence().findByUserId(userId); 125 } 126 127 /** 128 * Returns a range of all the user notification deliveries where userId = ?. 129 * 130 * <p> 131 * 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.portal.model.impl.UserNotificationDeliveryModelImpl}. 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. 132 * </p> 133 * 134 * @param userId the user ID 135 * @param start the lower bound of the range of user notification deliveries 136 * @param end the upper bound of the range of user notification deliveries (not inclusive) 137 * @return the range of matching user notification deliveries 138 * @throws SystemException if a system exception occurred 139 */ 140 public static java.util.List<com.liferay.portal.model.UserNotificationDelivery> findByUserId( 141 long userId, int start, int end) 142 throws com.liferay.portal.kernel.exception.SystemException { 143 return getPersistence().findByUserId(userId, start, end); 144 } 145 146 /** 147 * Returns an ordered range of all the user notification deliveries where userId = ?. 148 * 149 * <p> 150 * 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.portal.model.impl.UserNotificationDeliveryModelImpl}. 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. 151 * </p> 152 * 153 * @param userId the user ID 154 * @param start the lower bound of the range of user notification deliveries 155 * @param end the upper bound of the range of user notification deliveries (not inclusive) 156 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 157 * @return the ordered range of matching user notification deliveries 158 * @throws SystemException if a system exception occurred 159 */ 160 public static java.util.List<com.liferay.portal.model.UserNotificationDelivery> findByUserId( 161 long userId, int start, int end, 162 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 163 throws com.liferay.portal.kernel.exception.SystemException { 164 return getPersistence() 165 .findByUserId(userId, start, end, orderByComparator); 166 } 167 168 /** 169 * Returns the first user notification delivery in the ordered set where userId = ?. 170 * 171 * @param userId the user ID 172 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 173 * @return the first matching user notification delivery 174 * @throws com.liferay.portal.NoSuchUserNotificationDeliveryException if a matching user notification delivery could not be found 175 * @throws SystemException if a system exception occurred 176 */ 177 public static com.liferay.portal.model.UserNotificationDelivery findByUserId_First( 178 long userId, 179 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 180 throws com.liferay.portal.NoSuchUserNotificationDeliveryException, 181 com.liferay.portal.kernel.exception.SystemException { 182 return getPersistence().findByUserId_First(userId, orderByComparator); 183 } 184 185 /** 186 * Returns the first user notification delivery in the ordered set where userId = ?. 187 * 188 * @param userId the user ID 189 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 190 * @return the first matching user notification delivery, or <code>null</code> if a matching user notification delivery could not be found 191 * @throws SystemException if a system exception occurred 192 */ 193 public static com.liferay.portal.model.UserNotificationDelivery fetchByUserId_First( 194 long userId, 195 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 196 throws com.liferay.portal.kernel.exception.SystemException { 197 return getPersistence().fetchByUserId_First(userId, orderByComparator); 198 } 199 200 /** 201 * Returns the last user notification delivery in the ordered set where userId = ?. 202 * 203 * @param userId the user ID 204 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 205 * @return the last matching user notification delivery 206 * @throws com.liferay.portal.NoSuchUserNotificationDeliveryException if a matching user notification delivery could not be found 207 * @throws SystemException if a system exception occurred 208 */ 209 public static com.liferay.portal.model.UserNotificationDelivery findByUserId_Last( 210 long userId, 211 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 212 throws com.liferay.portal.NoSuchUserNotificationDeliveryException, 213 com.liferay.portal.kernel.exception.SystemException { 214 return getPersistence().findByUserId_Last(userId, orderByComparator); 215 } 216 217 /** 218 * Returns the last user notification delivery in the ordered set where userId = ?. 219 * 220 * @param userId the user ID 221 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 222 * @return the last matching user notification delivery, or <code>null</code> if a matching user notification delivery could not be found 223 * @throws SystemException if a system exception occurred 224 */ 225 public static com.liferay.portal.model.UserNotificationDelivery fetchByUserId_Last( 226 long userId, 227 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 228 throws com.liferay.portal.kernel.exception.SystemException { 229 return getPersistence().fetchByUserId_Last(userId, orderByComparator); 230 } 231 232 /** 233 * Returns the user notification deliveries before and after the current user notification delivery in the ordered set where userId = ?. 234 * 235 * @param userNotificationDeliveryId the primary key of the current user notification delivery 236 * @param userId the user ID 237 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 238 * @return the previous, current, and next user notification delivery 239 * @throws com.liferay.portal.NoSuchUserNotificationDeliveryException if a user notification delivery with the primary key could not be found 240 * @throws SystemException if a system exception occurred 241 */ 242 public static com.liferay.portal.model.UserNotificationDelivery[] findByUserId_PrevAndNext( 243 long userNotificationDeliveryId, long userId, 244 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 245 throws com.liferay.portal.NoSuchUserNotificationDeliveryException, 246 com.liferay.portal.kernel.exception.SystemException { 247 return getPersistence() 248 .findByUserId_PrevAndNext(userNotificationDeliveryId, 249 userId, orderByComparator); 250 } 251 252 /** 253 * Removes all the user notification deliveries where userId = ? from the database. 254 * 255 * @param userId the user ID 256 * @throws SystemException if a system exception occurred 257 */ 258 public static void removeByUserId(long userId) 259 throws com.liferay.portal.kernel.exception.SystemException { 260 getPersistence().removeByUserId(userId); 261 } 262 263 /** 264 * Returns the number of user notification deliveries where userId = ?. 265 * 266 * @param userId the user ID 267 * @return the number of matching user notification deliveries 268 * @throws SystemException if a system exception occurred 269 */ 270 public static int countByUserId(long userId) 271 throws com.liferay.portal.kernel.exception.SystemException { 272 return getPersistence().countByUserId(userId); 273 } 274 275 /** 276 * Returns the user notification delivery where userId = ? and portletId = ? and classNameId = ? and notificationType = ? and deliveryType = ? or throws a {@link com.liferay.portal.NoSuchUserNotificationDeliveryException} if it could not be found. 277 * 278 * @param userId the user ID 279 * @param portletId the portlet ID 280 * @param classNameId the class name ID 281 * @param notificationType the notification type 282 * @param deliveryType the delivery type 283 * @return the matching user notification delivery 284 * @throws com.liferay.portal.NoSuchUserNotificationDeliveryException if a matching user notification delivery could not be found 285 * @throws SystemException if a system exception occurred 286 */ 287 public static com.liferay.portal.model.UserNotificationDelivery findByU_P_C_N_D( 288 long userId, java.lang.String portletId, long classNameId, 289 int notificationType, int deliveryType) 290 throws com.liferay.portal.NoSuchUserNotificationDeliveryException, 291 com.liferay.portal.kernel.exception.SystemException { 292 return getPersistence() 293 .findByU_P_C_N_D(userId, portletId, classNameId, 294 notificationType, deliveryType); 295 } 296 297 /** 298 * Returns the user notification delivery where userId = ? and portletId = ? and classNameId = ? and notificationType = ? and deliveryType = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 299 * 300 * @param userId the user ID 301 * @param portletId the portlet ID 302 * @param classNameId the class name ID 303 * @param notificationType the notification type 304 * @param deliveryType the delivery type 305 * @return the matching user notification delivery, or <code>null</code> if a matching user notification delivery could not be found 306 * @throws SystemException if a system exception occurred 307 */ 308 public static com.liferay.portal.model.UserNotificationDelivery fetchByU_P_C_N_D( 309 long userId, java.lang.String portletId, long classNameId, 310 int notificationType, int deliveryType) 311 throws com.liferay.portal.kernel.exception.SystemException { 312 return getPersistence() 313 .fetchByU_P_C_N_D(userId, portletId, classNameId, 314 notificationType, deliveryType); 315 } 316 317 /** 318 * Returns the user notification delivery where userId = ? and portletId = ? and classNameId = ? and notificationType = ? and deliveryType = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 319 * 320 * @param userId the user ID 321 * @param portletId the portlet ID 322 * @param classNameId the class name ID 323 * @param notificationType the notification type 324 * @param deliveryType the delivery type 325 * @param retrieveFromCache whether to use the finder cache 326 * @return the matching user notification delivery, or <code>null</code> if a matching user notification delivery could not be found 327 * @throws SystemException if a system exception occurred 328 */ 329 public static com.liferay.portal.model.UserNotificationDelivery fetchByU_P_C_N_D( 330 long userId, java.lang.String portletId, long classNameId, 331 int notificationType, int deliveryType, boolean retrieveFromCache) 332 throws com.liferay.portal.kernel.exception.SystemException { 333 return getPersistence() 334 .fetchByU_P_C_N_D(userId, portletId, classNameId, 335 notificationType, deliveryType, retrieveFromCache); 336 } 337 338 /** 339 * Removes the user notification delivery where userId = ? and portletId = ? and classNameId = ? and notificationType = ? and deliveryType = ? from the database. 340 * 341 * @param userId the user ID 342 * @param portletId the portlet ID 343 * @param classNameId the class name ID 344 * @param notificationType the notification type 345 * @param deliveryType the delivery type 346 * @return the user notification delivery that was removed 347 * @throws SystemException if a system exception occurred 348 */ 349 public static com.liferay.portal.model.UserNotificationDelivery removeByU_P_C_N_D( 350 long userId, java.lang.String portletId, long classNameId, 351 int notificationType, int deliveryType) 352 throws com.liferay.portal.NoSuchUserNotificationDeliveryException, 353 com.liferay.portal.kernel.exception.SystemException { 354 return getPersistence() 355 .removeByU_P_C_N_D(userId, portletId, classNameId, 356 notificationType, deliveryType); 357 } 358 359 /** 360 * Returns the number of user notification deliveries where userId = ? and portletId = ? and classNameId = ? and notificationType = ? and deliveryType = ?. 361 * 362 * @param userId the user ID 363 * @param portletId the portlet ID 364 * @param classNameId the class name ID 365 * @param notificationType the notification type 366 * @param deliveryType the delivery type 367 * @return the number of matching user notification deliveries 368 * @throws SystemException if a system exception occurred 369 */ 370 public static int countByU_P_C_N_D(long userId, java.lang.String portletId, 371 long classNameId, int notificationType, int deliveryType) 372 throws com.liferay.portal.kernel.exception.SystemException { 373 return getPersistence() 374 .countByU_P_C_N_D(userId, portletId, classNameId, 375 notificationType, deliveryType); 376 } 377 378 /** 379 * Caches the user notification delivery in the entity cache if it is enabled. 380 * 381 * @param userNotificationDelivery the user notification delivery 382 */ 383 public static void cacheResult( 384 com.liferay.portal.model.UserNotificationDelivery userNotificationDelivery) { 385 getPersistence().cacheResult(userNotificationDelivery); 386 } 387 388 /** 389 * Caches the user notification deliveries in the entity cache if it is enabled. 390 * 391 * @param userNotificationDeliveries the user notification deliveries 392 */ 393 public static void cacheResult( 394 java.util.List<com.liferay.portal.model.UserNotificationDelivery> userNotificationDeliveries) { 395 getPersistence().cacheResult(userNotificationDeliveries); 396 } 397 398 /** 399 * Creates a new user notification delivery with the primary key. Does not add the user notification delivery to the database. 400 * 401 * @param userNotificationDeliveryId the primary key for the new user notification delivery 402 * @return the new user notification delivery 403 */ 404 public static com.liferay.portal.model.UserNotificationDelivery create( 405 long userNotificationDeliveryId) { 406 return getPersistence().create(userNotificationDeliveryId); 407 } 408 409 /** 410 * Removes the user notification delivery with the primary key from the database. Also notifies the appropriate model listeners. 411 * 412 * @param userNotificationDeliveryId the primary key of the user notification delivery 413 * @return the user notification delivery that was removed 414 * @throws com.liferay.portal.NoSuchUserNotificationDeliveryException if a user notification delivery with the primary key could not be found 415 * @throws SystemException if a system exception occurred 416 */ 417 public static com.liferay.portal.model.UserNotificationDelivery remove( 418 long userNotificationDeliveryId) 419 throws com.liferay.portal.NoSuchUserNotificationDeliveryException, 420 com.liferay.portal.kernel.exception.SystemException { 421 return getPersistence().remove(userNotificationDeliveryId); 422 } 423 424 public static com.liferay.portal.model.UserNotificationDelivery updateImpl( 425 com.liferay.portal.model.UserNotificationDelivery userNotificationDelivery) 426 throws com.liferay.portal.kernel.exception.SystemException { 427 return getPersistence().updateImpl(userNotificationDelivery); 428 } 429 430 /** 431 * Returns the user notification delivery with the primary key or throws a {@link com.liferay.portal.NoSuchUserNotificationDeliveryException} if it could not be found. 432 * 433 * @param userNotificationDeliveryId the primary key of the user notification delivery 434 * @return the user notification delivery 435 * @throws com.liferay.portal.NoSuchUserNotificationDeliveryException if a user notification delivery with the primary key could not be found 436 * @throws SystemException if a system exception occurred 437 */ 438 public static com.liferay.portal.model.UserNotificationDelivery findByPrimaryKey( 439 long userNotificationDeliveryId) 440 throws com.liferay.portal.NoSuchUserNotificationDeliveryException, 441 com.liferay.portal.kernel.exception.SystemException { 442 return getPersistence().findByPrimaryKey(userNotificationDeliveryId); 443 } 444 445 /** 446 * Returns the user notification delivery with the primary key or returns <code>null</code> if it could not be found. 447 * 448 * @param userNotificationDeliveryId the primary key of the user notification delivery 449 * @return the user notification delivery, or <code>null</code> if a user notification delivery with the primary key could not be found 450 * @throws SystemException if a system exception occurred 451 */ 452 public static com.liferay.portal.model.UserNotificationDelivery fetchByPrimaryKey( 453 long userNotificationDeliveryId) 454 throws com.liferay.portal.kernel.exception.SystemException { 455 return getPersistence().fetchByPrimaryKey(userNotificationDeliveryId); 456 } 457 458 /** 459 * Returns all the user notification deliveries. 460 * 461 * @return the user notification deliveries 462 * @throws SystemException if a system exception occurred 463 */ 464 public static java.util.List<com.liferay.portal.model.UserNotificationDelivery> findAll() 465 throws com.liferay.portal.kernel.exception.SystemException { 466 return getPersistence().findAll(); 467 } 468 469 /** 470 * Returns a range of all the user notification deliveries. 471 * 472 * <p> 473 * 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.portal.model.impl.UserNotificationDeliveryModelImpl}. 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. 474 * </p> 475 * 476 * @param start the lower bound of the range of user notification deliveries 477 * @param end the upper bound of the range of user notification deliveries (not inclusive) 478 * @return the range of user notification deliveries 479 * @throws SystemException if a system exception occurred 480 */ 481 public static java.util.List<com.liferay.portal.model.UserNotificationDelivery> findAll( 482 int start, int end) 483 throws com.liferay.portal.kernel.exception.SystemException { 484 return getPersistence().findAll(start, end); 485 } 486 487 /** 488 * Returns an ordered range of all the user notification deliveries. 489 * 490 * <p> 491 * 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.portal.model.impl.UserNotificationDeliveryModelImpl}. 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. 492 * </p> 493 * 494 * @param start the lower bound of the range of user notification deliveries 495 * @param end the upper bound of the range of user notification deliveries (not inclusive) 496 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 497 * @return the ordered range of user notification deliveries 498 * @throws SystemException if a system exception occurred 499 */ 500 public static java.util.List<com.liferay.portal.model.UserNotificationDelivery> findAll( 501 int start, int end, 502 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 503 throws com.liferay.portal.kernel.exception.SystemException { 504 return getPersistence().findAll(start, end, orderByComparator); 505 } 506 507 /** 508 * Removes all the user notification deliveries from the database. 509 * 510 * @throws SystemException if a system exception occurred 511 */ 512 public static void removeAll() 513 throws com.liferay.portal.kernel.exception.SystemException { 514 getPersistence().removeAll(); 515 } 516 517 /** 518 * Returns the number of user notification deliveries. 519 * 520 * @return the number of user notification deliveries 521 * @throws SystemException if a system exception occurred 522 */ 523 public static int countAll() 524 throws com.liferay.portal.kernel.exception.SystemException { 525 return getPersistence().countAll(); 526 } 527 528 public static UserNotificationDeliveryPersistence getPersistence() { 529 if (_persistence == null) { 530 _persistence = (UserNotificationDeliveryPersistence)PortalBeanLocatorUtil.locate(UserNotificationDeliveryPersistence.class.getName()); 531 532 ReferenceRegistry.registerReference(UserNotificationDeliveryUtil.class, 533 "_persistence"); 534 } 535 536 return _persistence; 537 } 538 539 /** 540 * @deprecated As of 6.2.0 541 */ 542 public void setPersistence(UserNotificationDeliveryPersistence persistence) { 543 } 544 545 private static UserNotificationDeliveryPersistence _persistence; 546 }