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