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.SystemException;
18  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
19  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
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#findWithDynamicQuery(DynamicQuery)
47       */
48      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
49          throws SystemException {
50          return getPersistence().findWithDynamicQuery(dynamicQuery);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
55       */
56      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
57          int start, int end) throws SystemException {
58          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
63       */
64      public static PortletItem remove(PortletItem portletItem)
65          throws SystemException {
66          return getPersistence().remove(portletItem);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
71       */
72      public static PortletItem update(PortletItem portletItem, boolean merge)
73          throws SystemException {
74          return getPersistence().update(portletItem, merge);
75      }
76  
77      public static void cacheResult(
78          com.liferay.portal.model.PortletItem portletItem) {
79          getPersistence().cacheResult(portletItem);
80      }
81  
82      public static void cacheResult(
83          java.util.List<com.liferay.portal.model.PortletItem> portletItems) {
84          getPersistence().cacheResult(portletItems);
85      }
86  
87      public static com.liferay.portal.model.PortletItem create(
88          long portletItemId) {
89          return getPersistence().create(portletItemId);
90      }
91  
92      public static com.liferay.portal.model.PortletItem remove(
93          long portletItemId)
94          throws com.liferay.portal.NoSuchPortletItemException,
95              com.liferay.portal.SystemException {
96          return getPersistence().remove(portletItemId);
97      }
98  
99      /**
100      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
101      */
102     public static com.liferay.portal.model.PortletItem update(
103         com.liferay.portal.model.PortletItem portletItem)
104         throws com.liferay.portal.SystemException {
105         return getPersistence().update(portletItem);
106     }
107 
108     public static com.liferay.portal.model.PortletItem updateImpl(
109         com.liferay.portal.model.PortletItem portletItem, boolean merge)
110         throws com.liferay.portal.SystemException {
111         return getPersistence().updateImpl(portletItem, merge);
112     }
113 
114     public static com.liferay.portal.model.PortletItem findByPrimaryKey(
115         long portletItemId)
116         throws com.liferay.portal.NoSuchPortletItemException,
117             com.liferay.portal.SystemException {
118         return getPersistence().findByPrimaryKey(portletItemId);
119     }
120 
121     public static com.liferay.portal.model.PortletItem fetchByPrimaryKey(
122         long portletItemId) throws com.liferay.portal.SystemException {
123         return getPersistence().fetchByPrimaryKey(portletItemId);
124     }
125 
126     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_C(
127         long groupId, long classNameId)
128         throws com.liferay.portal.SystemException {
129         return getPersistence().findByG_C(groupId, classNameId);
130     }
131 
132     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_C(
133         long groupId, long classNameId, int start, int end)
134         throws com.liferay.portal.SystemException {
135         return getPersistence().findByG_C(groupId, classNameId, start, end);
136     }
137 
138     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_C(
139         long groupId, long classNameId, int start, int end,
140         com.liferay.portal.kernel.util.OrderByComparator obc)
141         throws com.liferay.portal.SystemException {
142         return getPersistence().findByG_C(groupId, classNameId, start, end, obc);
143     }
144 
145     public static com.liferay.portal.model.PortletItem findByG_C_First(
146         long groupId, long classNameId,
147         com.liferay.portal.kernel.util.OrderByComparator obc)
148         throws com.liferay.portal.NoSuchPortletItemException,
149             com.liferay.portal.SystemException {
150         return getPersistence().findByG_C_First(groupId, classNameId, obc);
151     }
152 
153     public static com.liferay.portal.model.PortletItem findByG_C_Last(
154         long groupId, long classNameId,
155         com.liferay.portal.kernel.util.OrderByComparator obc)
156         throws com.liferay.portal.NoSuchPortletItemException,
157             com.liferay.portal.SystemException {
158         return getPersistence().findByG_C_Last(groupId, classNameId, obc);
159     }
160 
161     public static com.liferay.portal.model.PortletItem[] findByG_C_PrevAndNext(
162         long portletItemId, long groupId, long classNameId,
163         com.liferay.portal.kernel.util.OrderByComparator obc)
164         throws com.liferay.portal.NoSuchPortletItemException,
165             com.liferay.portal.SystemException {
166         return getPersistence()
167                    .findByG_C_PrevAndNext(portletItemId, groupId, classNameId,
168             obc);
169     }
170 
171     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C(
172         long groupId, java.lang.String portletId, long classNameId)
173         throws com.liferay.portal.SystemException {
174         return getPersistence().findByG_P_C(groupId, portletId, classNameId);
175     }
176 
177     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C(
178         long groupId, java.lang.String portletId, long classNameId, int start,
179         int end) throws com.liferay.portal.SystemException {
180         return getPersistence()
181                    .findByG_P_C(groupId, portletId, classNameId, start, end);
182     }
183 
184     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C(
185         long groupId, java.lang.String portletId, long classNameId, int start,
186         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
187         throws com.liferay.portal.SystemException {
188         return getPersistence()
189                    .findByG_P_C(groupId, portletId, classNameId, start, end, obc);
190     }
191 
192     public static com.liferay.portal.model.PortletItem findByG_P_C_First(
193         long groupId, java.lang.String portletId, long classNameId,
194         com.liferay.portal.kernel.util.OrderByComparator obc)
195         throws com.liferay.portal.NoSuchPortletItemException,
196             com.liferay.portal.SystemException {
197         return getPersistence()
198                    .findByG_P_C_First(groupId, portletId, classNameId, obc);
199     }
200 
201     public static com.liferay.portal.model.PortletItem findByG_P_C_Last(
202         long groupId, java.lang.String portletId, long classNameId,
203         com.liferay.portal.kernel.util.OrderByComparator obc)
204         throws com.liferay.portal.NoSuchPortletItemException,
205             com.liferay.portal.SystemException {
206         return getPersistence()
207                    .findByG_P_C_Last(groupId, portletId, classNameId, obc);
208     }
209 
210     public static com.liferay.portal.model.PortletItem[] findByG_P_C_PrevAndNext(
211         long portletItemId, long groupId, java.lang.String portletId,
212         long classNameId, com.liferay.portal.kernel.util.OrderByComparator obc)
213         throws com.liferay.portal.NoSuchPortletItemException,
214             com.liferay.portal.SystemException {
215         return getPersistence()
216                    .findByG_P_C_PrevAndNext(portletItemId, groupId, portletId,
217             classNameId, obc);
218     }
219 
220     public static com.liferay.portal.model.PortletItem findByG_N_P_C(
221         long groupId, java.lang.String name, java.lang.String portletId,
222         long classNameId)
223         throws com.liferay.portal.NoSuchPortletItemException,
224             com.liferay.portal.SystemException {
225         return getPersistence()
226                    .findByG_N_P_C(groupId, name, portletId, classNameId);
227     }
228 
229     public static com.liferay.portal.model.PortletItem fetchByG_N_P_C(
230         long groupId, java.lang.String name, java.lang.String portletId,
231         long classNameId) throws com.liferay.portal.SystemException {
232         return getPersistence()
233                    .fetchByG_N_P_C(groupId, name, portletId, classNameId);
234     }
235 
236     public static com.liferay.portal.model.PortletItem fetchByG_N_P_C(
237         long groupId, java.lang.String name, java.lang.String portletId,
238         long classNameId, boolean retrieveFromCache)
239         throws com.liferay.portal.SystemException {
240         return getPersistence()
241                    .fetchByG_N_P_C(groupId, name, portletId, classNameId,
242             retrieveFromCache);
243     }
244 
245     public static java.util.List<com.liferay.portal.model.PortletItem> findAll()
246         throws com.liferay.portal.SystemException {
247         return getPersistence().findAll();
248     }
249 
250     public static java.util.List<com.liferay.portal.model.PortletItem> findAll(
251         int start, int end) throws com.liferay.portal.SystemException {
252         return getPersistence().findAll(start, end);
253     }
254 
255     public static java.util.List<com.liferay.portal.model.PortletItem> findAll(
256         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
257         throws com.liferay.portal.SystemException {
258         return getPersistence().findAll(start, end, obc);
259     }
260 
261     public static void removeByG_C(long groupId, long classNameId)
262         throws com.liferay.portal.SystemException {
263         getPersistence().removeByG_C(groupId, classNameId);
264     }
265 
266     public static void removeByG_P_C(long groupId, java.lang.String portletId,
267         long classNameId) throws com.liferay.portal.SystemException {
268         getPersistence().removeByG_P_C(groupId, portletId, classNameId);
269     }
270 
271     public static void removeByG_N_P_C(long groupId, java.lang.String name,
272         java.lang.String portletId, long classNameId)
273         throws com.liferay.portal.NoSuchPortletItemException,
274             com.liferay.portal.SystemException {
275         getPersistence().removeByG_N_P_C(groupId, name, portletId, classNameId);
276     }
277 
278     public static void removeAll() throws com.liferay.portal.SystemException {
279         getPersistence().removeAll();
280     }
281 
282     public static int countByG_C(long groupId, long classNameId)
283         throws com.liferay.portal.SystemException {
284         return getPersistence().countByG_C(groupId, classNameId);
285     }
286 
287     public static int countByG_P_C(long groupId, java.lang.String portletId,
288         long classNameId) throws com.liferay.portal.SystemException {
289         return getPersistence().countByG_P_C(groupId, portletId, classNameId);
290     }
291 
292     public static int countByG_N_P_C(long groupId, java.lang.String name,
293         java.lang.String portletId, long classNameId)
294         throws com.liferay.portal.SystemException {
295         return getPersistence()
296                    .countByG_N_P_C(groupId, name, portletId, classNameId);
297     }
298 
299     public static int countAll() throws com.liferay.portal.SystemException {
300         return getPersistence().countAll();
301     }
302 
303     public static PortletItemPersistence getPersistence() {
304         if (_persistence == null) {
305             _persistence = (PortletItemPersistence)PortalBeanLocatorUtil.locate(PortletItemPersistence.class.getName());
306         }
307 
308         return _persistence;
309     }
310 
311     public void setPersistence(PortletItemPersistence persistence) {
312         _persistence = persistence;
313     }
314 
315     private static PortletItemPersistence _persistence;
316 }