001 /** 002 * Copyright (c) 2000-2013 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 * @param userId the user ID 157 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 158 * @return the first matching announcements delivery 159 * @throws com.liferay.portlet.announcements.NoSuchDeliveryException if a matching announcements delivery could not be found 160 * @throws SystemException if a system exception occurred 161 */ 162 public com.liferay.portlet.announcements.model.AnnouncementsDelivery findByUserId_First( 163 long userId, 164 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 165 throws com.liferay.portal.kernel.exception.SystemException, 166 com.liferay.portlet.announcements.NoSuchDeliveryException; 167 168 /** 169 * Returns the first announcements delivery in the ordered set where userId = ?. 170 * 171 * @param userId the user ID 172 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 173 * @return the first matching announcements delivery, or <code>null</code> if a matching announcements delivery could not be found 174 * @throws SystemException if a system exception occurred 175 */ 176 public com.liferay.portlet.announcements.model.AnnouncementsDelivery fetchByUserId_First( 177 long userId, 178 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 179 throws com.liferay.portal.kernel.exception.SystemException; 180 181 /** 182 * Returns the last announcements delivery in the ordered set where userId = ?. 183 * 184 * @param userId the user ID 185 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 186 * @return the last matching announcements delivery 187 * @throws com.liferay.portlet.announcements.NoSuchDeliveryException if a matching announcements delivery could not be found 188 * @throws SystemException if a system exception occurred 189 */ 190 public com.liferay.portlet.announcements.model.AnnouncementsDelivery findByUserId_Last( 191 long userId, 192 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 193 throws com.liferay.portal.kernel.exception.SystemException, 194 com.liferay.portlet.announcements.NoSuchDeliveryException; 195 196 /** 197 * Returns the last announcements delivery in the ordered set where userId = ?. 198 * 199 * @param userId the user ID 200 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 201 * @return the last matching announcements delivery, or <code>null</code> if a matching announcements delivery could not be found 202 * @throws SystemException if a system exception occurred 203 */ 204 public com.liferay.portlet.announcements.model.AnnouncementsDelivery fetchByUserId_Last( 205 long userId, 206 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 207 throws com.liferay.portal.kernel.exception.SystemException; 208 209 /** 210 * Returns the announcements deliveries before and after the current announcements delivery in the ordered set where userId = ?. 211 * 212 * @param deliveryId the primary key of the current announcements delivery 213 * @param userId the user ID 214 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 215 * @return the previous, current, and next announcements delivery 216 * @throws com.liferay.portlet.announcements.NoSuchDeliveryException if a announcements delivery with the primary key could not be found 217 * @throws SystemException if a system exception occurred 218 */ 219 public com.liferay.portlet.announcements.model.AnnouncementsDelivery[] findByUserId_PrevAndNext( 220 long deliveryId, long userId, 221 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 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 throws a {@link com.liferay.portlet.announcements.NoSuchDeliveryException} if it could not be found. 227 * 228 * @param userId the user ID 229 * @param type the type 230 * @return the matching announcements delivery 231 * @throws com.liferay.portlet.announcements.NoSuchDeliveryException if a matching announcements delivery could not be found 232 * @throws SystemException if a system exception occurred 233 */ 234 public com.liferay.portlet.announcements.model.AnnouncementsDelivery findByU_T( 235 long userId, java.lang.String type) 236 throws com.liferay.portal.kernel.exception.SystemException, 237 com.liferay.portlet.announcements.NoSuchDeliveryException; 238 239 /** 240 * Returns the announcements delivery where userId = ? and type = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 241 * 242 * @param userId the user ID 243 * @param type the type 244 * @return the matching announcements delivery, or <code>null</code> if a matching announcements delivery could not be found 245 * @throws SystemException if a system exception occurred 246 */ 247 public com.liferay.portlet.announcements.model.AnnouncementsDelivery fetchByU_T( 248 long userId, java.lang.String type) 249 throws com.liferay.portal.kernel.exception.SystemException; 250 251 /** 252 * Returns the announcements delivery where userId = ? and type = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 253 * 254 * @param userId the user ID 255 * @param type the type 256 * @param retrieveFromCache whether to use the finder cache 257 * @return the matching announcements delivery, or <code>null</code> if a matching announcements delivery could not be found 258 * @throws SystemException if a system exception occurred 259 */ 260 public com.liferay.portlet.announcements.model.AnnouncementsDelivery fetchByU_T( 261 long userId, java.lang.String type, boolean retrieveFromCache) 262 throws com.liferay.portal.kernel.exception.SystemException; 263 264 /** 265 * Returns all the announcements deliveries. 266 * 267 * @return the announcements deliveries 268 * @throws SystemException if a system exception occurred 269 */ 270 public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> findAll() 271 throws com.liferay.portal.kernel.exception.SystemException; 272 273 /** 274 * Returns a range of all the announcements deliveries. 275 * 276 * <p> 277 * 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. 278 * </p> 279 * 280 * @param start the lower bound of the range of announcements deliveries 281 * @param end the upper bound of the range of announcements deliveries (not inclusive) 282 * @return the range of announcements deliveries 283 * @throws SystemException if a system exception occurred 284 */ 285 public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> findAll( 286 int start, int end) 287 throws com.liferay.portal.kernel.exception.SystemException; 288 289 /** 290 * Returns an ordered range of all the announcements deliveries. 291 * 292 * <p> 293 * 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. 294 * </p> 295 * 296 * @param start the lower bound of the range of announcements deliveries 297 * @param end the upper bound of the range of announcements deliveries (not inclusive) 298 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 299 * @return the ordered range of announcements deliveries 300 * @throws SystemException if a system exception occurred 301 */ 302 public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> findAll( 303 int start, int end, 304 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 305 throws com.liferay.portal.kernel.exception.SystemException; 306 307 /** 308 * Removes all the announcements deliveries where userId = ? from the database. 309 * 310 * @param userId the user ID 311 * @throws SystemException if a system exception occurred 312 */ 313 public void removeByUserId(long userId) 314 throws com.liferay.portal.kernel.exception.SystemException; 315 316 /** 317 * Removes the announcements delivery where userId = ? and type = ? from the database. 318 * 319 * @param userId the user ID 320 * @param type the type 321 * @return the announcements delivery that was removed 322 * @throws SystemException if a system exception occurred 323 */ 324 public com.liferay.portlet.announcements.model.AnnouncementsDelivery removeByU_T( 325 long userId, java.lang.String type) 326 throws com.liferay.portal.kernel.exception.SystemException, 327 com.liferay.portlet.announcements.NoSuchDeliveryException; 328 329 /** 330 * Removes all the announcements deliveries from the database. 331 * 332 * @throws SystemException if a system exception occurred 333 */ 334 public void removeAll() 335 throws com.liferay.portal.kernel.exception.SystemException; 336 337 /** 338 * Returns the number of announcements deliveries where userId = ?. 339 * 340 * @param userId the user ID 341 * @return the number of matching announcements deliveries 342 * @throws SystemException if a system exception occurred 343 */ 344 public int countByUserId(long userId) 345 throws com.liferay.portal.kernel.exception.SystemException; 346 347 /** 348 * Returns the number of announcements deliveries where userId = ? and type = ?. 349 * 350 * @param userId the user ID 351 * @param type the type 352 * @return the number of matching announcements deliveries 353 * @throws SystemException if a system exception occurred 354 */ 355 public int countByU_T(long userId, java.lang.String type) 356 throws com.liferay.portal.kernel.exception.SystemException; 357 358 /** 359 * Returns the number of announcements deliveries. 360 * 361 * @return the number of announcements deliveries 362 * @throws SystemException if a system exception occurred 363 */ 364 public int countAll() 365 throws com.liferay.portal.kernel.exception.SystemException; 366 }