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