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.ShoppingItemField;
30  
31  import java.util.List;
32  
33  /**
34   * <a href="ShoppingItemFieldUtil.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       ShoppingItemFieldPersistence
43   * @see       ShoppingItemFieldPersistenceImpl
44   * @generated
45   */
46  public class ShoppingItemFieldUtil {
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 ShoppingItemField remove(ShoppingItemField shoppingItemField)
74          throws SystemException {
75          return getPersistence().remove(shoppingItemField);
76      }
77  
78      /**
79       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
80       */
81      public static ShoppingItemField update(
82          ShoppingItemField shoppingItemField, boolean merge)
83          throws SystemException {
84          return getPersistence().update(shoppingItemField, merge);
85      }
86  
87      public static void cacheResult(
88          com.liferay.portlet.shopping.model.ShoppingItemField shoppingItemField) {
89          getPersistence().cacheResult(shoppingItemField);
90      }
91  
92      public static void cacheResult(
93          java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> shoppingItemFields) {
94          getPersistence().cacheResult(shoppingItemFields);
95      }
96  
97      public static com.liferay.portlet.shopping.model.ShoppingItemField create(
98          long itemFieldId) {
99          return getPersistence().create(itemFieldId);
100     }
101 
102     public static com.liferay.portlet.shopping.model.ShoppingItemField remove(
103         long itemFieldId)
104         throws com.liferay.portal.SystemException,
105             com.liferay.portlet.shopping.NoSuchItemFieldException {
106         return getPersistence().remove(itemFieldId);
107     }
108 
109     /**
110      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
111      */
112     public static com.liferay.portlet.shopping.model.ShoppingItemField update(
113         com.liferay.portlet.shopping.model.ShoppingItemField shoppingItemField)
114         throws com.liferay.portal.SystemException {
115         return getPersistence().update(shoppingItemField);
116     }
117 
118     public static com.liferay.portlet.shopping.model.ShoppingItemField updateImpl(
119         com.liferay.portlet.shopping.model.ShoppingItemField shoppingItemField,
120         boolean merge) throws com.liferay.portal.SystemException {
121         return getPersistence().updateImpl(shoppingItemField, merge);
122     }
123 
124     public static com.liferay.portlet.shopping.model.ShoppingItemField findByPrimaryKey(
125         long itemFieldId)
126         throws com.liferay.portal.SystemException,
127             com.liferay.portlet.shopping.NoSuchItemFieldException {
128         return getPersistence().findByPrimaryKey(itemFieldId);
129     }
130 
131     public static com.liferay.portlet.shopping.model.ShoppingItemField fetchByPrimaryKey(
132         long itemFieldId) throws com.liferay.portal.SystemException {
133         return getPersistence().fetchByPrimaryKey(itemFieldId);
134     }
135 
136     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findByItemId(
137         long itemId) throws com.liferay.portal.SystemException {
138         return getPersistence().findByItemId(itemId);
139     }
140 
141     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findByItemId(
142         long itemId, int start, int end)
143         throws com.liferay.portal.SystemException {
144         return getPersistence().findByItemId(itemId, start, end);
145     }
146 
147     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findByItemId(
148         long itemId, int start, int end,
149         com.liferay.portal.kernel.util.OrderByComparator obc)
150         throws com.liferay.portal.SystemException {
151         return getPersistence().findByItemId(itemId, start, end, obc);
152     }
153 
154     public static com.liferay.portlet.shopping.model.ShoppingItemField findByItemId_First(
155         long itemId, com.liferay.portal.kernel.util.OrderByComparator obc)
156         throws com.liferay.portal.SystemException,
157             com.liferay.portlet.shopping.NoSuchItemFieldException {
158         return getPersistence().findByItemId_First(itemId, obc);
159     }
160 
161     public static com.liferay.portlet.shopping.model.ShoppingItemField findByItemId_Last(
162         long itemId, com.liferay.portal.kernel.util.OrderByComparator obc)
163         throws com.liferay.portal.SystemException,
164             com.liferay.portlet.shopping.NoSuchItemFieldException {
165         return getPersistence().findByItemId_Last(itemId, obc);
166     }
167 
168     public static com.liferay.portlet.shopping.model.ShoppingItemField[] findByItemId_PrevAndNext(
169         long itemFieldId, long itemId,
170         com.liferay.portal.kernel.util.OrderByComparator obc)
171         throws com.liferay.portal.SystemException,
172             com.liferay.portlet.shopping.NoSuchItemFieldException {
173         return getPersistence()
174                    .findByItemId_PrevAndNext(itemFieldId, itemId, obc);
175     }
176 
177     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findAll()
178         throws com.liferay.portal.SystemException {
179         return getPersistence().findAll();
180     }
181 
182     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findAll(
183         int start, int end) throws com.liferay.portal.SystemException {
184         return getPersistence().findAll(start, end);
185     }
186 
187     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findAll(
188         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
189         throws com.liferay.portal.SystemException {
190         return getPersistence().findAll(start, end, obc);
191     }
192 
193     public static void removeByItemId(long itemId)
194         throws com.liferay.portal.SystemException {
195         getPersistence().removeByItemId(itemId);
196     }
197 
198     public static void removeAll() throws com.liferay.portal.SystemException {
199         getPersistence().removeAll();
200     }
201 
202     public static int countByItemId(long itemId)
203         throws com.liferay.portal.SystemException {
204         return getPersistence().countByItemId(itemId);
205     }
206 
207     public static int countAll() throws com.liferay.portal.SystemException {
208         return getPersistence().countAll();
209     }
210 
211     public static ShoppingItemFieldPersistence getPersistence() {
212         if (_persistence == null) {
213             _persistence = (ShoppingItemFieldPersistence)PortalBeanLocatorUtil.locate(ShoppingItemFieldPersistence.class.getName());
214         }
215 
216         return _persistence;
217     }
218 
219     public void setPersistence(ShoppingItemFieldPersistence persistence) {
220         _persistence = persistence;
221     }
222 
223     private static ShoppingItemFieldPersistence _persistence;
224 }