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.SystemException;
26  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
27  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
28  
29  import com.liferay.portlet.shopping.model.ShoppingItem;
30  
31  import java.util.List;
32  
33  /**
34   * <a href="ShoppingItemUtil.java.html"><b><i>View Source</i></b></a>
35   *
36   * <p>
37   * ServiceBuilder generated this class. Modifications in this class will be
38   * overwritten the next time is generated.
39   * </p>
40   *
41   * @author    Brian Wing Shun Chan
42   * @see       ShoppingItemPersistence
43   * @see       ShoppingItemPersistenceImpl
44   * @generated
45   */
46  public class ShoppingItemUtil {
47      /**
48       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
49       */
50      public static void clearCache() {
51          getPersistence().clearCache();
52      }
53  
54      /**
55       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
56       */
57      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
58          throws SystemException {
59          return getPersistence().findWithDynamicQuery(dynamicQuery);
60      }
61  
62      /**
63       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
64       */
65      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
66          int start, int end) throws SystemException {
67          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
68      }
69  
70      /**
71       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
72       */
73      public static ShoppingItem remove(ShoppingItem shoppingItem)
74          throws SystemException {
75          return getPersistence().remove(shoppingItem);
76      }
77  
78      /**
79       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
80       */
81      public static ShoppingItem update(ShoppingItem shoppingItem, boolean merge)
82          throws SystemException {
83          return getPersistence().update(shoppingItem, merge);
84      }
85  
86      public static void cacheResult(
87          com.liferay.portlet.shopping.model.ShoppingItem shoppingItem) {
88          getPersistence().cacheResult(shoppingItem);
89      }
90  
91      public static void cacheResult(
92          java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> shoppingItems) {
93          getPersistence().cacheResult(shoppingItems);
94      }
95  
96      public static com.liferay.portlet.shopping.model.ShoppingItem create(
97          long itemId) {
98          return getPersistence().create(itemId);
99      }
100 
101     public static com.liferay.portlet.shopping.model.ShoppingItem remove(
102         long itemId)
103         throws com.liferay.portal.SystemException,
104             com.liferay.portlet.shopping.NoSuchItemException {
105         return getPersistence().remove(itemId);
106     }
107 
108     /**
109      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
110      */
111     public static com.liferay.portlet.shopping.model.ShoppingItem update(
112         com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
113         throws com.liferay.portal.SystemException {
114         return getPersistence().update(shoppingItem);
115     }
116 
117     public static com.liferay.portlet.shopping.model.ShoppingItem updateImpl(
118         com.liferay.portlet.shopping.model.ShoppingItem shoppingItem,
119         boolean merge) throws com.liferay.portal.SystemException {
120         return getPersistence().updateImpl(shoppingItem, merge);
121     }
122 
123     public static com.liferay.portlet.shopping.model.ShoppingItem findByPrimaryKey(
124         long itemId)
125         throws com.liferay.portal.SystemException,
126             com.liferay.portlet.shopping.NoSuchItemException {
127         return getPersistence().findByPrimaryKey(itemId);
128     }
129 
130     public static com.liferay.portlet.shopping.model.ShoppingItem fetchByPrimaryKey(
131         long itemId) throws com.liferay.portal.SystemException {
132         return getPersistence().fetchByPrimaryKey(itemId);
133     }
134 
135     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByCategoryId(
136         long categoryId) throws com.liferay.portal.SystemException {
137         return getPersistence().findByCategoryId(categoryId);
138     }
139 
140     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByCategoryId(
141         long categoryId, int start, int end)
142         throws com.liferay.portal.SystemException {
143         return getPersistence().findByCategoryId(categoryId, start, end);
144     }
145 
146     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByCategoryId(
147         long categoryId, int start, int end,
148         com.liferay.portal.kernel.util.OrderByComparator obc)
149         throws com.liferay.portal.SystemException {
150         return getPersistence().findByCategoryId(categoryId, start, end, obc);
151     }
152 
153     public static com.liferay.portlet.shopping.model.ShoppingItem findByCategoryId_First(
154         long categoryId, com.liferay.portal.kernel.util.OrderByComparator obc)
155         throws com.liferay.portal.SystemException,
156             com.liferay.portlet.shopping.NoSuchItemException {
157         return getPersistence().findByCategoryId_First(categoryId, obc);
158     }
159 
160     public static com.liferay.portlet.shopping.model.ShoppingItem findByCategoryId_Last(
161         long categoryId, com.liferay.portal.kernel.util.OrderByComparator obc)
162         throws com.liferay.portal.SystemException,
163             com.liferay.portlet.shopping.NoSuchItemException {
164         return getPersistence().findByCategoryId_Last(categoryId, obc);
165     }
166 
167     public static com.liferay.portlet.shopping.model.ShoppingItem[] findByCategoryId_PrevAndNext(
168         long itemId, long categoryId,
169         com.liferay.portal.kernel.util.OrderByComparator obc)
170         throws com.liferay.portal.SystemException,
171             com.liferay.portlet.shopping.NoSuchItemException {
172         return getPersistence()
173                    .findByCategoryId_PrevAndNext(itemId, categoryId, obc);
174     }
175 
176     public static com.liferay.portlet.shopping.model.ShoppingItem findBySmallImageId(
177         long smallImageId)
178         throws com.liferay.portal.SystemException,
179             com.liferay.portlet.shopping.NoSuchItemException {
180         return getPersistence().findBySmallImageId(smallImageId);
181     }
182 
183     public static com.liferay.portlet.shopping.model.ShoppingItem fetchBySmallImageId(
184         long smallImageId) throws com.liferay.portal.SystemException {
185         return getPersistence().fetchBySmallImageId(smallImageId);
186     }
187 
188     public static com.liferay.portlet.shopping.model.ShoppingItem fetchBySmallImageId(
189         long smallImageId, boolean retrieveFromCache)
190         throws com.liferay.portal.SystemException {
191         return getPersistence()
192                    .fetchBySmallImageId(smallImageId, retrieveFromCache);
193     }
194 
195     public static com.liferay.portlet.shopping.model.ShoppingItem findByMediumImageId(
196         long mediumImageId)
197         throws com.liferay.portal.SystemException,
198             com.liferay.portlet.shopping.NoSuchItemException {
199         return getPersistence().findByMediumImageId(mediumImageId);
200     }
201 
202     public static com.liferay.portlet.shopping.model.ShoppingItem fetchByMediumImageId(
203         long mediumImageId) throws com.liferay.portal.SystemException {
204         return getPersistence().fetchByMediumImageId(mediumImageId);
205     }
206 
207     public static com.liferay.portlet.shopping.model.ShoppingItem fetchByMediumImageId(
208         long mediumImageId, boolean retrieveFromCache)
209         throws com.liferay.portal.SystemException {
210         return getPersistence()
211                    .fetchByMediumImageId(mediumImageId, retrieveFromCache);
212     }
213 
214     public static com.liferay.portlet.shopping.model.ShoppingItem findByLargeImageId(
215         long largeImageId)
216         throws com.liferay.portal.SystemException,
217             com.liferay.portlet.shopping.NoSuchItemException {
218         return getPersistence().findByLargeImageId(largeImageId);
219     }
220 
221     public static com.liferay.portlet.shopping.model.ShoppingItem fetchByLargeImageId(
222         long largeImageId) throws com.liferay.portal.SystemException {
223         return getPersistence().fetchByLargeImageId(largeImageId);
224     }
225 
226     public static com.liferay.portlet.shopping.model.ShoppingItem fetchByLargeImageId(
227         long largeImageId, boolean retrieveFromCache)
228         throws com.liferay.portal.SystemException {
229         return getPersistence()
230                    .fetchByLargeImageId(largeImageId, retrieveFromCache);
231     }
232 
233     public static com.liferay.portlet.shopping.model.ShoppingItem findByC_S(
234         long companyId, java.lang.String sku)
235         throws com.liferay.portal.SystemException,
236             com.liferay.portlet.shopping.NoSuchItemException {
237         return getPersistence().findByC_S(companyId, sku);
238     }
239 
240     public static com.liferay.portlet.shopping.model.ShoppingItem fetchByC_S(
241         long companyId, java.lang.String sku)
242         throws com.liferay.portal.SystemException {
243         return getPersistence().fetchByC_S(companyId, sku);
244     }
245 
246     public static com.liferay.portlet.shopping.model.ShoppingItem fetchByC_S(
247         long companyId, java.lang.String sku, boolean retrieveFromCache)
248         throws com.liferay.portal.SystemException {
249         return getPersistence().fetchByC_S(companyId, sku, retrieveFromCache);
250     }
251 
252     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll()
253         throws com.liferay.portal.SystemException {
254         return getPersistence().findAll();
255     }
256 
257     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll(
258         int start, int end) throws com.liferay.portal.SystemException {
259         return getPersistence().findAll(start, end);
260     }
261 
262     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll(
263         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
264         throws com.liferay.portal.SystemException {
265         return getPersistence().findAll(start, end, obc);
266     }
267 
268     public static void removeByCategoryId(long categoryId)
269         throws com.liferay.portal.SystemException {
270         getPersistence().removeByCategoryId(categoryId);
271     }
272 
273     public static void removeBySmallImageId(long smallImageId)
274         throws com.liferay.portal.SystemException,
275             com.liferay.portlet.shopping.NoSuchItemException {
276         getPersistence().removeBySmallImageId(smallImageId);
277     }
278 
279     public static void removeByMediumImageId(long mediumImageId)
280         throws com.liferay.portal.SystemException,
281             com.liferay.portlet.shopping.NoSuchItemException {
282         getPersistence().removeByMediumImageId(mediumImageId);
283     }
284 
285     public static void removeByLargeImageId(long largeImageId)
286         throws com.liferay.portal.SystemException,
287             com.liferay.portlet.shopping.NoSuchItemException {
288         getPersistence().removeByLargeImageId(largeImageId);
289     }
290 
291     public static void removeByC_S(long companyId, java.lang.String sku)
292         throws com.liferay.portal.SystemException,
293             com.liferay.portlet.shopping.NoSuchItemException {
294         getPersistence().removeByC_S(companyId, sku);
295     }
296 
297     public static void removeAll() throws com.liferay.portal.SystemException {
298         getPersistence().removeAll();
299     }
300 
301     public static int countByCategoryId(long categoryId)
302         throws com.liferay.portal.SystemException {
303         return getPersistence().countByCategoryId(categoryId);
304     }
305 
306     public static int countBySmallImageId(long smallImageId)
307         throws com.liferay.portal.SystemException {
308         return getPersistence().countBySmallImageId(smallImageId);
309     }
310 
311     public static int countByMediumImageId(long mediumImageId)
312         throws com.liferay.portal.SystemException {
313         return getPersistence().countByMediumImageId(mediumImageId);
314     }
315 
316     public static int countByLargeImageId(long largeImageId)
317         throws com.liferay.portal.SystemException {
318         return getPersistence().countByLargeImageId(largeImageId);
319     }
320 
321     public static int countByC_S(long companyId, java.lang.String sku)
322         throws com.liferay.portal.SystemException {
323         return getPersistence().countByC_S(companyId, sku);
324     }
325 
326     public static int countAll() throws com.liferay.portal.SystemException {
327         return getPersistence().countAll();
328     }
329 
330     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices(
331         long pk) throws com.liferay.portal.SystemException {
332         return getPersistence().getShoppingItemPrices(pk);
333     }
334 
335     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices(
336         long pk, int start, int end) throws com.liferay.portal.SystemException {
337         return getPersistence().getShoppingItemPrices(pk, start, end);
338     }
339 
340     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices(
341         long pk, int start, int end,
342         com.liferay.portal.kernel.util.OrderByComparator obc)
343         throws com.liferay.portal.SystemException {
344         return getPersistence().getShoppingItemPrices(pk, start, end, obc);
345     }
346 
347     public static int getShoppingItemPricesSize(long pk)
348         throws com.liferay.portal.SystemException {
349         return getPersistence().getShoppingItemPricesSize(pk);
350     }
351 
352     public static boolean containsShoppingItemPrice(long pk,
353         long shoppingItemPricePK) throws com.liferay.portal.SystemException {
354         return getPersistence()
355                    .containsShoppingItemPrice(pk, shoppingItemPricePK);
356     }
357 
358     public static boolean containsShoppingItemPrices(long pk)
359         throws com.liferay.portal.SystemException {
360         return getPersistence().containsShoppingItemPrices(pk);
361     }
362 
363     public static ShoppingItemPersistence getPersistence() {
364         if (_persistence == null) {
365             _persistence = (ShoppingItemPersistence)PortalBeanLocatorUtil.locate(ShoppingItemPersistence.class.getName());
366         }
367 
368         return _persistence;
369     }
370 
371     public void setPersistence(ShoppingItemPersistence persistence) {
372         _persistence = persistence;
373     }
374 
375     private static ShoppingItemPersistence _persistence;
376 }