1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.shopping.service.persistence;
24  
25  import com.liferay.portal.service.persistence.BasePersistence;
26  
27  /**
28   * <a href="ShoppingItemPersistence.java.html"><b><i>View Source</i></b></a>
29   *
30   * <p>
31   * ServiceBuilder generated this class. Modifications in this class will be
32   * overwritten the next time is generated.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       ShoppingItemPersistenceImpl
37   * @see       ShoppingItemUtil
38   * @generated
39   */
40  public interface ShoppingItemPersistence extends BasePersistence {
41      public void cacheResult(
42          com.liferay.portlet.shopping.model.ShoppingItem shoppingItem);
43  
44      public void cacheResult(
45          java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> shoppingItems);
46  
47      public void clearCache();
48  
49      public com.liferay.portlet.shopping.model.ShoppingItem create(long itemId);
50  
51      public com.liferay.portlet.shopping.model.ShoppingItem remove(long itemId)
52          throws com.liferay.portal.SystemException,
53              com.liferay.portlet.shopping.NoSuchItemException;
54  
55      public com.liferay.portlet.shopping.model.ShoppingItem remove(
56          com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
57          throws com.liferay.portal.SystemException;
58  
59      /**
60       * @deprecated Use {@link #update(ShoppingItem, boolean merge)}.
61       */
62      public com.liferay.portlet.shopping.model.ShoppingItem update(
63          com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
64          throws com.liferay.portal.SystemException;
65  
66      /**
67       * Add, update, or merge, the entity. This method also calls the model
68       * listeners to trigger the proper events associated with adding, deleting,
69       * or updating an entity.
70       *
71       * @param  shoppingItem the entity to add, update, or merge
72       * @param  merge boolean value for whether to merge the entity. The default
73       *         value is false. Setting merge to true is more expensive and
74       *         should only be true when shoppingItem is transient. See
75       *         LEP-5473 for a detailed discussion of this method.
76       * @return the entity that was added, updated, or merged
77       */
78      public com.liferay.portlet.shopping.model.ShoppingItem update(
79          com.liferay.portlet.shopping.model.ShoppingItem shoppingItem,
80          boolean merge) throws com.liferay.portal.SystemException;
81  
82      public com.liferay.portlet.shopping.model.ShoppingItem updateImpl(
83          com.liferay.portlet.shopping.model.ShoppingItem shoppingItem,
84          boolean merge) throws com.liferay.portal.SystemException;
85  
86      public com.liferay.portlet.shopping.model.ShoppingItem findByPrimaryKey(
87          long itemId)
88          throws com.liferay.portal.SystemException,
89              com.liferay.portlet.shopping.NoSuchItemException;
90  
91      public com.liferay.portlet.shopping.model.ShoppingItem fetchByPrimaryKey(
92          long itemId) throws com.liferay.portal.SystemException;
93  
94      public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByCategoryId(
95          long categoryId) throws com.liferay.portal.SystemException;
96  
97      public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByCategoryId(
98          long categoryId, int start, int end)
99          throws com.liferay.portal.SystemException;
100 
101     public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByCategoryId(
102         long categoryId, int start, int end,
103         com.liferay.portal.kernel.util.OrderByComparator obc)
104         throws com.liferay.portal.SystemException;
105 
106     public com.liferay.portlet.shopping.model.ShoppingItem findByCategoryId_First(
107         long categoryId, com.liferay.portal.kernel.util.OrderByComparator obc)
108         throws com.liferay.portal.SystemException,
109             com.liferay.portlet.shopping.NoSuchItemException;
110 
111     public com.liferay.portlet.shopping.model.ShoppingItem findByCategoryId_Last(
112         long categoryId, com.liferay.portal.kernel.util.OrderByComparator obc)
113         throws com.liferay.portal.SystemException,
114             com.liferay.portlet.shopping.NoSuchItemException;
115 
116     public com.liferay.portlet.shopping.model.ShoppingItem[] findByCategoryId_PrevAndNext(
117         long itemId, long categoryId,
118         com.liferay.portal.kernel.util.OrderByComparator obc)
119         throws com.liferay.portal.SystemException,
120             com.liferay.portlet.shopping.NoSuchItemException;
121 
122     public com.liferay.portlet.shopping.model.ShoppingItem findBySmallImageId(
123         long smallImageId)
124         throws com.liferay.portal.SystemException,
125             com.liferay.portlet.shopping.NoSuchItemException;
126 
127     public com.liferay.portlet.shopping.model.ShoppingItem fetchBySmallImageId(
128         long smallImageId) throws com.liferay.portal.SystemException;
129 
130     public com.liferay.portlet.shopping.model.ShoppingItem fetchBySmallImageId(
131         long smallImageId, boolean retrieveFromCache)
132         throws com.liferay.portal.SystemException;
133 
134     public com.liferay.portlet.shopping.model.ShoppingItem findByMediumImageId(
135         long mediumImageId)
136         throws com.liferay.portal.SystemException,
137             com.liferay.portlet.shopping.NoSuchItemException;
138 
139     public com.liferay.portlet.shopping.model.ShoppingItem fetchByMediumImageId(
140         long mediumImageId) throws com.liferay.portal.SystemException;
141 
142     public com.liferay.portlet.shopping.model.ShoppingItem fetchByMediumImageId(
143         long mediumImageId, boolean retrieveFromCache)
144         throws com.liferay.portal.SystemException;
145 
146     public com.liferay.portlet.shopping.model.ShoppingItem findByLargeImageId(
147         long largeImageId)
148         throws com.liferay.portal.SystemException,
149             com.liferay.portlet.shopping.NoSuchItemException;
150 
151     public com.liferay.portlet.shopping.model.ShoppingItem fetchByLargeImageId(
152         long largeImageId) throws com.liferay.portal.SystemException;
153 
154     public com.liferay.portlet.shopping.model.ShoppingItem fetchByLargeImageId(
155         long largeImageId, boolean retrieveFromCache)
156         throws com.liferay.portal.SystemException;
157 
158     public com.liferay.portlet.shopping.model.ShoppingItem findByC_S(
159         long companyId, java.lang.String sku)
160         throws com.liferay.portal.SystemException,
161             com.liferay.portlet.shopping.NoSuchItemException;
162 
163     public com.liferay.portlet.shopping.model.ShoppingItem fetchByC_S(
164         long companyId, java.lang.String sku)
165         throws com.liferay.portal.SystemException;
166 
167     public com.liferay.portlet.shopping.model.ShoppingItem fetchByC_S(
168         long companyId, java.lang.String sku, boolean retrieveFromCache)
169         throws com.liferay.portal.SystemException;
170 
171     public java.util.List<Object> findWithDynamicQuery(
172         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
173         throws com.liferay.portal.SystemException;
174 
175     public java.util.List<Object> findWithDynamicQuery(
176         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
177         int end) throws com.liferay.portal.SystemException;
178 
179     public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll()
180         throws com.liferay.portal.SystemException;
181 
182     public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll(
183         int start, int end) throws com.liferay.portal.SystemException;
184 
185     public java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll(
186         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
187         throws com.liferay.portal.SystemException;
188 
189     public void removeByCategoryId(long categoryId)
190         throws com.liferay.portal.SystemException;
191 
192     public void removeBySmallImageId(long smallImageId)
193         throws com.liferay.portal.SystemException,
194             com.liferay.portlet.shopping.NoSuchItemException;
195 
196     public void removeByMediumImageId(long mediumImageId)
197         throws com.liferay.portal.SystemException,
198             com.liferay.portlet.shopping.NoSuchItemException;
199 
200     public void removeByLargeImageId(long largeImageId)
201         throws com.liferay.portal.SystemException,
202             com.liferay.portlet.shopping.NoSuchItemException;
203 
204     public void removeByC_S(long companyId, java.lang.String sku)
205         throws com.liferay.portal.SystemException,
206             com.liferay.portlet.shopping.NoSuchItemException;
207 
208     public void removeAll() throws com.liferay.portal.SystemException;
209 
210     public int countByCategoryId(long categoryId)
211         throws com.liferay.portal.SystemException;
212 
213     public int countBySmallImageId(long smallImageId)
214         throws com.liferay.portal.SystemException;
215 
216     public int countByMediumImageId(long mediumImageId)
217         throws com.liferay.portal.SystemException;
218 
219     public int countByLargeImageId(long largeImageId)
220         throws com.liferay.portal.SystemException;
221 
222     public int countByC_S(long companyId, java.lang.String sku)
223         throws com.liferay.portal.SystemException;
224 
225     public int countAll() throws com.liferay.portal.SystemException;
226 
227     public java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices(
228         long pk) throws com.liferay.portal.SystemException;
229 
230     public java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices(
231         long pk, int start, int end) throws com.liferay.portal.SystemException;
232 
233     public java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices(
234         long pk, int start, int end,
235         com.liferay.portal.kernel.util.OrderByComparator obc)
236         throws com.liferay.portal.SystemException;
237 
238     public int getShoppingItemPricesSize(long pk)
239         throws com.liferay.portal.SystemException;
240 
241     public boolean containsShoppingItemPrice(long pk, long shoppingItemPricePK)
242         throws com.liferay.portal.SystemException;
243 
244     public boolean containsShoppingItemPrices(long pk)
245         throws com.liferay.portal.SystemException;
246 }