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