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