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