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