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