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