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.model.UserNotificationDelivery; 018 019 /** 020 * The persistence interface for the user notification delivery service. 021 * 022 * <p> 023 * Caching information and settings can be found in <code>portal.properties</code> 024 * </p> 025 * 026 * @author Brian Wing Shun Chan 027 * @see UserNotificationDeliveryPersistenceImpl 028 * @see UserNotificationDeliveryUtil 029 * @generated 030 */ 031 public interface UserNotificationDeliveryPersistence extends BasePersistence<UserNotificationDelivery> { 032 /* 033 * NOTE FOR DEVELOPERS: 034 * 035 * Never modify or reference this interface directly. Always use {@link UserNotificationDeliveryUtil} to access the user notification delivery persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 036 */ 037 038 /** 039 * Returns all the user notification deliveries where userId = ?. 040 * 041 * @param userId the user ID 042 * @return the matching user notification deliveries 043 * @throws SystemException if a system exception occurred 044 */ 045 public java.util.List<com.liferay.portal.model.UserNotificationDelivery> findByUserId( 046 long userId) throws com.liferay.portal.kernel.exception.SystemException; 047 048 /** 049 * Returns a range of all the user notification deliveries where userId = ?. 050 * 051 * <p> 052 * 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. 053 * </p> 054 * 055 * @param userId the user ID 056 * @param start the lower bound of the range of user notification deliveries 057 * @param end the upper bound of the range of user notification deliveries (not inclusive) 058 * @return the range of matching user notification deliveries 059 * @throws SystemException if a system exception occurred 060 */ 061 public java.util.List<com.liferay.portal.model.UserNotificationDelivery> findByUserId( 062 long userId, int start, int end) 063 throws com.liferay.portal.kernel.exception.SystemException; 064 065 /** 066 * Returns an ordered range of all the user notification deliveries where userId = ?. 067 * 068 * <p> 069 * 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. 070 * </p> 071 * 072 * @param userId the user ID 073 * @param start the lower bound of the range of user notification deliveries 074 * @param end the upper bound of the range of user notification deliveries (not inclusive) 075 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 076 * @return the ordered range of matching user notification deliveries 077 * @throws SystemException if a system exception occurred 078 */ 079 public java.util.List<com.liferay.portal.model.UserNotificationDelivery> findByUserId( 080 long userId, int start, int end, 081 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 082 throws com.liferay.portal.kernel.exception.SystemException; 083 084 /** 085 * Returns the first user notification delivery in the ordered set where userId = ?. 086 * 087 * @param userId the user ID 088 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 089 * @return the first matching user notification delivery 090 * @throws com.liferay.portal.NoSuchUserNotificationDeliveryException if a matching user notification delivery could not be found 091 * @throws SystemException if a system exception occurred 092 */ 093 public com.liferay.portal.model.UserNotificationDelivery findByUserId_First( 094 long userId, 095 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 096 throws com.liferay.portal.NoSuchUserNotificationDeliveryException, 097 com.liferay.portal.kernel.exception.SystemException; 098 099 /** 100 * Returns the first user notification delivery in the ordered set where userId = ?. 101 * 102 * @param userId the user ID 103 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 104 * @return the first matching user notification delivery, or <code>null</code> if a matching user notification delivery could not be found 105 * @throws SystemException if a system exception occurred 106 */ 107 public com.liferay.portal.model.UserNotificationDelivery fetchByUserId_First( 108 long userId, 109 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 110 throws com.liferay.portal.kernel.exception.SystemException; 111 112 /** 113 * Returns the last user notification delivery in the ordered set where userId = ?. 114 * 115 * @param userId the user ID 116 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 117 * @return the last matching user notification delivery 118 * @throws com.liferay.portal.NoSuchUserNotificationDeliveryException if a matching user notification delivery could not be found 119 * @throws SystemException if a system exception occurred 120 */ 121 public com.liferay.portal.model.UserNotificationDelivery findByUserId_Last( 122 long userId, 123 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 124 throws com.liferay.portal.NoSuchUserNotificationDeliveryException, 125 com.liferay.portal.kernel.exception.SystemException; 126 127 /** 128 * Returns the last user notification delivery in the ordered set where userId = ?. 129 * 130 * @param userId the user ID 131 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 132 * @return the last matching user notification delivery, or <code>null</code> if a matching user notification delivery could not be found 133 * @throws SystemException if a system exception occurred 134 */ 135 public com.liferay.portal.model.UserNotificationDelivery fetchByUserId_Last( 136 long userId, 137 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 138 throws com.liferay.portal.kernel.exception.SystemException; 139 140 /** 141 * Returns the user notification deliveries before and after the current user notification delivery in the ordered set where userId = ?. 142 * 143 * @param userNotificationDeliveryId the primary key of the current user notification delivery 144 * @param userId the user ID 145 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 146 * @return the previous, current, and next user notification delivery 147 * @throws com.liferay.portal.NoSuchUserNotificationDeliveryException if a user notification delivery with the primary key could not be found 148 * @throws SystemException if a system exception occurred 149 */ 150 public com.liferay.portal.model.UserNotificationDelivery[] findByUserId_PrevAndNext( 151 long userNotificationDeliveryId, long userId, 152 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 153 throws com.liferay.portal.NoSuchUserNotificationDeliveryException, 154 com.liferay.portal.kernel.exception.SystemException; 155 156 /** 157 * Removes all the user notification deliveries where userId = ? from the database. 158 * 159 * @param userId the user ID 160 * @throws SystemException if a system exception occurred 161 */ 162 public void removeByUserId(long userId) 163 throws com.liferay.portal.kernel.exception.SystemException; 164 165 /** 166 * Returns the number of user notification deliveries where userId = ?. 167 * 168 * @param userId the user ID 169 * @return the number of matching user notification deliveries 170 * @throws SystemException if a system exception occurred 171 */ 172 public int countByUserId(long userId) 173 throws com.liferay.portal.kernel.exception.SystemException; 174 175 /** 176 * 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. 177 * 178 * @param userId the user ID 179 * @param portletId the portlet ID 180 * @param classNameId the class name ID 181 * @param notificationType the notification type 182 * @param deliveryType the delivery type 183 * @return the matching user notification delivery 184 * @throws com.liferay.portal.NoSuchUserNotificationDeliveryException if a matching user notification delivery could not be found 185 * @throws SystemException if a system exception occurred 186 */ 187 public com.liferay.portal.model.UserNotificationDelivery findByU_P_C_N_D( 188 long userId, java.lang.String portletId, long classNameId, 189 int notificationType, int deliveryType) 190 throws com.liferay.portal.NoSuchUserNotificationDeliveryException, 191 com.liferay.portal.kernel.exception.SystemException; 192 193 /** 194 * 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. 195 * 196 * @param userId the user ID 197 * @param portletId the portlet ID 198 * @param classNameId the class name ID 199 * @param notificationType the notification type 200 * @param deliveryType the delivery type 201 * @return the matching user notification delivery, or <code>null</code> if a matching user notification delivery could not be found 202 * @throws SystemException if a system exception occurred 203 */ 204 public com.liferay.portal.model.UserNotificationDelivery fetchByU_P_C_N_D( 205 long userId, java.lang.String portletId, long classNameId, 206 int notificationType, int deliveryType) 207 throws com.liferay.portal.kernel.exception.SystemException; 208 209 /** 210 * 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. 211 * 212 * @param userId the user ID 213 * @param portletId the portlet ID 214 * @param classNameId the class name ID 215 * @param notificationType the notification type 216 * @param deliveryType the delivery type 217 * @param retrieveFromCache whether to use the finder cache 218 * @return the matching user notification delivery, or <code>null</code> if a matching user notification delivery could not be found 219 * @throws SystemException if a system exception occurred 220 */ 221 public com.liferay.portal.model.UserNotificationDelivery fetchByU_P_C_N_D( 222 long userId, java.lang.String portletId, long classNameId, 223 int notificationType, int deliveryType, boolean retrieveFromCache) 224 throws com.liferay.portal.kernel.exception.SystemException; 225 226 /** 227 * Removes the user notification delivery where userId = ? and portletId = ? and classNameId = ? and notificationType = ? and deliveryType = ? from the database. 228 * 229 * @param userId the user ID 230 * @param portletId the portlet ID 231 * @param classNameId the class name ID 232 * @param notificationType the notification type 233 * @param deliveryType the delivery type 234 * @return the user notification delivery that was removed 235 * @throws SystemException if a system exception occurred 236 */ 237 public com.liferay.portal.model.UserNotificationDelivery removeByU_P_C_N_D( 238 long userId, java.lang.String portletId, long classNameId, 239 int notificationType, int deliveryType) 240 throws com.liferay.portal.NoSuchUserNotificationDeliveryException, 241 com.liferay.portal.kernel.exception.SystemException; 242 243 /** 244 * Returns the number of user notification deliveries where userId = ? and portletId = ? and classNameId = ? and notificationType = ? and deliveryType = ?. 245 * 246 * @param userId the user ID 247 * @param portletId the portlet ID 248 * @param classNameId the class name ID 249 * @param notificationType the notification type 250 * @param deliveryType the delivery type 251 * @return the number of matching user notification deliveries 252 * @throws SystemException if a system exception occurred 253 */ 254 public int countByU_P_C_N_D(long userId, java.lang.String portletId, 255 long classNameId, int notificationType, int deliveryType) 256 throws com.liferay.portal.kernel.exception.SystemException; 257 258 /** 259 * Caches the user notification delivery in the entity cache if it is enabled. 260 * 261 * @param userNotificationDelivery the user notification delivery 262 */ 263 public void cacheResult( 264 com.liferay.portal.model.UserNotificationDelivery userNotificationDelivery); 265 266 /** 267 * Caches the user notification deliveries in the entity cache if it is enabled. 268 * 269 * @param userNotificationDeliveries the user notification deliveries 270 */ 271 public void cacheResult( 272 java.util.List<com.liferay.portal.model.UserNotificationDelivery> userNotificationDeliveries); 273 274 /** 275 * Creates a new user notification delivery with the primary key. Does not add the user notification delivery to the database. 276 * 277 * @param userNotificationDeliveryId the primary key for the new user notification delivery 278 * @return the new user notification delivery 279 */ 280 public com.liferay.portal.model.UserNotificationDelivery create( 281 long userNotificationDeliveryId); 282 283 /** 284 * Removes the user notification delivery with the primary key from the database. Also notifies the appropriate model listeners. 285 * 286 * @param userNotificationDeliveryId the primary key of the user notification delivery 287 * @return the user notification delivery that was removed 288 * @throws com.liferay.portal.NoSuchUserNotificationDeliveryException if a user notification delivery with the primary key could not be found 289 * @throws SystemException if a system exception occurred 290 */ 291 public com.liferay.portal.model.UserNotificationDelivery remove( 292 long userNotificationDeliveryId) 293 throws com.liferay.portal.NoSuchUserNotificationDeliveryException, 294 com.liferay.portal.kernel.exception.SystemException; 295 296 public com.liferay.portal.model.UserNotificationDelivery updateImpl( 297 com.liferay.portal.model.UserNotificationDelivery userNotificationDelivery) 298 throws com.liferay.portal.kernel.exception.SystemException; 299 300 /** 301 * Returns the user notification delivery with the primary key or throws a {@link com.liferay.portal.NoSuchUserNotificationDeliveryException} if it could not be found. 302 * 303 * @param userNotificationDeliveryId the primary key of the user notification delivery 304 * @return the user notification delivery 305 * @throws com.liferay.portal.NoSuchUserNotificationDeliveryException if a user notification delivery with the primary key could not be found 306 * @throws SystemException if a system exception occurred 307 */ 308 public com.liferay.portal.model.UserNotificationDelivery findByPrimaryKey( 309 long userNotificationDeliveryId) 310 throws com.liferay.portal.NoSuchUserNotificationDeliveryException, 311 com.liferay.portal.kernel.exception.SystemException; 312 313 /** 314 * Returns the user notification delivery with the primary key or returns <code>null</code> if it could not be found. 315 * 316 * @param userNotificationDeliveryId the primary key of the user notification delivery 317 * @return the user notification delivery, or <code>null</code> if a user notification delivery with the primary key could not be found 318 * @throws SystemException if a system exception occurred 319 */ 320 public com.liferay.portal.model.UserNotificationDelivery fetchByPrimaryKey( 321 long userNotificationDeliveryId) 322 throws com.liferay.portal.kernel.exception.SystemException; 323 324 /** 325 * Returns all the user notification deliveries. 326 * 327 * @return the user notification deliveries 328 * @throws SystemException if a system exception occurred 329 */ 330 public java.util.List<com.liferay.portal.model.UserNotificationDelivery> findAll() 331 throws com.liferay.portal.kernel.exception.SystemException; 332 333 /** 334 * Returns a range of all the user notification deliveries. 335 * 336 * <p> 337 * 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. 338 * </p> 339 * 340 * @param start the lower bound of the range of user notification deliveries 341 * @param end the upper bound of the range of user notification deliveries (not inclusive) 342 * @return the range of user notification deliveries 343 * @throws SystemException if a system exception occurred 344 */ 345 public java.util.List<com.liferay.portal.model.UserNotificationDelivery> findAll( 346 int start, int end) 347 throws com.liferay.portal.kernel.exception.SystemException; 348 349 /** 350 * Returns an ordered range of all the user notification deliveries. 351 * 352 * <p> 353 * 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. 354 * </p> 355 * 356 * @param start the lower bound of the range of user notification deliveries 357 * @param end the upper bound of the range of user notification deliveries (not inclusive) 358 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 359 * @return the ordered range of user notification deliveries 360 * @throws SystemException if a system exception occurred 361 */ 362 public java.util.List<com.liferay.portal.model.UserNotificationDelivery> findAll( 363 int start, int end, 364 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 365 throws com.liferay.portal.kernel.exception.SystemException; 366 367 /** 368 * Removes all the user notification deliveries from the database. 369 * 370 * @throws SystemException if a system exception occurred 371 */ 372 public void removeAll() 373 throws com.liferay.portal.kernel.exception.SystemException; 374 375 /** 376 * Returns the number of user notification deliveries. 377 * 378 * @return the number of user notification deliveries 379 * @throws SystemException if a system exception occurred 380 */ 381 public int countAll() 382 throws com.liferay.portal.kernel.exception.SystemException; 383 }