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.ShoppingItemPrice;
022    
023    /**
024     * The persistence interface for the shopping item price 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.ShoppingItemPricePersistenceImpl
032     * @see ShoppingItemPriceUtil
033     * @generated
034     */
035    @ProviderType
036    public interface ShoppingItemPricePersistence extends BasePersistence<ShoppingItemPrice> {
037            /*
038             * NOTE FOR DEVELOPERS:
039             *
040             * Never modify or reference this interface directly. Always use {@link ShoppingItemPriceUtil} to access the shopping item price persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
041             */
042    
043            /**
044            * Returns all the shopping item prices where itemId = &#63;.
045            *
046            * @param itemId the item ID
047            * @return the matching shopping item prices
048            */
049            public java.util.List<ShoppingItemPrice> findByItemId(long itemId);
050    
051            /**
052            * Returns a range of all the shopping item prices where itemId = &#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 ShoppingItemPriceModelImpl}. 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 itemId the item ID
059            * @param start the lower bound of the range of shopping item prices
060            * @param end the upper bound of the range of shopping item prices (not inclusive)
061            * @return the range of matching shopping item prices
062            */
063            public java.util.List<ShoppingItemPrice> findByItemId(long itemId,
064                    int start, int end);
065    
066            /**
067            * Returns an ordered range of all the shopping item prices where itemId = &#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 ShoppingItemPriceModelImpl}. 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 itemId the item ID
074            * @param start the lower bound of the range of shopping item prices
075            * @param end the upper bound of the range of shopping item prices (not inclusive)
076            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
077            * @return the ordered range of matching shopping item prices
078            */
079            public java.util.List<ShoppingItemPrice> findByItemId(long itemId,
080                    int start, int end,
081                    com.liferay.portal.kernel.util.OrderByComparator<ShoppingItemPrice> orderByComparator);
082    
083            /**
084            * Returns the first shopping item price in the ordered set where itemId = &#63;.
085            *
086            * @param itemId the item ID
087            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
088            * @return the first matching shopping item price
089            * @throws NoSuchItemPriceException if a matching shopping item price could not be found
090            */
091            public ShoppingItemPrice findByItemId_First(long itemId,
092                    com.liferay.portal.kernel.util.OrderByComparator<ShoppingItemPrice> orderByComparator)
093                    throws com.liferay.portlet.shopping.NoSuchItemPriceException;
094    
095            /**
096            * Returns the first shopping item price in the ordered set where itemId = &#63;.
097            *
098            * @param itemId the item ID
099            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
100            * @return the first matching shopping item price, or <code>null</code> if a matching shopping item price could not be found
101            */
102            public ShoppingItemPrice fetchByItemId_First(long itemId,
103                    com.liferay.portal.kernel.util.OrderByComparator<ShoppingItemPrice> orderByComparator);
104    
105            /**
106            * Returns the last shopping item price in the ordered set where itemId = &#63;.
107            *
108            * @param itemId the item ID
109            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
110            * @return the last matching shopping item price
111            * @throws NoSuchItemPriceException if a matching shopping item price could not be found
112            */
113            public ShoppingItemPrice findByItemId_Last(long itemId,
114                    com.liferay.portal.kernel.util.OrderByComparator<ShoppingItemPrice> orderByComparator)
115                    throws com.liferay.portlet.shopping.NoSuchItemPriceException;
116    
117            /**
118            * Returns the last shopping item price in the ordered set where itemId = &#63;.
119            *
120            * @param itemId the item ID
121            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
122            * @return the last matching shopping item price, or <code>null</code> if a matching shopping item price could not be found
123            */
124            public ShoppingItemPrice fetchByItemId_Last(long itemId,
125                    com.liferay.portal.kernel.util.OrderByComparator<ShoppingItemPrice> orderByComparator);
126    
127            /**
128            * Returns the shopping item prices before and after the current shopping item price in the ordered set where itemId = &#63;.
129            *
130            * @param itemPriceId the primary key of the current shopping item price
131            * @param itemId the item ID
132            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
133            * @return the previous, current, and next shopping item price
134            * @throws NoSuchItemPriceException if a shopping item price with the primary key could not be found
135            */
136            public ShoppingItemPrice[] findByItemId_PrevAndNext(long itemPriceId,
137                    long itemId,
138                    com.liferay.portal.kernel.util.OrderByComparator<ShoppingItemPrice> orderByComparator)
139                    throws com.liferay.portlet.shopping.NoSuchItemPriceException;
140    
141            /**
142            * Removes all the shopping item prices where itemId = &#63; from the database.
143            *
144            * @param itemId the item ID
145            */
146            public void removeByItemId(long itemId);
147    
148            /**
149            * Returns the number of shopping item prices where itemId = &#63;.
150            *
151            * @param itemId the item ID
152            * @return the number of matching shopping item prices
153            */
154            public int countByItemId(long itemId);
155    
156            /**
157            * Caches the shopping item price in the entity cache if it is enabled.
158            *
159            * @param shoppingItemPrice the shopping item price
160            */
161            public void cacheResult(ShoppingItemPrice shoppingItemPrice);
162    
163            /**
164            * Caches the shopping item prices in the entity cache if it is enabled.
165            *
166            * @param shoppingItemPrices the shopping item prices
167            */
168            public void cacheResult(
169                    java.util.List<ShoppingItemPrice> shoppingItemPrices);
170    
171            /**
172            * Creates a new shopping item price with the primary key. Does not add the shopping item price to the database.
173            *
174            * @param itemPriceId the primary key for the new shopping item price
175            * @return the new shopping item price
176            */
177            public ShoppingItemPrice create(long itemPriceId);
178    
179            /**
180            * Removes the shopping item price with the primary key from the database. Also notifies the appropriate model listeners.
181            *
182            * @param itemPriceId the primary key of the shopping item price
183            * @return the shopping item price that was removed
184            * @throws NoSuchItemPriceException if a shopping item price with the primary key could not be found
185            */
186            public ShoppingItemPrice remove(long itemPriceId)
187                    throws com.liferay.portlet.shopping.NoSuchItemPriceException;
188    
189            public ShoppingItemPrice updateImpl(ShoppingItemPrice shoppingItemPrice);
190    
191            /**
192            * Returns the shopping item price with the primary key or throws a {@link NoSuchItemPriceException} if it could not be found.
193            *
194            * @param itemPriceId the primary key of the shopping item price
195            * @return the shopping item price
196            * @throws NoSuchItemPriceException if a shopping item price with the primary key could not be found
197            */
198            public ShoppingItemPrice findByPrimaryKey(long itemPriceId)
199                    throws com.liferay.portlet.shopping.NoSuchItemPriceException;
200    
201            /**
202            * Returns the shopping item price with the primary key or returns <code>null</code> if it could not be found.
203            *
204            * @param itemPriceId the primary key of the shopping item price
205            * @return the shopping item price, or <code>null</code> if a shopping item price with the primary key could not be found
206            */
207            public ShoppingItemPrice fetchByPrimaryKey(long itemPriceId);
208    
209            @Override
210            public java.util.Map<java.io.Serializable, ShoppingItemPrice> fetchByPrimaryKeys(
211                    java.util.Set<java.io.Serializable> primaryKeys);
212    
213            /**
214            * Returns all the shopping item prices.
215            *
216            * @return the shopping item prices
217            */
218            public java.util.List<ShoppingItemPrice> findAll();
219    
220            /**
221            * Returns a range of all the shopping item prices.
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 ShoppingItemPriceModelImpl}. 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 item prices
228            * @param end the upper bound of the range of shopping item prices (not inclusive)
229            * @return the range of shopping item prices
230            */
231            public java.util.List<ShoppingItemPrice> findAll(int start, int end);
232    
233            /**
234            * Returns an ordered range of all the shopping item prices.
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 ShoppingItemPriceModelImpl}. 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 item prices
241            * @param end the upper bound of the range of shopping item prices (not inclusive)
242            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
243            * @return the ordered range of shopping item prices
244            */
245            public java.util.List<ShoppingItemPrice> findAll(int start, int end,
246                    com.liferay.portal.kernel.util.OrderByComparator<ShoppingItemPrice> orderByComparator);
247    
248            /**
249            * Removes all the shopping item prices from the database.
250            */
251            public void removeAll();
252    
253            /**
254            * Returns the number of shopping item prices.
255            *
256            * @return the number of shopping item prices
257            */
258            public int countAll();
259    }