1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.service.persistence;
24  
25  import com.liferay.portal.SystemException;
26  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
27  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
28  import com.liferay.portal.model.PortletItem;
29  
30  import java.util.List;
31  
32  /**
33   * <a href="PortletItemUtil.java.html"><b><i>View Source</i></b></a>
34   *
35   * <p>
36   * ServiceBuilder generated this class. Modifications in this class will be
37   * overwritten the next time is generated.
38   * </p>
39   *
40   * @author    Brian Wing Shun Chan
41   * @see       PortletItemPersistence
42   * @see       PortletItemPersistenceImpl
43   * @generated
44   */
45  public class PortletItemUtil {
46      /**
47       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
48       */
49      public static void clearCache() {
50          getPersistence().clearCache();
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
55       */
56      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
57          throws SystemException {
58          return getPersistence().findWithDynamicQuery(dynamicQuery);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
63       */
64      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
65          int start, int end) throws SystemException {
66          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
71       */
72      public static PortletItem remove(PortletItem portletItem)
73          throws SystemException {
74          return getPersistence().remove(portletItem);
75      }
76  
77      /**
78       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
79       */
80      public static PortletItem update(PortletItem portletItem, boolean merge)
81          throws SystemException {
82          return getPersistence().update(portletItem, merge);
83      }
84  
85      public static void cacheResult(
86          com.liferay.portal.model.PortletItem portletItem) {
87          getPersistence().cacheResult(portletItem);
88      }
89  
90      public static void cacheResult(
91          java.util.List<com.liferay.portal.model.PortletItem> portletItems) {
92          getPersistence().cacheResult(portletItems);
93      }
94  
95      public static com.liferay.portal.model.PortletItem create(
96          long portletItemId) {
97          return getPersistence().create(portletItemId);
98      }
99  
100     public static com.liferay.portal.model.PortletItem remove(
101         long portletItemId)
102         throws com.liferay.portal.NoSuchPortletItemException,
103             com.liferay.portal.SystemException {
104         return getPersistence().remove(portletItemId);
105     }
106 
107     /**
108      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
109      */
110     public static com.liferay.portal.model.PortletItem update(
111         com.liferay.portal.model.PortletItem portletItem)
112         throws com.liferay.portal.SystemException {
113         return getPersistence().update(portletItem);
114     }
115 
116     public static com.liferay.portal.model.PortletItem updateImpl(
117         com.liferay.portal.model.PortletItem portletItem, boolean merge)
118         throws com.liferay.portal.SystemException {
119         return getPersistence().updateImpl(portletItem, merge);
120     }
121 
122     public static com.liferay.portal.model.PortletItem findByPrimaryKey(
123         long portletItemId)
124         throws com.liferay.portal.NoSuchPortletItemException,
125             com.liferay.portal.SystemException {
126         return getPersistence().findByPrimaryKey(portletItemId);
127     }
128 
129     public static com.liferay.portal.model.PortletItem fetchByPrimaryKey(
130         long portletItemId) throws com.liferay.portal.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.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.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 obc)
149         throws com.liferay.portal.SystemException {
150         return getPersistence().findByG_C(groupId, classNameId, start, end, obc);
151     }
152 
153     public static com.liferay.portal.model.PortletItem findByG_C_First(
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_First(groupId, classNameId, obc);
159     }
160 
161     public static com.liferay.portal.model.PortletItem findByG_C_Last(
162         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().findByG_C_Last(groupId, classNameId, obc);
167     }
168 
169     public static com.liferay.portal.model.PortletItem[] findByG_C_PrevAndNext(
170         long portletItemId, long groupId, long classNameId,
171         com.liferay.portal.kernel.util.OrderByComparator obc)
172         throws com.liferay.portal.NoSuchPortletItemException,
173             com.liferay.portal.SystemException {
174         return getPersistence()
175                    .findByG_C_PrevAndNext(portletItemId, groupId, classNameId,
176             obc);
177     }
178 
179     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C(
180         long groupId, java.lang.String portletId, long classNameId)
181         throws com.liferay.portal.SystemException {
182         return getPersistence().findByG_P_C(groupId, portletId, classNameId);
183     }
184 
185     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C(
186         long groupId, java.lang.String portletId, long classNameId, int start,
187         int end) throws com.liferay.portal.SystemException {
188         return getPersistence()
189                    .findByG_P_C(groupId, portletId, classNameId, start, end);
190     }
191 
192     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C(
193         long groupId, java.lang.String portletId, long classNameId, int start,
194         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
195         throws com.liferay.portal.SystemException {
196         return getPersistence()
197                    .findByG_P_C(groupId, portletId, classNameId, start, end, obc);
198     }
199 
200     public static com.liferay.portal.model.PortletItem findByG_P_C_First(
201         long groupId, java.lang.String portletId, long classNameId,
202         com.liferay.portal.kernel.util.OrderByComparator obc)
203         throws com.liferay.portal.NoSuchPortletItemException,
204             com.liferay.portal.SystemException {
205         return getPersistence()
206                    .findByG_P_C_First(groupId, portletId, classNameId, obc);
207     }
208 
209     public static com.liferay.portal.model.PortletItem findByG_P_C_Last(
210         long groupId, java.lang.String portletId, long classNameId,
211         com.liferay.portal.kernel.util.OrderByComparator obc)
212         throws com.liferay.portal.NoSuchPortletItemException,
213             com.liferay.portal.SystemException {
214         return getPersistence()
215                    .findByG_P_C_Last(groupId, portletId, classNameId, obc);
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, com.liferay.portal.kernel.util.OrderByComparator obc)
221         throws com.liferay.portal.NoSuchPortletItemException,
222             com.liferay.portal.SystemException {
223         return getPersistence()
224                    .findByG_P_C_PrevAndNext(portletItemId, groupId, portletId,
225             classNameId, obc);
226     }
227 
228     public static com.liferay.portal.model.PortletItem findByG_N_P_C(
229         long groupId, java.lang.String name, java.lang.String portletId,
230         long classNameId)
231         throws com.liferay.portal.NoSuchPortletItemException,
232             com.liferay.portal.SystemException {
233         return getPersistence()
234                    .findByG_N_P_C(groupId, name, portletId, classNameId);
235     }
236 
237     public static com.liferay.portal.model.PortletItem fetchByG_N_P_C(
238         long groupId, java.lang.String name, java.lang.String portletId,
239         long classNameId) throws com.liferay.portal.SystemException {
240         return getPersistence()
241                    .fetchByG_N_P_C(groupId, name, portletId, classNameId);
242     }
243 
244     public static com.liferay.portal.model.PortletItem fetchByG_N_P_C(
245         long groupId, java.lang.String name, java.lang.String portletId,
246         long classNameId, boolean retrieveFromCache)
247         throws com.liferay.portal.SystemException {
248         return getPersistence()
249                    .fetchByG_N_P_C(groupId, name, portletId, classNameId,
250             retrieveFromCache);
251     }
252 
253     public static java.util.List<com.liferay.portal.model.PortletItem> findAll()
254         throws com.liferay.portal.SystemException {
255         return getPersistence().findAll();
256     }
257 
258     public static java.util.List<com.liferay.portal.model.PortletItem> findAll(
259         int start, int end) throws com.liferay.portal.SystemException {
260         return getPersistence().findAll(start, end);
261     }
262 
263     public static java.util.List<com.liferay.portal.model.PortletItem> findAll(
264         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
265         throws com.liferay.portal.SystemException {
266         return getPersistence().findAll(start, end, obc);
267     }
268 
269     public static void removeByG_C(long groupId, long classNameId)
270         throws com.liferay.portal.SystemException {
271         getPersistence().removeByG_C(groupId, classNameId);
272     }
273 
274     public static void removeByG_P_C(long groupId, java.lang.String portletId,
275         long classNameId) throws com.liferay.portal.SystemException {
276         getPersistence().removeByG_P_C(groupId, portletId, classNameId);
277     }
278 
279     public static void removeByG_N_P_C(long groupId, java.lang.String name,
280         java.lang.String portletId, long classNameId)
281         throws com.liferay.portal.NoSuchPortletItemException,
282             com.liferay.portal.SystemException {
283         getPersistence().removeByG_N_P_C(groupId, name, portletId, classNameId);
284     }
285 
286     public static void removeAll() throws com.liferay.portal.SystemException {
287         getPersistence().removeAll();
288     }
289 
290     public static int countByG_C(long groupId, long classNameId)
291         throws com.liferay.portal.SystemException {
292         return getPersistence().countByG_C(groupId, classNameId);
293     }
294 
295     public static int countByG_P_C(long groupId, java.lang.String portletId,
296         long classNameId) throws com.liferay.portal.SystemException {
297         return getPersistence().countByG_P_C(groupId, portletId, classNameId);
298     }
299 
300     public static int countByG_N_P_C(long groupId, java.lang.String name,
301         java.lang.String portletId, long classNameId)
302         throws com.liferay.portal.SystemException {
303         return getPersistence()
304                    .countByG_N_P_C(groupId, name, portletId, classNameId);
305     }
306 
307     public static int countAll() throws com.liferay.portal.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 }