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#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.kernel.exception.SystemException {
96          return getPersistence().remove(portletItemId);
97      }
98  
99      public static com.liferay.portal.model.PortletItem updateImpl(
100         com.liferay.portal.model.PortletItem portletItem, boolean merge)
101         throws com.liferay.portal.kernel.exception.SystemException {
102         return getPersistence().updateImpl(portletItem, merge);
103     }
104 
105     public static com.liferay.portal.model.PortletItem findByPrimaryKey(
106         long portletItemId)
107         throws com.liferay.portal.NoSuchPortletItemException,
108             com.liferay.portal.kernel.exception.SystemException {
109         return getPersistence().findByPrimaryKey(portletItemId);
110     }
111 
112     public static com.liferay.portal.model.PortletItem fetchByPrimaryKey(
113         long portletItemId)
114         throws com.liferay.portal.kernel.exception.SystemException {
115         return getPersistence().fetchByPrimaryKey(portletItemId);
116     }
117 
118     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_C(
119         long groupId, long classNameId)
120         throws com.liferay.portal.kernel.exception.SystemException {
121         return getPersistence().findByG_C(groupId, classNameId);
122     }
123 
124     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_C(
125         long groupId, long classNameId, int start, int end)
126         throws com.liferay.portal.kernel.exception.SystemException {
127         return getPersistence().findByG_C(groupId, classNameId, start, end);
128     }
129 
130     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_C(
131         long groupId, long classNameId, int start, int end,
132         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
133         throws com.liferay.portal.kernel.exception.SystemException {
134         return getPersistence()
135                    .findByG_C(groupId, classNameId, start, end,
136             orderByComparator);
137     }
138 
139     public static com.liferay.portal.model.PortletItem findByG_C_First(
140         long groupId, long classNameId,
141         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
142         throws com.liferay.portal.NoSuchPortletItemException,
143             com.liferay.portal.kernel.exception.SystemException {
144         return getPersistence()
145                    .findByG_C_First(groupId, classNameId, orderByComparator);
146     }
147 
148     public static com.liferay.portal.model.PortletItem findByG_C_Last(
149         long groupId, long classNameId,
150         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
151         throws com.liferay.portal.NoSuchPortletItemException,
152             com.liferay.portal.kernel.exception.SystemException {
153         return getPersistence()
154                    .findByG_C_Last(groupId, classNameId, orderByComparator);
155     }
156 
157     public static com.liferay.portal.model.PortletItem[] findByG_C_PrevAndNext(
158         long portletItemId, long groupId, long classNameId,
159         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
160         throws com.liferay.portal.NoSuchPortletItemException,
161             com.liferay.portal.kernel.exception.SystemException {
162         return getPersistence()
163                    .findByG_C_PrevAndNext(portletItemId, groupId, classNameId,
164             orderByComparator);
165     }
166 
167     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C(
168         long groupId, java.lang.String portletId, long classNameId)
169         throws com.liferay.portal.kernel.exception.SystemException {
170         return getPersistence().findByG_P_C(groupId, portletId, classNameId);
171     }
172 
173     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C(
174         long groupId, java.lang.String portletId, long classNameId, int start,
175         int end) throws com.liferay.portal.kernel.exception.SystemException {
176         return getPersistence()
177                    .findByG_P_C(groupId, portletId, classNameId, start, end);
178     }
179 
180     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C(
181         long groupId, java.lang.String portletId, long classNameId, int start,
182         int end,
183         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
184         throws com.liferay.portal.kernel.exception.SystemException {
185         return getPersistence()
186                    .findByG_P_C(groupId, portletId, classNameId, start, end,
187             orderByComparator);
188     }
189 
190     public static com.liferay.portal.model.PortletItem findByG_P_C_First(
191         long groupId, java.lang.String portletId, long classNameId,
192         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
193         throws com.liferay.portal.NoSuchPortletItemException,
194             com.liferay.portal.kernel.exception.SystemException {
195         return getPersistence()
196                    .findByG_P_C_First(groupId, portletId, classNameId,
197             orderByComparator);
198     }
199 
200     public static com.liferay.portal.model.PortletItem findByG_P_C_Last(
201         long groupId, java.lang.String portletId, long classNameId,
202         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
203         throws com.liferay.portal.NoSuchPortletItemException,
204             com.liferay.portal.kernel.exception.SystemException {
205         return getPersistence()
206                    .findByG_P_C_Last(groupId, portletId, classNameId,
207             orderByComparator);
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,
213         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
214         throws com.liferay.portal.NoSuchPortletItemException,
215             com.liferay.portal.kernel.exception.SystemException {
216         return getPersistence()
217                    .findByG_P_C_PrevAndNext(portletItemId, groupId, portletId,
218             classNameId, orderByComparator);
219     }
220 
221     public static com.liferay.portal.model.PortletItem findByG_N_P_C(
222         long groupId, java.lang.String name, java.lang.String portletId,
223         long classNameId)
224         throws com.liferay.portal.NoSuchPortletItemException,
225             com.liferay.portal.kernel.exception.SystemException {
226         return getPersistence()
227                    .findByG_N_P_C(groupId, name, portletId, classNameId);
228     }
229 
230     public static com.liferay.portal.model.PortletItem fetchByG_N_P_C(
231         long groupId, java.lang.String name, java.lang.String portletId,
232         long classNameId)
233         throws com.liferay.portal.kernel.exception.SystemException {
234         return getPersistence()
235                    .fetchByG_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, boolean retrieveFromCache)
241         throws com.liferay.portal.kernel.exception.SystemException {
242         return getPersistence()
243                    .fetchByG_N_P_C(groupId, name, portletId, classNameId,
244             retrieveFromCache);
245     }
246 
247     public static java.util.List<com.liferay.portal.model.PortletItem> findAll()
248         throws com.liferay.portal.kernel.exception.SystemException {
249         return getPersistence().findAll();
250     }
251 
252     public static java.util.List<com.liferay.portal.model.PortletItem> findAll(
253         int start, int end)
254         throws com.liferay.portal.kernel.exception.SystemException {
255         return getPersistence().findAll(start, end);
256     }
257 
258     public static java.util.List<com.liferay.portal.model.PortletItem> findAll(
259         int start, int end,
260         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
261         throws com.liferay.portal.kernel.exception.SystemException {
262         return getPersistence().findAll(start, end, orderByComparator);
263     }
264 
265     public static void removeByG_C(long groupId, long classNameId)
266         throws com.liferay.portal.kernel.exception.SystemException {
267         getPersistence().removeByG_C(groupId, classNameId);
268     }
269 
270     public static void removeByG_P_C(long groupId, java.lang.String portletId,
271         long classNameId)
272         throws com.liferay.portal.kernel.exception.SystemException {
273         getPersistence().removeByG_P_C(groupId, portletId, classNameId);
274     }
275 
276     public static void removeByG_N_P_C(long groupId, java.lang.String name,
277         java.lang.String portletId, long classNameId)
278         throws com.liferay.portal.NoSuchPortletItemException,
279             com.liferay.portal.kernel.exception.SystemException {
280         getPersistence().removeByG_N_P_C(groupId, name, portletId, classNameId);
281     }
282 
283     public static void removeAll()
284         throws com.liferay.portal.kernel.exception.SystemException {
285         getPersistence().removeAll();
286     }
287 
288     public static int countByG_C(long groupId, long classNameId)
289         throws com.liferay.portal.kernel.exception.SystemException {
290         return getPersistence().countByG_C(groupId, classNameId);
291     }
292 
293     public static int countByG_P_C(long groupId, java.lang.String portletId,
294         long classNameId)
295         throws com.liferay.portal.kernel.exception.SystemException {
296         return getPersistence().countByG_P_C(groupId, portletId, classNameId);
297     }
298 
299     public static int countByG_N_P_C(long groupId, java.lang.String name,
300         java.lang.String portletId, long classNameId)
301         throws com.liferay.portal.kernel.exception.SystemException {
302         return getPersistence()
303                    .countByG_N_P_C(groupId, name, portletId, classNameId);
304     }
305 
306     public static int countAll()
307         throws com.liferay.portal.kernel.exception.SystemException {
308         return getPersistence().countAll();
309     }
310 
311     public static PortletItemPersistence getPersistence() {
312         if (_persistence == null) {
313             _persistence = (PortletItemPersistence)PortalBeanLocatorUtil.locate(PortletItemPersistence.class.getName());
314         }
315 
316         return _persistence;
317     }
318 
319     public void setPersistence(PortletItemPersistence persistence) {
320         _persistence = persistence;
321     }
322 
323     private static PortletItemPersistence _persistence;
324 }