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