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