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 orderByComparator)
141         throws com.liferay.portal.SystemException {
142         return getPersistence()
143                    .findByG_C(groupId, classNameId, start, end,
144             orderByComparator);
145     }
146 
147     public static com.liferay.portal.model.PortletItem findByG_C_First(
148         long groupId, long classNameId,
149         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
150         throws com.liferay.portal.NoSuchPortletItemException,
151             com.liferay.portal.SystemException {
152         return getPersistence()
153                    .findByG_C_First(groupId, classNameId, orderByComparator);
154     }
155 
156     public static com.liferay.portal.model.PortletItem findByG_C_Last(
157         long groupId, long classNameId,
158         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
159         throws com.liferay.portal.NoSuchPortletItemException,
160             com.liferay.portal.SystemException {
161         return getPersistence()
162                    .findByG_C_Last(groupId, classNameId, orderByComparator);
163     }
164 
165     public static com.liferay.portal.model.PortletItem[] findByG_C_PrevAndNext(
166         long portletItemId, long groupId, long classNameId,
167         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
168         throws com.liferay.portal.NoSuchPortletItemException,
169             com.liferay.portal.SystemException {
170         return getPersistence()
171                    .findByG_C_PrevAndNext(portletItemId, groupId, classNameId,
172             orderByComparator);
173     }
174 
175     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C(
176         long groupId, java.lang.String portletId, long classNameId)
177         throws com.liferay.portal.SystemException {
178         return getPersistence().findByG_P_C(groupId, portletId, classNameId);
179     }
180 
181     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C(
182         long groupId, java.lang.String portletId, long classNameId, int start,
183         int end) throws com.liferay.portal.SystemException {
184         return getPersistence()
185                    .findByG_P_C(groupId, portletId, classNameId, start, end);
186     }
187 
188     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C(
189         long groupId, java.lang.String portletId, long classNameId, int start,
190         int end,
191         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
192         throws com.liferay.portal.SystemException {
193         return getPersistence()
194                    .findByG_P_C(groupId, portletId, classNameId, start, end,
195             orderByComparator);
196     }
197 
198     public static com.liferay.portal.model.PortletItem findByG_P_C_First(
199         long groupId, java.lang.String portletId, long classNameId,
200         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
201         throws com.liferay.portal.NoSuchPortletItemException,
202             com.liferay.portal.SystemException {
203         return getPersistence()
204                    .findByG_P_C_First(groupId, portletId, classNameId,
205             orderByComparator);
206     }
207 
208     public static com.liferay.portal.model.PortletItem findByG_P_C_Last(
209         long groupId, java.lang.String portletId, long classNameId,
210         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
211         throws com.liferay.portal.NoSuchPortletItemException,
212             com.liferay.portal.SystemException {
213         return getPersistence()
214                    .findByG_P_C_Last(groupId, portletId, classNameId,
215             orderByComparator);
216     }
217 
218     public static com.liferay.portal.model.PortletItem[] findByG_P_C_PrevAndNext(
219         long portletItemId, long groupId, java.lang.String portletId,
220         long classNameId,
221         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
222         throws com.liferay.portal.NoSuchPortletItemException,
223             com.liferay.portal.SystemException {
224         return getPersistence()
225                    .findByG_P_C_PrevAndNext(portletItemId, groupId, portletId,
226             classNameId, orderByComparator);
227     }
228 
229     public static com.liferay.portal.model.PortletItem findByG_N_P_C(
230         long groupId, java.lang.String name, java.lang.String portletId,
231         long classNameId)
232         throws com.liferay.portal.NoSuchPortletItemException,
233             com.liferay.portal.SystemException {
234         return getPersistence()
235                    .findByG_N_P_C(groupId, name, portletId, classNameId);
236     }
237 
238     public static com.liferay.portal.model.PortletItem fetchByG_N_P_C(
239         long groupId, java.lang.String name, java.lang.String portletId,
240         long classNameId) throws com.liferay.portal.SystemException {
241         return getPersistence()
242                    .fetchByG_N_P_C(groupId, name, portletId, classNameId);
243     }
244 
245     public static com.liferay.portal.model.PortletItem fetchByG_N_P_C(
246         long groupId, java.lang.String name, java.lang.String portletId,
247         long classNameId, boolean retrieveFromCache)
248         throws com.liferay.portal.SystemException {
249         return getPersistence()
250                    .fetchByG_N_P_C(groupId, name, portletId, classNameId,
251             retrieveFromCache);
252     }
253 
254     public static java.util.List<com.liferay.portal.model.PortletItem> findAll()
255         throws com.liferay.portal.SystemException {
256         return getPersistence().findAll();
257     }
258 
259     public static java.util.List<com.liferay.portal.model.PortletItem> findAll(
260         int start, int end) throws com.liferay.portal.SystemException {
261         return getPersistence().findAll(start, end);
262     }
263 
264     public static java.util.List<com.liferay.portal.model.PortletItem> findAll(
265         int start, int end,
266         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
267         throws com.liferay.portal.SystemException {
268         return getPersistence().findAll(start, end, orderByComparator);
269     }
270 
271     public static void removeByG_C(long groupId, long classNameId)
272         throws com.liferay.portal.SystemException {
273         getPersistence().removeByG_C(groupId, classNameId);
274     }
275 
276     public static void removeByG_P_C(long groupId, java.lang.String portletId,
277         long classNameId) throws com.liferay.portal.SystemException {
278         getPersistence().removeByG_P_C(groupId, portletId, classNameId);
279     }
280 
281     public static void removeByG_N_P_C(long groupId, java.lang.String name,
282         java.lang.String portletId, long classNameId)
283         throws com.liferay.portal.NoSuchPortletItemException,
284             com.liferay.portal.SystemException {
285         getPersistence().removeByG_N_P_C(groupId, name, portletId, classNameId);
286     }
287 
288     public static void removeAll() throws com.liferay.portal.SystemException {
289         getPersistence().removeAll();
290     }
291 
292     public static int countByG_C(long groupId, long classNameId)
293         throws com.liferay.portal.SystemException {
294         return getPersistence().countByG_C(groupId, classNameId);
295     }
296 
297     public static int countByG_P_C(long groupId, java.lang.String portletId,
298         long classNameId) throws com.liferay.portal.SystemException {
299         return getPersistence().countByG_P_C(groupId, portletId, classNameId);
300     }
301 
302     public static int countByG_N_P_C(long groupId, java.lang.String name,
303         java.lang.String portletId, long classNameId)
304         throws com.liferay.portal.SystemException {
305         return getPersistence()
306                    .countByG_N_P_C(groupId, name, portletId, classNameId);
307     }
308 
309     public static int countAll() throws com.liferay.portal.SystemException {
310         return getPersistence().countAll();
311     }
312 
313     public static PortletItemPersistence getPersistence() {
314         if (_persistence == null) {
315             _persistence = (PortletItemPersistence)PortalBeanLocatorUtil.locate(PortletItemPersistence.class.getName());
316         }
317 
318         return _persistence;
319     }
320 
321     public void setPersistence(PortletItemPersistence persistence) {
322         _persistence = persistence;
323     }
324 
325     private static PortletItemPersistence _persistence;
326 }