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