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