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            * 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                    boolean merge)
081                    throws com.liferay.portal.kernel.exception.SystemException;
082    
083            /**
084            * Returns the shopping order item with the primary key or throws a {@link com.liferay.portlet.shopping.NoSuchOrderItemException} if it could not be found.
085            *
086            * @param orderItemId the primary key of the shopping order item
087            * @return the shopping order item
088            * @throws com.liferay.portlet.shopping.NoSuchOrderItemException if a shopping order item with the primary key could not be found
089            * @throws SystemException if a system exception occurred
090            */
091            public com.liferay.portlet.shopping.model.ShoppingOrderItem findByPrimaryKey(
092                    long orderItemId)
093                    throws com.liferay.portal.kernel.exception.SystemException,
094                            com.liferay.portlet.shopping.NoSuchOrderItemException;
095    
096            /**
097            * Returns the shopping order item with the primary key or returns <code>null</code> if it could not be found.
098            *
099            * @param orderItemId the primary key of the shopping order item
100            * @return the shopping order item, or <code>null</code> if a shopping order item with the primary key could not be found
101            * @throws SystemException if a system exception occurred
102            */
103            public com.liferay.portlet.shopping.model.ShoppingOrderItem fetchByPrimaryKey(
104                    long orderItemId)
105                    throws com.liferay.portal.kernel.exception.SystemException;
106    
107            /**
108            * Returns all the shopping order items where orderId = &#63;.
109            *
110            * @param orderId the order ID
111            * @return the matching shopping order items
112            * @throws SystemException if a system exception occurred
113            */
114            public java.util.List<com.liferay.portlet.shopping.model.ShoppingOrderItem> findByOrderId(
115                    long orderId)
116                    throws com.liferay.portal.kernel.exception.SystemException;
117    
118            /**
119            * Returns a range of all the shopping order items where orderId = &#63;.
120            *
121            * <p>
122            * 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.
123            * </p>
124            *
125            * @param orderId the order ID
126            * @param start the lower bound of the range of shopping order items
127            * @param end the upper bound of the range of shopping order items (not inclusive)
128            * @return the range of matching shopping order items
129            * @throws SystemException if a system exception occurred
130            */
131            public java.util.List<com.liferay.portlet.shopping.model.ShoppingOrderItem> findByOrderId(
132                    long orderId, int start, int end)
133                    throws com.liferay.portal.kernel.exception.SystemException;
134    
135            /**
136            * Returns an ordered range of all the shopping order items where orderId = &#63;.
137            *
138            * <p>
139            * 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.
140            * </p>
141            *
142            * @param orderId the order ID
143            * @param start the lower bound of the range of shopping order items
144            * @param end the upper bound of the range of shopping order items (not inclusive)
145            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
146            * @return the ordered range of matching shopping order items
147            * @throws SystemException if a system exception occurred
148            */
149            public java.util.List<com.liferay.portlet.shopping.model.ShoppingOrderItem> findByOrderId(
150                    long orderId, int start, int end,
151                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
152                    throws com.liferay.portal.kernel.exception.SystemException;
153    
154            /**
155            * Returns the first shopping order item in the ordered set where orderId = &#63;.
156            *
157            * @param orderId the order ID
158            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
159            * @return the first matching shopping order item
160            * @throws com.liferay.portlet.shopping.NoSuchOrderItemException if a matching shopping order item could not be found
161            * @throws SystemException if a system exception occurred
162            */
163            public com.liferay.portlet.shopping.model.ShoppingOrderItem findByOrderId_First(
164                    long orderId,
165                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
166                    throws com.liferay.portal.kernel.exception.SystemException,
167                            com.liferay.portlet.shopping.NoSuchOrderItemException;
168    
169            /**
170            * Returns the first shopping order item in the ordered set where orderId = &#63;.
171            *
172            * @param orderId the order ID
173            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
174            * @return the first matching shopping order item, or <code>null</code> if a matching shopping order item could not be found
175            * @throws SystemException if a system exception occurred
176            */
177            public com.liferay.portlet.shopping.model.ShoppingOrderItem fetchByOrderId_First(
178                    long orderId,
179                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
180                    throws com.liferay.portal.kernel.exception.SystemException;
181    
182            /**
183            * Returns the last shopping order item in the ordered set where orderId = &#63;.
184            *
185            * @param orderId the order ID
186            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
187            * @return the last matching shopping order item
188            * @throws com.liferay.portlet.shopping.NoSuchOrderItemException if a matching shopping order item could not be found
189            * @throws SystemException if a system exception occurred
190            */
191            public com.liferay.portlet.shopping.model.ShoppingOrderItem findByOrderId_Last(
192                    long orderId,
193                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
194                    throws com.liferay.portal.kernel.exception.SystemException,
195                            com.liferay.portlet.shopping.NoSuchOrderItemException;
196    
197            /**
198            * Returns the last shopping order item in the ordered set where orderId = &#63;.
199            *
200            * @param orderId the order ID
201            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
202            * @return the last matching shopping order item, or <code>null</code> if a matching shopping order item could not be found
203            * @throws SystemException if a system exception occurred
204            */
205            public com.liferay.portlet.shopping.model.ShoppingOrderItem fetchByOrderId_Last(
206                    long orderId,
207                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
208                    throws com.liferay.portal.kernel.exception.SystemException;
209    
210            /**
211            * Returns the shopping order items before and after the current shopping order item in the ordered set where orderId = &#63;.
212            *
213            * @param orderItemId the primary key of the current shopping order item
214            * @param orderId the order ID
215            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
216            * @return the previous, current, and next shopping order item
217            * @throws com.liferay.portlet.shopping.NoSuchOrderItemException if a shopping order item with the primary key could not be found
218            * @throws SystemException if a system exception occurred
219            */
220            public com.liferay.portlet.shopping.model.ShoppingOrderItem[] findByOrderId_PrevAndNext(
221                    long orderItemId, long orderId,
222                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
223                    throws com.liferay.portal.kernel.exception.SystemException,
224                            com.liferay.portlet.shopping.NoSuchOrderItemException;
225    
226            /**
227            * Returns all the shopping order items.
228            *
229            * @return the shopping order items
230            * @throws SystemException if a system exception occurred
231            */
232            public java.util.List<com.liferay.portlet.shopping.model.ShoppingOrderItem> findAll()
233                    throws com.liferay.portal.kernel.exception.SystemException;
234    
235            /**
236            * Returns a range of all the shopping order items.
237            *
238            * <p>
239            * 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.
240            * </p>
241            *
242            * @param start the lower bound of the range of shopping order items
243            * @param end the upper bound of the range of shopping order items (not inclusive)
244            * @return the range of shopping order items
245            * @throws SystemException if a system exception occurred
246            */
247            public java.util.List<com.liferay.portlet.shopping.model.ShoppingOrderItem> findAll(
248                    int start, int end)
249                    throws com.liferay.portal.kernel.exception.SystemException;
250    
251            /**
252            * Returns an ordered range of all the shopping order items.
253            *
254            * <p>
255            * 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.
256            * </p>
257            *
258            * @param start the lower bound of the range of shopping order items
259            * @param end the upper bound of the range of shopping order items (not inclusive)
260            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
261            * @return the ordered range of shopping order items
262            * @throws SystemException if a system exception occurred
263            */
264            public java.util.List<com.liferay.portlet.shopping.model.ShoppingOrderItem> findAll(
265                    int start, int end,
266                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
267                    throws com.liferay.portal.kernel.exception.SystemException;
268    
269            /**
270            * Removes all the shopping order items where orderId = &#63; from the database.
271            *
272            * @param orderId the order ID
273            * @throws SystemException if a system exception occurred
274            */
275            public void removeByOrderId(long orderId)
276                    throws com.liferay.portal.kernel.exception.SystemException;
277    
278            /**
279            * Removes all the shopping order items from the database.
280            *
281            * @throws SystemException if a system exception occurred
282            */
283            public void removeAll()
284                    throws com.liferay.portal.kernel.exception.SystemException;
285    
286            /**
287            * Returns the number of shopping order items where orderId = &#63;.
288            *
289            * @param orderId the order ID
290            * @return the number of matching shopping order items
291            * @throws SystemException if a system exception occurred
292            */
293            public int countByOrderId(long orderId)
294                    throws com.liferay.portal.kernel.exception.SystemException;
295    
296            /**
297            * Returns the number of shopping order items.
298            *
299            * @return the number of shopping order items
300            * @throws SystemException if a system exception occurred
301            */
302            public int countAll()
303                    throws com.liferay.portal.kernel.exception.SystemException;
304    }