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