001 /** 002 * Copyright (c) 2000-2010 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 com.liferay.portal.service.persistence.BasePersistence; 018 019 import com.liferay.portlet.shopping.model.ShoppingItemPrice; 020 021 /** 022 * The persistence interface for the shopping item price service. 023 * 024 * <p> 025 * Never modify or reference this interface directly. Always use {@link ShoppingItemPriceUtil} to access the shopping item price persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 026 * </p> 027 * 028 * <p> 029 * Caching information and settings can be found in <code>portal.properties</code> 030 * </p> 031 * 032 * @author Brian Wing Shun Chan 033 * @see ShoppingItemPricePersistenceImpl 034 * @see ShoppingItemPriceUtil 035 * @generated 036 */ 037 public interface ShoppingItemPricePersistence extends BasePersistence<ShoppingItemPrice> { 038 /** 039 * Caches the shopping item price in the entity cache if it is enabled. 040 * 041 * @param shoppingItemPrice the shopping item price to cache 042 */ 043 public void cacheResult( 044 com.liferay.portlet.shopping.model.ShoppingItemPrice shoppingItemPrice); 045 046 /** 047 * Caches the shopping item prices in the entity cache if it is enabled. 048 * 049 * @param shoppingItemPrices the shopping item prices to cache 050 */ 051 public void cacheResult( 052 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> shoppingItemPrices); 053 054 /** 055 * Creates a new shopping item price with the primary key. Does not add the shopping item price to the database. 056 * 057 * @param itemPriceId the primary key for the new shopping item price 058 * @return the new shopping item price 059 */ 060 public com.liferay.portlet.shopping.model.ShoppingItemPrice create( 061 long itemPriceId); 062 063 /** 064 * Removes the shopping item price with the primary key from the database. Also notifies the appropriate model listeners. 065 * 066 * @param itemPriceId the primary key of the shopping item price to remove 067 * @return the shopping item price that was removed 068 * @throws com.liferay.portlet.shopping.NoSuchItemPriceException if a shopping item price with the primary key could not be found 069 * @throws SystemException if a system exception occurred 070 */ 071 public com.liferay.portlet.shopping.model.ShoppingItemPrice remove( 072 long itemPriceId) 073 throws com.liferay.portal.kernel.exception.SystemException, 074 com.liferay.portlet.shopping.NoSuchItemPriceException; 075 076 public com.liferay.portlet.shopping.model.ShoppingItemPrice updateImpl( 077 com.liferay.portlet.shopping.model.ShoppingItemPrice shoppingItemPrice, 078 boolean merge) 079 throws com.liferay.portal.kernel.exception.SystemException; 080 081 /** 082 * Finds the shopping item price with the primary key or throws a {@link com.liferay.portlet.shopping.NoSuchItemPriceException} if it could not be found. 083 * 084 * @param itemPriceId the primary key of the shopping item price to find 085 * @return the shopping item price 086 * @throws com.liferay.portlet.shopping.NoSuchItemPriceException if a shopping item price with the primary key could not be found 087 * @throws SystemException if a system exception occurred 088 */ 089 public com.liferay.portlet.shopping.model.ShoppingItemPrice findByPrimaryKey( 090 long itemPriceId) 091 throws com.liferay.portal.kernel.exception.SystemException, 092 com.liferay.portlet.shopping.NoSuchItemPriceException; 093 094 /** 095 * Finds the shopping item price with the primary key or returns <code>null</code> if it could not be found. 096 * 097 * @param itemPriceId the primary key of the shopping item price to find 098 * @return the shopping item price, or <code>null</code> if a shopping item price with the primary key could not be found 099 * @throws SystemException if a system exception occurred 100 */ 101 public com.liferay.portlet.shopping.model.ShoppingItemPrice fetchByPrimaryKey( 102 long itemPriceId) 103 throws com.liferay.portal.kernel.exception.SystemException; 104 105 /** 106 * Finds all the shopping item prices where itemId = ?. 107 * 108 * @param itemId the item id to search with 109 * @return the matching shopping item prices 110 * @throws SystemException if a system exception occurred 111 */ 112 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> findByItemId( 113 long itemId) throws com.liferay.portal.kernel.exception.SystemException; 114 115 /** 116 * Finds a range of all the shopping item prices where itemId = ?. 117 * 118 * <p> 119 * 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. 120 * </p> 121 * 122 * @param itemId the item id to search with 123 * @param start the lower bound of the range of shopping item prices to return 124 * @param end the upper bound of the range of shopping item prices to return (not inclusive) 125 * @return the range of matching shopping item prices 126 * @throws SystemException if a system exception occurred 127 */ 128 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> findByItemId( 129 long itemId, int start, int end) 130 throws com.liferay.portal.kernel.exception.SystemException; 131 132 /** 133 * Finds an ordered range of all the shopping item prices where itemId = ?. 134 * 135 * <p> 136 * 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. 137 * </p> 138 * 139 * @param itemId the item id to search with 140 * @param start the lower bound of the range of shopping item prices to return 141 * @param end the upper bound of the range of shopping item prices to return (not inclusive) 142 * @param orderByComparator the comparator to order the results by 143 * @return the ordered range of matching shopping item prices 144 * @throws SystemException if a system exception occurred 145 */ 146 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> findByItemId( 147 long itemId, int start, int end, 148 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 149 throws com.liferay.portal.kernel.exception.SystemException; 150 151 /** 152 * Finds the first shopping item price in the ordered set where itemId = ?. 153 * 154 * <p> 155 * 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. 156 * </p> 157 * 158 * @param itemId the item id to search with 159 * @param orderByComparator the comparator to order the set by 160 * @return the first matching shopping item price 161 * @throws com.liferay.portlet.shopping.NoSuchItemPriceException if a matching shopping item price could not be found 162 * @throws SystemException if a system exception occurred 163 */ 164 public com.liferay.portlet.shopping.model.ShoppingItemPrice findByItemId_First( 165 long itemId, 166 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 167 throws com.liferay.portal.kernel.exception.SystemException, 168 com.liferay.portlet.shopping.NoSuchItemPriceException; 169 170 /** 171 * Finds the last shopping item price in the ordered set where itemId = ?. 172 * 173 * <p> 174 * 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. 175 * </p> 176 * 177 * @param itemId the item id to search with 178 * @param orderByComparator the comparator to order the set by 179 * @return the last matching shopping item price 180 * @throws com.liferay.portlet.shopping.NoSuchItemPriceException if a matching shopping item price could not be found 181 * @throws SystemException if a system exception occurred 182 */ 183 public com.liferay.portlet.shopping.model.ShoppingItemPrice findByItemId_Last( 184 long itemId, 185 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 186 throws com.liferay.portal.kernel.exception.SystemException, 187 com.liferay.portlet.shopping.NoSuchItemPriceException; 188 189 /** 190 * Finds the shopping item prices before and after the current shopping item price in the ordered set where itemId = ?. 191 * 192 * <p> 193 * 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. 194 * </p> 195 * 196 * @param itemPriceId the primary key of the current shopping item price 197 * @param itemId the item id to search with 198 * @param orderByComparator the comparator to order the set by 199 * @return the previous, current, and next shopping item price 200 * @throws com.liferay.portlet.shopping.NoSuchItemPriceException if a shopping item price with the primary key could not be found 201 * @throws SystemException if a system exception occurred 202 */ 203 public com.liferay.portlet.shopping.model.ShoppingItemPrice[] findByItemId_PrevAndNext( 204 long itemPriceId, long itemId, 205 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 206 throws com.liferay.portal.kernel.exception.SystemException, 207 com.liferay.portlet.shopping.NoSuchItemPriceException; 208 209 /** 210 * Finds all the shopping item prices. 211 * 212 * @return the shopping item prices 213 * @throws SystemException if a system exception occurred 214 */ 215 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> findAll() 216 throws com.liferay.portal.kernel.exception.SystemException; 217 218 /** 219 * Finds a range of all the shopping item prices. 220 * 221 * <p> 222 * 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. 223 * </p> 224 * 225 * @param start the lower bound of the range of shopping item prices to return 226 * @param end the upper bound of the range of shopping item prices to return (not inclusive) 227 * @return the range of shopping item prices 228 * @throws SystemException if a system exception occurred 229 */ 230 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> findAll( 231 int start, int end) 232 throws com.liferay.portal.kernel.exception.SystemException; 233 234 /** 235 * Finds an ordered range of all the shopping item prices. 236 * 237 * <p> 238 * 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. 239 * </p> 240 * 241 * @param start the lower bound of the range of shopping item prices to return 242 * @param end the upper bound of the range of shopping item prices to return (not inclusive) 243 * @param orderByComparator the comparator to order the results by 244 * @return the ordered range of shopping item prices 245 * @throws SystemException if a system exception occurred 246 */ 247 public java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> findAll( 248 int start, int end, 249 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 250 throws com.liferay.portal.kernel.exception.SystemException; 251 252 /** 253 * Removes all the shopping item prices where itemId = ? from the database. 254 * 255 * @param itemId the item id to search with 256 * @throws SystemException if a system exception occurred 257 */ 258 public void removeByItemId(long itemId) 259 throws com.liferay.portal.kernel.exception.SystemException; 260 261 /** 262 * Removes all the shopping item prices from the database. 263 * 264 * @throws SystemException if a system exception occurred 265 */ 266 public void removeAll() 267 throws com.liferay.portal.kernel.exception.SystemException; 268 269 /** 270 * Counts all the shopping item prices where itemId = ?. 271 * 272 * @param itemId the item id to search with 273 * @return the number of matching shopping item prices 274 * @throws SystemException if a system exception occurred 275 */ 276 public int countByItemId(long itemId) 277 throws com.liferay.portal.kernel.exception.SystemException; 278 279 /** 280 * Counts all the shopping item prices. 281 * 282 * @return the number of shopping item prices 283 * @throws SystemException if a system exception occurred 284 */ 285 public int countAll() 286 throws com.liferay.portal.kernel.exception.SystemException; 287 }