1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
19  import com.liferay.portal.kernel.exception.SystemException;
20  import com.liferay.portal.model.PortletItem;
21  
22  import java.util.List;
23  
24  /**
25   * <a href="PortletItemUtil.java.html"><b><i>View Source</i></b></a>
26   *
27   * <p>
28   * ServiceBuilder generated this class. Modifications in this class will be
29   * overwritten the next time is generated.
30   * </p>
31   *
32   * @author    Brian Wing Shun Chan
33   * @see       PortletItemPersistence
34   * @see       PortletItemPersistenceImpl
35   * @generated
36   */
37  public class PortletItemUtil {
38      /**
39       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
40       */
41      public static void clearCache() {
42          getPersistence().clearCache();
43      }
44  
45      /**
46       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(PortletItem)
47       */
48      public static void clearCache(PortletItem portletItem) {
49          getPersistence().clearCache(portletItem);
50      }
51  
52      /**
53       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
54       */
55      public long countWithDynamicQuery(DynamicQuery dynamicQuery)
56          throws SystemException {
57          return getPersistence().countWithDynamicQuery(dynamicQuery);
58      }
59  
60      /**
61       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
62       */
63      public static List<PortletItem> findWithDynamicQuery(
64          DynamicQuery dynamicQuery) throws SystemException {
65          return getPersistence().findWithDynamicQuery(dynamicQuery);
66      }
67  
68      /**
69       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
70       */
71      public static List<PortletItem> findWithDynamicQuery(
72          DynamicQuery dynamicQuery, int start, int end)
73          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.kernel.exception.SystemException {
112         return getPersistence().remove(portletItemId);
113     }
114 
115     public static com.liferay.portal.model.PortletItem updateImpl(
116         com.liferay.portal.model.PortletItem portletItem, boolean merge)
117         throws com.liferay.portal.kernel.exception.SystemException {
118         return getPersistence().updateImpl(portletItem, merge);
119     }
120 
121     public static com.liferay.portal.model.PortletItem findByPrimaryKey(
122         long portletItemId)
123         throws com.liferay.portal.NoSuchPortletItemException,
124             com.liferay.portal.kernel.exception.SystemException {
125         return getPersistence().findByPrimaryKey(portletItemId);
126     }
127 
128     public static com.liferay.portal.model.PortletItem fetchByPrimaryKey(
129         long portletItemId)
130         throws com.liferay.portal.kernel.exception.SystemException {
131         return getPersistence().fetchByPrimaryKey(portletItemId);
132     }
133 
134     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_C(
135         long groupId, long classNameId)
136         throws com.liferay.portal.kernel.exception.SystemException {
137         return getPersistence().findByG_C(groupId, classNameId);
138     }
139 
140     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_C(
141         long groupId, long classNameId, int start, int end)
142         throws com.liferay.portal.kernel.exception.SystemException {
143         return getPersistence().findByG_C(groupId, classNameId, start, end);
144     }
145 
146     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_C(
147         long groupId, long classNameId, int start, int end,
148         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
149         throws com.liferay.portal.kernel.exception.SystemException {
150         return getPersistence()
151                    .findByG_C(groupId, classNameId, start, end,
152             orderByComparator);
153     }
154 
155     public static com.liferay.portal.model.PortletItem findByG_C_First(
156         long groupId, long classNameId,
157         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
158         throws com.liferay.portal.NoSuchPortletItemException,
159             com.liferay.portal.kernel.exception.SystemException {
160         return getPersistence()
161                    .findByG_C_First(groupId, classNameId, orderByComparator);
162     }
163 
164     public static com.liferay.portal.model.PortletItem findByG_C_Last(
165         long groupId, long classNameId,
166         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
167         throws com.liferay.portal.NoSuchPortletItemException,
168             com.liferay.portal.kernel.exception.SystemException {
169         return getPersistence()
170                    .findByG_C_Last(groupId, classNameId, orderByComparator);
171     }
172 
173     public static com.liferay.portal.model.PortletItem[] findByG_C_PrevAndNext(
174         long portletItemId, long groupId, long classNameId,
175         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
176         throws com.liferay.portal.NoSuchPortletItemException,
177             com.liferay.portal.kernel.exception.SystemException {
178         return getPersistence()
179                    .findByG_C_PrevAndNext(portletItemId, groupId, classNameId,
180             orderByComparator);
181     }
182 
183     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C(
184         long groupId, java.lang.String portletId, long classNameId)
185         throws com.liferay.portal.kernel.exception.SystemException {
186         return getPersistence().findByG_P_C(groupId, portletId, classNameId);
187     }
188 
189     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C(
190         long groupId, java.lang.String portletId, long classNameId, int start,
191         int end) throws com.liferay.portal.kernel.exception.SystemException {
192         return getPersistence()
193                    .findByG_P_C(groupId, portletId, classNameId, start, end);
194     }
195 
196     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C(
197         long groupId, java.lang.String portletId, long classNameId, int start,
198         int end,
199         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
200         throws com.liferay.portal.kernel.exception.SystemException {
201         return getPersistence()
202                    .findByG_P_C(groupId, portletId, classNameId, start, end,
203             orderByComparator);
204     }
205 
206     public static com.liferay.portal.model.PortletItem findByG_P_C_First(
207         long groupId, java.lang.String portletId, long classNameId,
208         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
209         throws com.liferay.portal.NoSuchPortletItemException,
210             com.liferay.portal.kernel.exception.SystemException {
211         return getPersistence()
212                    .findByG_P_C_First(groupId, portletId, classNameId,
213             orderByComparator);
214     }
215 
216     public static com.liferay.portal.model.PortletItem findByG_P_C_Last(
217         long groupId, java.lang.String portletId, long classNameId,
218         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
219         throws com.liferay.portal.NoSuchPortletItemException,
220             com.liferay.portal.kernel.exception.SystemException {
221         return getPersistence()
222                    .findByG_P_C_Last(groupId, portletId, classNameId,
223             orderByComparator);
224     }
225 
226     public static com.liferay.portal.model.PortletItem[] findByG_P_C_PrevAndNext(
227         long portletItemId, long groupId, java.lang.String portletId,
228         long classNameId,
229         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
230         throws com.liferay.portal.NoSuchPortletItemException,
231             com.liferay.portal.kernel.exception.SystemException {
232         return getPersistence()
233                    .findByG_P_C_PrevAndNext(portletItemId, groupId, portletId,
234             classNameId, orderByComparator);
235     }
236 
237     public static com.liferay.portal.model.PortletItem findByG_N_P_C(
238         long groupId, java.lang.String name, java.lang.String portletId,
239         long classNameId)
240         throws com.liferay.portal.NoSuchPortletItemException,
241             com.liferay.portal.kernel.exception.SystemException {
242         return getPersistence()
243                    .findByG_N_P_C(groupId, name, portletId, classNameId);
244     }
245 
246     public static com.liferay.portal.model.PortletItem fetchByG_N_P_C(
247         long groupId, java.lang.String name, java.lang.String portletId,
248         long classNameId)
249         throws com.liferay.portal.kernel.exception.SystemException {
250         return getPersistence()
251                    .fetchByG_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, boolean retrieveFromCache)
257         throws com.liferay.portal.kernel.exception.SystemException {
258         return getPersistence()
259                    .fetchByG_N_P_C(groupId, name, portletId, classNameId,
260             retrieveFromCache);
261     }
262 
263     public static java.util.List<com.liferay.portal.model.PortletItem> findAll()
264         throws com.liferay.portal.kernel.exception.SystemException {
265         return getPersistence().findAll();
266     }
267 
268     public static java.util.List<com.liferay.portal.model.PortletItem> findAll(
269         int start, int end)
270         throws com.liferay.portal.kernel.exception.SystemException {
271         return getPersistence().findAll(start, end);
272     }
273 
274     public static java.util.List<com.liferay.portal.model.PortletItem> findAll(
275         int start, int end,
276         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
277         throws com.liferay.portal.kernel.exception.SystemException {
278         return getPersistence().findAll(start, end, orderByComparator);
279     }
280 
281     public static void removeByG_C(long groupId, long classNameId)
282         throws com.liferay.portal.kernel.exception.SystemException {
283         getPersistence().removeByG_C(groupId, classNameId);
284     }
285 
286     public static void removeByG_P_C(long groupId, java.lang.String portletId,
287         long classNameId)
288         throws com.liferay.portal.kernel.exception.SystemException {
289         getPersistence().removeByG_P_C(groupId, portletId, classNameId);
290     }
291 
292     public static void removeByG_N_P_C(long groupId, java.lang.String name,
293         java.lang.String portletId, long classNameId)
294         throws com.liferay.portal.NoSuchPortletItemException,
295             com.liferay.portal.kernel.exception.SystemException {
296         getPersistence().removeByG_N_P_C(groupId, name, portletId, classNameId);
297     }
298 
299     public static void removeAll()
300         throws com.liferay.portal.kernel.exception.SystemException {
301         getPersistence().removeAll();
302     }
303 
304     public static int countByG_C(long groupId, long classNameId)
305         throws com.liferay.portal.kernel.exception.SystemException {
306         return getPersistence().countByG_C(groupId, classNameId);
307     }
308 
309     public static int countByG_P_C(long groupId, java.lang.String portletId,
310         long classNameId)
311         throws com.liferay.portal.kernel.exception.SystemException {
312         return getPersistence().countByG_P_C(groupId, portletId, classNameId);
313     }
314 
315     public static int countByG_N_P_C(long groupId, java.lang.String name,
316         java.lang.String portletId, long classNameId)
317         throws com.liferay.portal.kernel.exception.SystemException {
318         return getPersistence()
319                    .countByG_N_P_C(groupId, name, portletId, classNameId);
320     }
321 
322     public static int countAll()
323         throws com.liferay.portal.kernel.exception.SystemException {
324         return getPersistence().countAll();
325     }
326 
327     public static PortletItemPersistence getPersistence() {
328         if (_persistence == null) {
329             _persistence = (PortletItemPersistence)PortalBeanLocatorUtil.locate(PortletItemPersistence.class.getName());
330         }
331 
332         return _persistence;
333     }
334 
335     public void setPersistence(PortletItemPersistence persistence) {
336         _persistence = persistence;
337     }
338 
339     private static PortletItemPersistence _persistence;
340 }