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