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.portal.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  import com.liferay.portal.model.PortletItem;
22  
23  import java.util.List;
24  
25  /**
26   * <a href="PortletItemUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be
30   * overwritten the next time is generated.
31   * </p>
32   *
33   * @author    Brian Wing Shun Chan
34   * @see       PortletItemPersistence
35   * @see       PortletItemPersistenceImpl
36   * @generated
37   */
38  public class PortletItemUtil {
39      /**
40       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
41       */
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      /**
47       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(PortletItem)
48       */
49      public static void clearCache(PortletItem portletItem) {
50          getPersistence().clearCache(portletItem);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
55       */
56      public int countWithDynamicQuery(DynamicQuery dynamicQuery)
57          throws SystemException {
58          return getPersistence().countWithDynamicQuery(dynamicQuery);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
63       */
64      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
65          throws SystemException {
66          return getPersistence().findWithDynamicQuery(dynamicQuery);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
71       */
72      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
73          int start, int end) throws SystemException {
74          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
75      }
76  
77      /**
78       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
79       */
80      public static PortletItem remove(PortletItem portletItem)
81          throws SystemException {
82          return getPersistence().remove(portletItem);
83      }
84  
85      /**
86       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
87       */
88      public static PortletItem update(PortletItem portletItem, boolean merge)
89          throws SystemException {
90          return getPersistence().update(portletItem, merge);
91      }
92  
93      public static void cacheResult(
94          com.liferay.portal.model.PortletItem portletItem) {
95          getPersistence().cacheResult(portletItem);
96      }
97  
98      public static void cacheResult(
99          java.util.List<com.liferay.portal.model.PortletItem> portletItems) {
100         getPersistence().cacheResult(portletItems);
101     }
102 
103     public static com.liferay.portal.model.PortletItem create(
104         long portletItemId) {
105         return getPersistence().create(portletItemId);
106     }
107 
108     public static com.liferay.portal.model.PortletItem remove(
109         long portletItemId)
110         throws com.liferay.portal.NoSuchPortletItemException,
111             com.liferay.portal.SystemException {
112         return getPersistence().remove(portletItemId);
113     }
114 
115     /**
116      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
117      */
118     public static com.liferay.portal.model.PortletItem update(
119         com.liferay.portal.model.PortletItem portletItem)
120         throws com.liferay.portal.SystemException {
121         return getPersistence().update(portletItem);
122     }
123 
124     public static com.liferay.portal.model.PortletItem updateImpl(
125         com.liferay.portal.model.PortletItem portletItem, boolean merge)
126         throws com.liferay.portal.SystemException {
127         return getPersistence().updateImpl(portletItem, merge);
128     }
129 
130     public static com.liferay.portal.model.PortletItem findByPrimaryKey(
131         long portletItemId)
132         throws com.liferay.portal.NoSuchPortletItemException,
133             com.liferay.portal.SystemException {
134         return getPersistence().findByPrimaryKey(portletItemId);
135     }
136 
137     public static com.liferay.portal.model.PortletItem fetchByPrimaryKey(
138         long portletItemId) throws com.liferay.portal.SystemException {
139         return getPersistence().fetchByPrimaryKey(portletItemId);
140     }
141 
142     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_C(
143         long groupId, long classNameId)
144         throws com.liferay.portal.SystemException {
145         return getPersistence().findByG_C(groupId, classNameId);
146     }
147 
148     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_C(
149         long groupId, long classNameId, int start, int end)
150         throws com.liferay.portal.SystemException {
151         return getPersistence().findByG_C(groupId, classNameId, start, end);
152     }
153 
154     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_C(
155         long groupId, long classNameId, int start, int end,
156         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
157         throws com.liferay.portal.SystemException {
158         return getPersistence()
159                    .findByG_C(groupId, classNameId, start, end,
160             orderByComparator);
161     }
162 
163     public static com.liferay.portal.model.PortletItem findByG_C_First(
164         long groupId, long classNameId,
165         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
166         throws com.liferay.portal.NoSuchPortletItemException,
167             com.liferay.portal.SystemException {
168         return getPersistence()
169                    .findByG_C_First(groupId, classNameId, orderByComparator);
170     }
171 
172     public static com.liferay.portal.model.PortletItem findByG_C_Last(
173         long groupId, long classNameId,
174         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
175         throws com.liferay.portal.NoSuchPortletItemException,
176             com.liferay.portal.SystemException {
177         return getPersistence()
178                    .findByG_C_Last(groupId, classNameId, orderByComparator);
179     }
180 
181     public static com.liferay.portal.model.PortletItem[] findByG_C_PrevAndNext(
182         long portletItemId, long groupId, long classNameId,
183         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
184         throws com.liferay.portal.NoSuchPortletItemException,
185             com.liferay.portal.SystemException {
186         return getPersistence()
187                    .findByG_C_PrevAndNext(portletItemId, groupId, classNameId,
188             orderByComparator);
189     }
190 
191     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C(
192         long groupId, java.lang.String portletId, long classNameId)
193         throws com.liferay.portal.SystemException {
194         return getPersistence().findByG_P_C(groupId, portletId, classNameId);
195     }
196 
197     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C(
198         long groupId, java.lang.String portletId, long classNameId, int start,
199         int end) throws com.liferay.portal.SystemException {
200         return getPersistence()
201                    .findByG_P_C(groupId, portletId, classNameId, start, end);
202     }
203 
204     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C(
205         long groupId, java.lang.String portletId, long classNameId, int start,
206         int end,
207         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
208         throws com.liferay.portal.SystemException {
209         return getPersistence()
210                    .findByG_P_C(groupId, portletId, classNameId, start, end,
211             orderByComparator);
212     }
213 
214     public static com.liferay.portal.model.PortletItem findByG_P_C_First(
215         long groupId, java.lang.String portletId, long classNameId,
216         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
217         throws com.liferay.portal.NoSuchPortletItemException,
218             com.liferay.portal.SystemException {
219         return getPersistence()
220                    .findByG_P_C_First(groupId, portletId, classNameId,
221             orderByComparator);
222     }
223 
224     public static com.liferay.portal.model.PortletItem findByG_P_C_Last(
225         long groupId, java.lang.String portletId, long classNameId,
226         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
227         throws com.liferay.portal.NoSuchPortletItemException,
228             com.liferay.portal.SystemException {
229         return getPersistence()
230                    .findByG_P_C_Last(groupId, portletId, classNameId,
231             orderByComparator);
232     }
233 
234     public static com.liferay.portal.model.PortletItem[] findByG_P_C_PrevAndNext(
235         long portletItemId, long groupId, java.lang.String portletId,
236         long classNameId,
237         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
238         throws com.liferay.portal.NoSuchPortletItemException,
239             com.liferay.portal.SystemException {
240         return getPersistence()
241                    .findByG_P_C_PrevAndNext(portletItemId, groupId, portletId,
242             classNameId, orderByComparator);
243     }
244 
245     public static com.liferay.portal.model.PortletItem findByG_N_P_C(
246         long groupId, java.lang.String name, java.lang.String portletId,
247         long classNameId)
248         throws com.liferay.portal.NoSuchPortletItemException,
249             com.liferay.portal.SystemException {
250         return getPersistence()
251                    .findByG_N_P_C(groupId, name, portletId, classNameId);
252     }
253 
254     public static com.liferay.portal.model.PortletItem fetchByG_N_P_C(
255         long groupId, java.lang.String name, java.lang.String portletId,
256         long classNameId) throws com.liferay.portal.SystemException {
257         return getPersistence()
258                    .fetchByG_N_P_C(groupId, name, portletId, classNameId);
259     }
260 
261     public static com.liferay.portal.model.PortletItem fetchByG_N_P_C(
262         long groupId, java.lang.String name, java.lang.String portletId,
263         long classNameId, boolean retrieveFromCache)
264         throws com.liferay.portal.SystemException {
265         return getPersistence()
266                    .fetchByG_N_P_C(groupId, name, portletId, classNameId,
267             retrieveFromCache);
268     }
269 
270     public static java.util.List<com.liferay.portal.model.PortletItem> findAll()
271         throws com.liferay.portal.SystemException {
272         return getPersistence().findAll();
273     }
274 
275     public static java.util.List<com.liferay.portal.model.PortletItem> findAll(
276         int start, int end) throws com.liferay.portal.SystemException {
277         return getPersistence().findAll(start, end);
278     }
279 
280     public static java.util.List<com.liferay.portal.model.PortletItem> findAll(
281         int start, int end,
282         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
283         throws com.liferay.portal.SystemException {
284         return getPersistence().findAll(start, end, orderByComparator);
285     }
286 
287     public static void removeByG_C(long groupId, long classNameId)
288         throws com.liferay.portal.SystemException {
289         getPersistence().removeByG_C(groupId, classNameId);
290     }
291 
292     public static void removeByG_P_C(long groupId, java.lang.String portletId,
293         long classNameId) throws com.liferay.portal.SystemException {
294         getPersistence().removeByG_P_C(groupId, portletId, classNameId);
295     }
296 
297     public static void removeByG_N_P_C(long groupId, java.lang.String name,
298         java.lang.String portletId, long classNameId)
299         throws com.liferay.portal.NoSuchPortletItemException,
300             com.liferay.portal.SystemException {
301         getPersistence().removeByG_N_P_C(groupId, name, portletId, classNameId);
302     }
303 
304     public static void removeAll() throws com.liferay.portal.SystemException {
305         getPersistence().removeAll();
306     }
307 
308     public static int countByG_C(long groupId, long classNameId)
309         throws com.liferay.portal.SystemException {
310         return getPersistence().countByG_C(groupId, classNameId);
311     }
312 
313     public static int countByG_P_C(long groupId, java.lang.String portletId,
314         long classNameId) throws com.liferay.portal.SystemException {
315         return getPersistence().countByG_P_C(groupId, portletId, classNameId);
316     }
317 
318     public static int countByG_N_P_C(long groupId, java.lang.String name,
319         java.lang.String portletId, long classNameId)
320         throws com.liferay.portal.SystemException {
321         return getPersistence()
322                    .countByG_N_P_C(groupId, name, portletId, classNameId);
323     }
324 
325     public static int countAll() throws com.liferay.portal.SystemException {
326         return getPersistence().countAll();
327     }
328 
329     public static PortletItemPersistence getPersistence() {
330         if (_persistence == null) {
331             _persistence = (PortletItemPersistence)PortalBeanLocatorUtil.locate(PortletItemPersistence.class.getName());
332 
333             ReferenceRegistry.registerReference(PortletItemUtil.class,
334                 "_persistence");
335         }
336 
337         return _persistence;
338     }
339 
340     public void setPersistence(PortletItemPersistence persistence) {
341         _persistence = persistence;
342 
343         ReferenceRegistry.registerReference(PortletItemUtil.class,
344             "_persistence");
345     }
346 
347     private static PortletItemPersistence _persistence;
348 }