1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portlet.shopping.service.persistence;
16  
17  import com.liferay.portal.SystemException;
18  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
19  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
20  import com.liferay.portal.kernel.util.ReferenceRegistry;
21  
22  import com.liferay.portlet.shopping.model.ShoppingItemField;
23  
24  import java.util.List;
25  
26  /**
27   * <a href="ShoppingItemFieldUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * @author    Brian Wing Shun Chan
35   * @see       ShoppingItemFieldPersistence
36   * @see       ShoppingItemFieldPersistenceImpl
37   * @generated
38   */
39  public class ShoppingItemFieldUtil {
40      /**
41       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
42       */
43      public static void clearCache() {
44          getPersistence().clearCache();
45      }
46  
47      /**
48       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(ShoppingItemField)
49       */
50      public static void clearCache(ShoppingItemField shoppingItemField) {
51          getPersistence().clearCache(shoppingItemField);
52      }
53  
54      /**
55       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
56       */
57      public int countWithDynamicQuery(DynamicQuery dynamicQuery)
58          throws SystemException {
59          return getPersistence().countWithDynamicQuery(dynamicQuery);
60      }
61  
62      /**
63       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
64       */
65      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
66          throws SystemException {
67          return getPersistence().findWithDynamicQuery(dynamicQuery);
68      }
69  
70      /**
71       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
72       */
73      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
74          int start, int end) throws SystemException {
75          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
76      }
77  
78      /**
79       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
80       */
81      public static ShoppingItemField remove(ShoppingItemField shoppingItemField)
82          throws SystemException {
83          return getPersistence().remove(shoppingItemField);
84      }
85  
86      /**
87       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
88       */
89      public static ShoppingItemField update(
90          ShoppingItemField shoppingItemField, boolean merge)
91          throws SystemException {
92          return getPersistence().update(shoppingItemField, merge);
93      }
94  
95      public static void cacheResult(
96          com.liferay.portlet.shopping.model.ShoppingItemField shoppingItemField) {
97          getPersistence().cacheResult(shoppingItemField);
98      }
99  
100     public static void cacheResult(
101         java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> shoppingItemFields) {
102         getPersistence().cacheResult(shoppingItemFields);
103     }
104 
105     public static com.liferay.portlet.shopping.model.ShoppingItemField create(
106         long itemFieldId) {
107         return getPersistence().create(itemFieldId);
108     }
109 
110     public static com.liferay.portlet.shopping.model.ShoppingItemField remove(
111         long itemFieldId)
112         throws com.liferay.portal.SystemException,
113             com.liferay.portlet.shopping.NoSuchItemFieldException {
114         return getPersistence().remove(itemFieldId);
115     }
116 
117     /**
118      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
119      */
120     public static com.liferay.portlet.shopping.model.ShoppingItemField update(
121         com.liferay.portlet.shopping.model.ShoppingItemField shoppingItemField)
122         throws com.liferay.portal.SystemException {
123         return getPersistence().update(shoppingItemField);
124     }
125 
126     public static com.liferay.portlet.shopping.model.ShoppingItemField updateImpl(
127         com.liferay.portlet.shopping.model.ShoppingItemField shoppingItemField,
128         boolean merge) throws com.liferay.portal.SystemException {
129         return getPersistence().updateImpl(shoppingItemField, merge);
130     }
131 
132     public static com.liferay.portlet.shopping.model.ShoppingItemField findByPrimaryKey(
133         long itemFieldId)
134         throws com.liferay.portal.SystemException,
135             com.liferay.portlet.shopping.NoSuchItemFieldException {
136         return getPersistence().findByPrimaryKey(itemFieldId);
137     }
138 
139     public static com.liferay.portlet.shopping.model.ShoppingItemField fetchByPrimaryKey(
140         long itemFieldId) throws com.liferay.portal.SystemException {
141         return getPersistence().fetchByPrimaryKey(itemFieldId);
142     }
143 
144     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findByItemId(
145         long itemId) throws com.liferay.portal.SystemException {
146         return getPersistence().findByItemId(itemId);
147     }
148 
149     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findByItemId(
150         long itemId, int start, int end)
151         throws com.liferay.portal.SystemException {
152         return getPersistence().findByItemId(itemId, start, end);
153     }
154 
155     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findByItemId(
156         long itemId, int start, int end,
157         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
158         throws com.liferay.portal.SystemException {
159         return getPersistence()
160                    .findByItemId(itemId, start, end, orderByComparator);
161     }
162 
163     public static com.liferay.portlet.shopping.model.ShoppingItemField findByItemId_First(
164         long itemId,
165         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
166         throws com.liferay.portal.SystemException,
167             com.liferay.portlet.shopping.NoSuchItemFieldException {
168         return getPersistence().findByItemId_First(itemId, orderByComparator);
169     }
170 
171     public static com.liferay.portlet.shopping.model.ShoppingItemField findByItemId_Last(
172         long itemId,
173         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
174         throws com.liferay.portal.SystemException,
175             com.liferay.portlet.shopping.NoSuchItemFieldException {
176         return getPersistence().findByItemId_Last(itemId, orderByComparator);
177     }
178 
179     public static com.liferay.portlet.shopping.model.ShoppingItemField[] findByItemId_PrevAndNext(
180         long itemFieldId, long itemId,
181         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
182         throws com.liferay.portal.SystemException,
183             com.liferay.portlet.shopping.NoSuchItemFieldException {
184         return getPersistence()
185                    .findByItemId_PrevAndNext(itemFieldId, itemId,
186             orderByComparator);
187     }
188 
189     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findAll()
190         throws com.liferay.portal.SystemException {
191         return getPersistence().findAll();
192     }
193 
194     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findAll(
195         int start, int end) throws com.liferay.portal.SystemException {
196         return getPersistence().findAll(start, end);
197     }
198 
199     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findAll(
200         int start, int end,
201         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
202         throws com.liferay.portal.SystemException {
203         return getPersistence().findAll(start, end, orderByComparator);
204     }
205 
206     public static void removeByItemId(long itemId)
207         throws com.liferay.portal.SystemException {
208         getPersistence().removeByItemId(itemId);
209     }
210 
211     public static void removeAll() throws com.liferay.portal.SystemException {
212         getPersistence().removeAll();
213     }
214 
215     public static int countByItemId(long itemId)
216         throws com.liferay.portal.SystemException {
217         return getPersistence().countByItemId(itemId);
218     }
219 
220     public static int countAll() throws com.liferay.portal.SystemException {
221         return getPersistence().countAll();
222     }
223 
224     public static ShoppingItemFieldPersistence getPersistence() {
225         if (_persistence == null) {
226             _persistence = (ShoppingItemFieldPersistence)PortalBeanLocatorUtil.locate(ShoppingItemFieldPersistence.class.getName());
227 
228             ReferenceRegistry.registerReference(ShoppingItemFieldUtil.class,
229                 "_persistence");
230         }
231 
232         return _persistence;
233     }
234 
235     public void setPersistence(ShoppingItemFieldPersistence persistence) {
236         _persistence = persistence;
237 
238         ReferenceRegistry.registerReference(ShoppingItemFieldUtil.class,
239             "_persistence");
240     }
241 
242     private static ShoppingItemFieldPersistence _persistence;
243 }