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