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