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.portlet.announcements.service.persistence; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.service.persistence.BasePersistence; 020 021 import com.liferay.portlet.announcements.model.AnnouncementsDelivery; 022 023 /** 024 * The persistence interface for the announcements delivery service. 025 * 026 * <p> 027 * Caching information and settings can be found in <code>portal.properties</code> 028 * </p> 029 * 030 * @author Brian Wing Shun Chan 031 * @see AnnouncementsDeliveryPersistenceImpl 032 * @see AnnouncementsDeliveryUtil 033 * @generated 034 */ 035 @ProviderType 036 public interface AnnouncementsDeliveryPersistence extends BasePersistence<AnnouncementsDelivery> { 037 /* 038 * NOTE FOR DEVELOPERS: 039 * 040 * 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. 041 */ 042 043 /** 044 * Returns all the announcements deliveries where userId = ?. 045 * 046 * @param userId the user ID 047 * @return the matching announcements deliveries 048 */ 049 public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> findByUserId( 050 long userId); 051 052 /** 053 * Returns a range of all the announcements deliveries where userId = ?. 054 * 055 * <p> 056 * 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. 057 * </p> 058 * 059 * @param userId the user ID 060 * @param start the lower bound of the range of announcements deliveries 061 * @param end the upper bound of the range of announcements deliveries (not inclusive) 062 * @return the range of matching announcements deliveries 063 */ 064 public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> findByUserId( 065 long userId, int start, int end); 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 */ 080 public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> findByUserId( 081 long userId, int start, int end, 082 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.announcements.model.AnnouncementsDelivery> orderByComparator); 083 084 /** 085 * Returns the first announcements delivery in the ordered set where userId = ?. 086 * 087 * @param userId the user ID 088 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 089 * @return the first matching announcements delivery 090 * @throws com.liferay.portlet.announcements.NoSuchDeliveryException if a matching announcements delivery could not be found 091 */ 092 public com.liferay.portlet.announcements.model.AnnouncementsDelivery findByUserId_First( 093 long userId, 094 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.announcements.model.AnnouncementsDelivery> orderByComparator) 095 throws com.liferay.portlet.announcements.NoSuchDeliveryException; 096 097 /** 098 * Returns the first announcements delivery in the ordered set where userId = ?. 099 * 100 * @param userId the user ID 101 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 102 * @return the first matching announcements delivery, or <code>null</code> if a matching announcements delivery could not be found 103 */ 104 public com.liferay.portlet.announcements.model.AnnouncementsDelivery fetchByUserId_First( 105 long userId, 106 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.announcements.model.AnnouncementsDelivery> orderByComparator); 107 108 /** 109 * Returns the last announcements delivery in the ordered set where userId = ?. 110 * 111 * @param userId the user ID 112 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 113 * @return the last matching announcements delivery 114 * @throws com.liferay.portlet.announcements.NoSuchDeliveryException if a matching announcements delivery could not be found 115 */ 116 public com.liferay.portlet.announcements.model.AnnouncementsDelivery findByUserId_Last( 117 long userId, 118 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.announcements.model.AnnouncementsDelivery> orderByComparator) 119 throws com.liferay.portlet.announcements.NoSuchDeliveryException; 120 121 /** 122 * Returns the last announcements delivery in the ordered set where userId = ?. 123 * 124 * @param userId the user ID 125 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 126 * @return the last matching announcements delivery, or <code>null</code> if a matching announcements delivery could not be found 127 */ 128 public com.liferay.portlet.announcements.model.AnnouncementsDelivery fetchByUserId_Last( 129 long userId, 130 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.announcements.model.AnnouncementsDelivery> orderByComparator); 131 132 /** 133 * Returns the announcements deliveries before and after the current announcements delivery in the ordered set where userId = ?. 134 * 135 * @param deliveryId the primary key of the current announcements delivery 136 * @param userId the user ID 137 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 138 * @return the previous, current, and next announcements delivery 139 * @throws com.liferay.portlet.announcements.NoSuchDeliveryException if a announcements delivery with the primary key could not be found 140 */ 141 public com.liferay.portlet.announcements.model.AnnouncementsDelivery[] findByUserId_PrevAndNext( 142 long deliveryId, long userId, 143 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.announcements.model.AnnouncementsDelivery> orderByComparator) 144 throws com.liferay.portlet.announcements.NoSuchDeliveryException; 145 146 /** 147 * Removes all the announcements deliveries where userId = ? from the database. 148 * 149 * @param userId the user ID 150 */ 151 public void removeByUserId(long userId); 152 153 /** 154 * Returns the number of announcements deliveries where userId = ?. 155 * 156 * @param userId the user ID 157 * @return the number of matching announcements deliveries 158 */ 159 public int countByUserId(long userId); 160 161 /** 162 * Returns the announcements delivery where userId = ? and type = ? or throws a {@link com.liferay.portlet.announcements.NoSuchDeliveryException} if it could not be found. 163 * 164 * @param userId the user ID 165 * @param type the type 166 * @return the matching announcements delivery 167 * @throws com.liferay.portlet.announcements.NoSuchDeliveryException if a matching announcements delivery could not be found 168 */ 169 public com.liferay.portlet.announcements.model.AnnouncementsDelivery findByU_T( 170 long userId, java.lang.String type) 171 throws com.liferay.portlet.announcements.NoSuchDeliveryException; 172 173 /** 174 * Returns the announcements delivery where userId = ? and type = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 175 * 176 * @param userId the user ID 177 * @param type the type 178 * @return the matching announcements delivery, or <code>null</code> if a matching announcements delivery could not be found 179 */ 180 public com.liferay.portlet.announcements.model.AnnouncementsDelivery fetchByU_T( 181 long userId, java.lang.String type); 182 183 /** 184 * Returns the announcements delivery where userId = ? and type = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 185 * 186 * @param userId the user ID 187 * @param type the type 188 * @param retrieveFromCache whether to use the finder cache 189 * @return the matching announcements delivery, or <code>null</code> if a matching announcements delivery could not be found 190 */ 191 public com.liferay.portlet.announcements.model.AnnouncementsDelivery fetchByU_T( 192 long userId, java.lang.String type, boolean retrieveFromCache); 193 194 /** 195 * Removes the announcements delivery where userId = ? and type = ? from the database. 196 * 197 * @param userId the user ID 198 * @param type the type 199 * @return the announcements delivery that was removed 200 */ 201 public com.liferay.portlet.announcements.model.AnnouncementsDelivery removeByU_T( 202 long userId, java.lang.String type) 203 throws com.liferay.portlet.announcements.NoSuchDeliveryException; 204 205 /** 206 * Returns the number of announcements deliveries where userId = ? and type = ?. 207 * 208 * @param userId the user ID 209 * @param type the type 210 * @return the number of matching announcements deliveries 211 */ 212 public int countByU_T(long userId, java.lang.String type); 213 214 /** 215 * Caches the announcements delivery in the entity cache if it is enabled. 216 * 217 * @param announcementsDelivery the announcements delivery 218 */ 219 public void cacheResult( 220 com.liferay.portlet.announcements.model.AnnouncementsDelivery announcementsDelivery); 221 222 /** 223 * Caches the announcements deliveries in the entity cache if it is enabled. 224 * 225 * @param announcementsDeliveries the announcements deliveries 226 */ 227 public void cacheResult( 228 java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> announcementsDeliveries); 229 230 /** 231 * Creates a new announcements delivery with the primary key. Does not add the announcements delivery to the database. 232 * 233 * @param deliveryId the primary key for the new announcements delivery 234 * @return the new announcements delivery 235 */ 236 public com.liferay.portlet.announcements.model.AnnouncementsDelivery create( 237 long deliveryId); 238 239 /** 240 * Removes the announcements delivery with the primary key from the database. Also notifies the appropriate model listeners. 241 * 242 * @param deliveryId the primary key of the announcements delivery 243 * @return the announcements delivery that was removed 244 * @throws com.liferay.portlet.announcements.NoSuchDeliveryException if a announcements delivery with the primary key could not be found 245 */ 246 public com.liferay.portlet.announcements.model.AnnouncementsDelivery remove( 247 long deliveryId) 248 throws com.liferay.portlet.announcements.NoSuchDeliveryException; 249 250 public com.liferay.portlet.announcements.model.AnnouncementsDelivery updateImpl( 251 com.liferay.portlet.announcements.model.AnnouncementsDelivery announcementsDelivery); 252 253 /** 254 * Returns the announcements delivery with the primary key or throws a {@link com.liferay.portlet.announcements.NoSuchDeliveryException} if it could not be found. 255 * 256 * @param deliveryId the primary key of the announcements delivery 257 * @return the announcements delivery 258 * @throws com.liferay.portlet.announcements.NoSuchDeliveryException if a announcements delivery with the primary key could not be found 259 */ 260 public com.liferay.portlet.announcements.model.AnnouncementsDelivery findByPrimaryKey( 261 long deliveryId) 262 throws com.liferay.portlet.announcements.NoSuchDeliveryException; 263 264 /** 265 * Returns the announcements delivery with the primary key or returns <code>null</code> if it could not be found. 266 * 267 * @param deliveryId the primary key of the announcements delivery 268 * @return the announcements delivery, or <code>null</code> if a announcements delivery with the primary key could not be found 269 */ 270 public com.liferay.portlet.announcements.model.AnnouncementsDelivery fetchByPrimaryKey( 271 long deliveryId); 272 273 @Override 274 public java.util.Map<java.io.Serializable, com.liferay.portlet.announcements.model.AnnouncementsDelivery> fetchByPrimaryKeys( 275 java.util.Set<java.io.Serializable> primaryKeys); 276 277 /** 278 * Returns all the announcements deliveries. 279 * 280 * @return the announcements deliveries 281 */ 282 public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> findAll(); 283 284 /** 285 * Returns a range of all the announcements deliveries. 286 * 287 * <p> 288 * 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. 289 * </p> 290 * 291 * @param start the lower bound of the range of announcements deliveries 292 * @param end the upper bound of the range of announcements deliveries (not inclusive) 293 * @return the range of announcements deliveries 294 */ 295 public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> findAll( 296 int start, int end); 297 298 /** 299 * Returns an ordered range of all the announcements deliveries. 300 * 301 * <p> 302 * 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. 303 * </p> 304 * 305 * @param start the lower bound of the range of announcements deliveries 306 * @param end the upper bound of the range of announcements deliveries (not inclusive) 307 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 308 * @return the ordered range of announcements deliveries 309 */ 310 public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> findAll( 311 int start, int end, 312 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.announcements.model.AnnouncementsDelivery> orderByComparator); 313 314 /** 315 * Removes all the announcements deliveries from the database. 316 */ 317 public void removeAll(); 318 319 /** 320 * Returns the number of announcements deliveries. 321 * 322 * @return the number of announcements deliveries 323 */ 324 public int countAll(); 325 }