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  
26  /**
27   * <a href="PortletItemUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * @author    Brian Wing Shun Chan
35   * @see       PortletItemPersistence
36   * @see       PortletItemPersistenceImpl
37   * @generated
38   */
39  public class PortletItemUtil {
40      public static void cacheResult(
41          com.liferay.portal.model.PortletItem portletItem) {
42          getPersistence().cacheResult(portletItem);
43      }
44  
45      public static void cacheResult(
46          java.util.List<com.liferay.portal.model.PortletItem> portletItems) {
47          getPersistence().cacheResult(portletItems);
48      }
49  
50      public static void clearCache() {
51          getPersistence().clearCache();
52      }
53  
54      public static com.liferay.portal.model.PortletItem create(
55          long portletItemId) {
56          return getPersistence().create(portletItemId);
57      }
58  
59      public static com.liferay.portal.model.PortletItem remove(
60          long portletItemId)
61          throws com.liferay.portal.NoSuchPortletItemException,
62              com.liferay.portal.SystemException {
63          return getPersistence().remove(portletItemId);
64      }
65  
66      public static com.liferay.portal.model.PortletItem remove(
67          com.liferay.portal.model.PortletItem portletItem)
68          throws com.liferay.portal.SystemException {
69          return getPersistence().remove(portletItem);
70      }
71  
72      /**
73       * @deprecated Use {@link #update(PortletItem, boolean merge)}.
74       */
75      public static com.liferay.portal.model.PortletItem update(
76          com.liferay.portal.model.PortletItem portletItem)
77          throws com.liferay.portal.SystemException {
78          return getPersistence().update(portletItem);
79      }
80  
81      /**
82       * Add, update, or merge, the entity. This method also calls the model
83       * listeners to trigger the proper events associated with adding, deleting,
84       * or updating an entity.
85       *
86       * @param  portletItem the entity to add, update, or merge
87       * @param  merge boolean value for whether to merge the entity. The default
88       *         value is false. Setting merge to true is more expensive and
89       *         should only be true when portletItem is transient. See
90       *         LEP-5473 for a detailed discussion of this method.
91       * @return the entity that was added, updated, or merged
92       */
93      public static com.liferay.portal.model.PortletItem update(
94          com.liferay.portal.model.PortletItem portletItem, boolean merge)
95          throws com.liferay.portal.SystemException {
96          return getPersistence().update(portletItem, merge);
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.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.SystemException {
109         return getPersistence().findByPrimaryKey(portletItemId);
110     }
111 
112     public static com.liferay.portal.model.PortletItem fetchByPrimaryKey(
113         long portletItemId) throws com.liferay.portal.SystemException {
114         return getPersistence().fetchByPrimaryKey(portletItemId);
115     }
116 
117     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_C(
118         long groupId, long classNameId)
119         throws com.liferay.portal.SystemException {
120         return getPersistence().findByG_C(groupId, classNameId);
121     }
122 
123     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_C(
124         long groupId, long classNameId, int start, int end)
125         throws com.liferay.portal.SystemException {
126         return getPersistence().findByG_C(groupId, classNameId, start, end);
127     }
128 
129     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_C(
130         long groupId, long classNameId, int start, int end,
131         com.liferay.portal.kernel.util.OrderByComparator obc)
132         throws com.liferay.portal.SystemException {
133         return getPersistence().findByG_C(groupId, classNameId, start, end, obc);
134     }
135 
136     public static com.liferay.portal.model.PortletItem findByG_C_First(
137         long groupId, long classNameId,
138         com.liferay.portal.kernel.util.OrderByComparator obc)
139         throws com.liferay.portal.NoSuchPortletItemException,
140             com.liferay.portal.SystemException {
141         return getPersistence().findByG_C_First(groupId, classNameId, obc);
142     }
143 
144     public static com.liferay.portal.model.PortletItem findByG_C_Last(
145         long groupId, long classNameId,
146         com.liferay.portal.kernel.util.OrderByComparator obc)
147         throws com.liferay.portal.NoSuchPortletItemException,
148             com.liferay.portal.SystemException {
149         return getPersistence().findByG_C_Last(groupId, classNameId, obc);
150     }
151 
152     public static com.liferay.portal.model.PortletItem[] findByG_C_PrevAndNext(
153         long portletItemId, long groupId, long classNameId,
154         com.liferay.portal.kernel.util.OrderByComparator obc)
155         throws com.liferay.portal.NoSuchPortletItemException,
156             com.liferay.portal.SystemException {
157         return getPersistence()
158                    .findByG_C_PrevAndNext(portletItemId, groupId, classNameId,
159             obc);
160     }
161 
162     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C(
163         long groupId, java.lang.String portletId, long classNameId)
164         throws com.liferay.portal.SystemException {
165         return getPersistence().findByG_P_C(groupId, portletId, classNameId);
166     }
167 
168     public static java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C(
169         long groupId, java.lang.String portletId, long classNameId, int start,
170         int end) throws com.liferay.portal.SystemException {
171         return getPersistence()
172                    .findByG_P_C(groupId, portletId, classNameId, start, end);
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, int start,
177         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
178         throws com.liferay.portal.SystemException {
179         return getPersistence()
180                    .findByG_P_C(groupId, portletId, classNameId, start, end, obc);
181     }
182 
183     public static com.liferay.portal.model.PortletItem findByG_P_C_First(
184         long groupId, java.lang.String portletId, long classNameId,
185         com.liferay.portal.kernel.util.OrderByComparator obc)
186         throws com.liferay.portal.NoSuchPortletItemException,
187             com.liferay.portal.SystemException {
188         return getPersistence()
189                    .findByG_P_C_First(groupId, portletId, classNameId, obc);
190     }
191 
192     public static com.liferay.portal.model.PortletItem findByG_P_C_Last(
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_Last(groupId, portletId, classNameId, obc);
199     }
200 
201     public static com.liferay.portal.model.PortletItem[] findByG_P_C_PrevAndNext(
202         long portletItemId, long groupId, java.lang.String portletId,
203         long classNameId, 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_PrevAndNext(portletItemId, groupId, portletId,
208             classNameId, obc);
209     }
210 
211     public static com.liferay.portal.model.PortletItem findByG_N_P_C(
212         long groupId, java.lang.String name, java.lang.String portletId,
213         long classNameId)
214         throws com.liferay.portal.NoSuchPortletItemException,
215             com.liferay.portal.SystemException {
216         return getPersistence()
217                    .findByG_N_P_C(groupId, name, portletId, classNameId);
218     }
219 
220     public static com.liferay.portal.model.PortletItem fetchByG_N_P_C(
221         long groupId, java.lang.String name, java.lang.String portletId,
222         long classNameId) throws com.liferay.portal.SystemException {
223         return getPersistence()
224                    .fetchByG_N_P_C(groupId, name, portletId, classNameId);
225     }
226 
227     public static com.liferay.portal.model.PortletItem fetchByG_N_P_C(
228         long groupId, java.lang.String name, java.lang.String portletId,
229         long classNameId, boolean retrieveFromCache)
230         throws com.liferay.portal.SystemException {
231         return getPersistence()
232                    .fetchByG_N_P_C(groupId, name, portletId, classNameId,
233             retrieveFromCache);
234     }
235 
236     public static java.util.List<Object> findWithDynamicQuery(
237         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
238         throws com.liferay.portal.SystemException {
239         return getPersistence().findWithDynamicQuery(dynamicQuery);
240     }
241 
242     public static java.util.List<Object> findWithDynamicQuery(
243         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
244         int end) throws com.liferay.portal.SystemException {
245         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
246     }
247 
248     public static java.util.List<com.liferay.portal.model.PortletItem> findAll()
249         throws com.liferay.portal.SystemException {
250         return getPersistence().findAll();
251     }
252 
253     public static java.util.List<com.liferay.portal.model.PortletItem> findAll(
254         int start, int end) throws com.liferay.portal.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, com.liferay.portal.kernel.util.OrderByComparator obc)
260         throws com.liferay.portal.SystemException {
261         return getPersistence().findAll(start, end, obc);
262     }
263 
264     public static void removeByG_C(long groupId, long classNameId)
265         throws com.liferay.portal.SystemException {
266         getPersistence().removeByG_C(groupId, classNameId);
267     }
268 
269     public static void removeByG_P_C(long groupId, java.lang.String portletId,
270         long classNameId) throws com.liferay.portal.SystemException {
271         getPersistence().removeByG_P_C(groupId, portletId, classNameId);
272     }
273 
274     public static void removeByG_N_P_C(long groupId, java.lang.String name,
275         java.lang.String portletId, long classNameId)
276         throws com.liferay.portal.NoSuchPortletItemException,
277             com.liferay.portal.SystemException {
278         getPersistence().removeByG_N_P_C(groupId, name, portletId, classNameId);
279     }
280 
281     public static void removeAll() throws com.liferay.portal.SystemException {
282         getPersistence().removeAll();
283     }
284 
285     public static int countByG_C(long groupId, long classNameId)
286         throws com.liferay.portal.SystemException {
287         return getPersistence().countByG_C(groupId, classNameId);
288     }
289 
290     public static int countByG_P_C(long groupId, java.lang.String portletId,
291         long classNameId) throws com.liferay.portal.SystemException {
292         return getPersistence().countByG_P_C(groupId, portletId, classNameId);
293     }
294 
295     public static int countByG_N_P_C(long groupId, java.lang.String name,
296         java.lang.String portletId, long classNameId)
297         throws com.liferay.portal.SystemException {
298         return getPersistence()
299                    .countByG_N_P_C(groupId, name, portletId, classNameId);
300     }
301 
302     public static int countAll() throws com.liferay.portal.SystemException {
303         return getPersistence().countAll();
304     }
305 
306     public static PortletItemPersistence getPersistence() {
307         return _persistence;
308     }
309 
310     public void setPersistence(PortletItemPersistence persistence) {
311         _persistence = persistence;
312     }
313 
314     private static PortletItemPersistence _persistence;
315 }