001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.model.PortletItem;
023    import com.liferay.portal.service.ServiceContext;
024    
025    import java.util.List;
026    
027    /**
028     * The persistence utility for the portlet item service. This utility wraps {@link PortletItemPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
029     *
030     * <p>
031     * Caching information and settings can be found in <code>portal.properties</code>
032     * </p>
033     *
034     * @author Brian Wing Shun Chan
035     * @see PortletItemPersistence
036     * @see PortletItemPersistenceImpl
037     * @generated
038     */
039    public class PortletItemUtil {
040            /*
041             * NOTE FOR DEVELOPERS:
042             *
043             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
044             */
045    
046            /**
047             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
048             */
049            public static void clearCache() {
050                    getPersistence().clearCache();
051            }
052    
053            /**
054             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
055             */
056            public static void clearCache(PortletItem portletItem) {
057                    getPersistence().clearCache(portletItem);
058            }
059    
060            /**
061             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
062             */
063            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
064                    throws SystemException {
065                    return getPersistence().countWithDynamicQuery(dynamicQuery);
066            }
067    
068            /**
069             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
070             */
071            public static List<PortletItem> findWithDynamicQuery(
072                    DynamicQuery dynamicQuery) throws SystemException {
073                    return getPersistence().findWithDynamicQuery(dynamicQuery);
074            }
075    
076            /**
077             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
078             */
079            public static List<PortletItem> findWithDynamicQuery(
080                    DynamicQuery dynamicQuery, int start, int end)
081                    throws SystemException {
082                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
083            }
084    
085            /**
086             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
087             */
088            public static List<PortletItem> findWithDynamicQuery(
089                    DynamicQuery dynamicQuery, int start, int end,
090                    OrderByComparator orderByComparator) throws SystemException {
091                    return getPersistence()
092                                       .findWithDynamicQuery(dynamicQuery, start, end,
093                            orderByComparator);
094            }
095    
096            /**
097             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
098             */
099            public static PortletItem remove(PortletItem portletItem)
100                    throws SystemException {
101                    return getPersistence().remove(portletItem);
102            }
103    
104            /**
105             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
106             */
107            public static PortletItem update(PortletItem portletItem, boolean merge)
108                    throws SystemException {
109                    return getPersistence().update(portletItem, merge);
110            }
111    
112            /**
113             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
114             */
115            public static PortletItem update(PortletItem portletItem, boolean merge,
116                    ServiceContext serviceContext) throws SystemException {
117                    return getPersistence().update(portletItem, merge, serviceContext);
118            }
119    
120            /**
121            * Caches the portlet item in the entity cache if it is enabled.
122            *
123            * @param portletItem the portlet item to cache
124            */
125            public static void cacheResult(
126                    com.liferay.portal.model.PortletItem portletItem) {
127                    getPersistence().cacheResult(portletItem);
128            }
129    
130            /**
131            * Caches the portlet items in the entity cache if it is enabled.
132            *
133            * @param portletItems the portlet items to cache
134            */
135            public static void cacheResult(
136                    java.util.List<com.liferay.portal.model.PortletItem> portletItems) {
137                    getPersistence().cacheResult(portletItems);
138            }
139    
140            /**
141            * Creates a new portlet item with the primary key. Does not add the portlet item to the database.
142            *
143            * @param portletItemId the primary key for the new portlet item
144            * @return the new portlet item
145            */
146            public static com.liferay.portal.model.PortletItem create(
147                    long portletItemId) {
148                    return getPersistence().create(portletItemId);
149            }
150    
151            /**
152            * Removes the portlet item with the primary key from the database. Also notifies the appropriate model listeners.
153            *
154            * @param portletItemId the primary key of the portlet item to remove
155            * @return the portlet item that was removed
156            * @throws com.liferay.portal.NoSuchPortletItemException if a portlet item with the primary key could not be found
157            * @throws SystemException if a system exception occurred
158            */
159            public static com.liferay.portal.model.PortletItem remove(
160                    long portletItemId)
161                    throws com.liferay.portal.NoSuchPortletItemException,
162                            com.liferay.portal.kernel.exception.SystemException {
163                    return getPersistence().remove(portletItemId);
164            }
165    
166            public static com.liferay.portal.model.PortletItem updateImpl(
167                    com.liferay.portal.model.PortletItem portletItem, boolean merge)
168                    throws com.liferay.portal.kernel.exception.SystemException {
169                    return getPersistence().updateImpl(portletItem, merge);
170            }
171    
172            /**
173            * Finds the portlet item with the primary key or throws a {@link com.liferay.portal.NoSuchPortletItemException} if it could not be found.
174            *
175            * @param portletItemId the primary key of the portlet item to find
176            * @return the portlet item
177            * @throws com.liferay.portal.NoSuchPortletItemException if a portlet item with the primary key could not be found
178            * @throws SystemException if a system exception occurred
179            */
180            public static com.liferay.portal.model.PortletItem findByPrimaryKey(
181                    long portletItemId)
182                    throws com.liferay.portal.NoSuchPortletItemException,
183                            com.liferay.portal.kernel.exception.SystemException {
184                    return getPersistence().findByPrimaryKey(portletItemId);
185            }
186    
187            /**
188            * Finds the portlet item with the primary key or returns <code>null</code> if it could not be found.
189            *
190            * @param portletItemId the primary key of the portlet item to find
191            * @return the portlet item, or <code>null</code> if a portlet item with the primary key could not be found
192            * @throws SystemException if a system exception occurred
193            */
194            public static com.liferay.portal.model.PortletItem fetchByPrimaryKey(
195                    long portletItemId)
196                    throws com.liferay.portal.kernel.exception.SystemException {
197                    return getPersistence().fetchByPrimaryKey(portletItemId);
198            }
199    
200            /**
201            * Finds all the portlet items where groupId = &#63; and classNameId = &#63;.
202            *
203            * @param groupId the group ID to search with
204            * @param classNameId the class name ID to search with
205            * @return the matching portlet items
206            * @throws SystemException if a system exception occurred
207            */
208            public static java.util.List<com.liferay.portal.model.PortletItem> findByG_C(
209                    long groupId, long classNameId)
210                    throws com.liferay.portal.kernel.exception.SystemException {
211                    return getPersistence().findByG_C(groupId, classNameId);
212            }
213    
214            /**
215            * Finds a range of all the portlet items where groupId = &#63; and classNameId = &#63;.
216            *
217            * <p>
218            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
219            * </p>
220            *
221            * @param groupId the group ID to search with
222            * @param classNameId the class name ID to search with
223            * @param start the lower bound of the range of portlet items to return
224            * @param end the upper bound of the range of portlet items to return (not inclusive)
225            * @return the range of matching portlet items
226            * @throws SystemException if a system exception occurred
227            */
228            public static java.util.List<com.liferay.portal.model.PortletItem> findByG_C(
229                    long groupId, long classNameId, int start, int end)
230                    throws com.liferay.portal.kernel.exception.SystemException {
231                    return getPersistence().findByG_C(groupId, classNameId, start, end);
232            }
233    
234            /**
235            * Finds an ordered range of all the portlet items where groupId = &#63; and classNameId = &#63;.
236            *
237            * <p>
238            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
239            * </p>
240            *
241            * @param groupId the group ID to search with
242            * @param classNameId the class name ID to search with
243            * @param start the lower bound of the range of portlet items to return
244            * @param end the upper bound of the range of portlet items to return (not inclusive)
245            * @param orderByComparator the comparator to order the results by
246            * @return the ordered range of matching portlet items
247            * @throws SystemException if a system exception occurred
248            */
249            public static java.util.List<com.liferay.portal.model.PortletItem> findByG_C(
250                    long groupId, long classNameId, int start, int end,
251                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
252                    throws com.liferay.portal.kernel.exception.SystemException {
253                    return getPersistence()
254                                       .findByG_C(groupId, classNameId, start, end,
255                            orderByComparator);
256            }
257    
258            /**
259            * Finds the first portlet item in the ordered set where groupId = &#63; and classNameId = &#63;.
260            *
261            * <p>
262            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
263            * </p>
264            *
265            * @param groupId the group ID to search with
266            * @param classNameId the class name ID to search with
267            * @param orderByComparator the comparator to order the set by
268            * @return the first matching portlet item
269            * @throws com.liferay.portal.NoSuchPortletItemException if a matching portlet item could not be found
270            * @throws SystemException if a system exception occurred
271            */
272            public static com.liferay.portal.model.PortletItem findByG_C_First(
273                    long groupId, long classNameId,
274                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
275                    throws com.liferay.portal.NoSuchPortletItemException,
276                            com.liferay.portal.kernel.exception.SystemException {
277                    return getPersistence()
278                                       .findByG_C_First(groupId, classNameId, orderByComparator);
279            }
280    
281            /**
282            * Finds the last portlet item in the ordered set where groupId = &#63; and classNameId = &#63;.
283            *
284            * <p>
285            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
286            * </p>
287            *
288            * @param groupId the group ID to search with
289            * @param classNameId the class name ID to search with
290            * @param orderByComparator the comparator to order the set by
291            * @return the last matching portlet item
292            * @throws com.liferay.portal.NoSuchPortletItemException if a matching portlet item could not be found
293            * @throws SystemException if a system exception occurred
294            */
295            public static com.liferay.portal.model.PortletItem findByG_C_Last(
296                    long groupId, long classNameId,
297                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
298                    throws com.liferay.portal.NoSuchPortletItemException,
299                            com.liferay.portal.kernel.exception.SystemException {
300                    return getPersistence()
301                                       .findByG_C_Last(groupId, classNameId, orderByComparator);
302            }
303    
304            /**
305            * Finds the portlet items before and after the current portlet item in the ordered set where groupId = &#63; and classNameId = &#63;.
306            *
307            * <p>
308            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
309            * </p>
310            *
311            * @param portletItemId the primary key of the current portlet item
312            * @param groupId the group ID to search with
313            * @param classNameId the class name ID to search with
314            * @param orderByComparator the comparator to order the set by
315            * @return the previous, current, and next portlet item
316            * @throws com.liferay.portal.NoSuchPortletItemException if a portlet item with the primary key could not be found
317            * @throws SystemException if a system exception occurred
318            */
319            public static com.liferay.portal.model.PortletItem[] findByG_C_PrevAndNext(
320                    long portletItemId, long groupId, long classNameId,
321                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
322                    throws com.liferay.portal.NoSuchPortletItemException,
323                            com.liferay.portal.kernel.exception.SystemException {
324                    return getPersistence()
325                                       .findByG_C_PrevAndNext(portletItemId, groupId, classNameId,
326                            orderByComparator);
327            }
328    
329            /**
330            * Finds all the portlet items where groupId = &#63; and portletId = &#63; and classNameId = &#63;.
331            *
332            * @param groupId the group ID to search with
333            * @param portletId the portlet ID to search with
334            * @param classNameId the class name ID to search with
335            * @return the matching portlet items
336            * @throws SystemException if a system exception occurred
337            */
338            public static java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C(
339                    long groupId, java.lang.String portletId, long classNameId)
340                    throws com.liferay.portal.kernel.exception.SystemException {
341                    return getPersistence().findByG_P_C(groupId, portletId, classNameId);
342            }
343    
344            /**
345            * Finds a range of all the portlet items where groupId = &#63; and portletId = &#63; and classNameId = &#63;.
346            *
347            * <p>
348            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
349            * </p>
350            *
351            * @param groupId the group ID to search with
352            * @param portletId the portlet ID to search with
353            * @param classNameId the class name ID to search with
354            * @param start the lower bound of the range of portlet items to return
355            * @param end the upper bound of the range of portlet items to return (not inclusive)
356            * @return the range of matching portlet items
357            * @throws SystemException if a system exception occurred
358            */
359            public static java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C(
360                    long groupId, java.lang.String portletId, long classNameId, int start,
361                    int end) throws com.liferay.portal.kernel.exception.SystemException {
362                    return getPersistence()
363                                       .findByG_P_C(groupId, portletId, classNameId, start, end);
364            }
365    
366            /**
367            * Finds an ordered range of all the portlet items where groupId = &#63; and portletId = &#63; and classNameId = &#63;.
368            *
369            * <p>
370            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
371            * </p>
372            *
373            * @param groupId the group ID to search with
374            * @param portletId the portlet ID to search with
375            * @param classNameId the class name ID to search with
376            * @param start the lower bound of the range of portlet items to return
377            * @param end the upper bound of the range of portlet items to return (not inclusive)
378            * @param orderByComparator the comparator to order the results by
379            * @return the ordered range of matching portlet items
380            * @throws SystemException if a system exception occurred
381            */
382            public static java.util.List<com.liferay.portal.model.PortletItem> findByG_P_C(
383                    long groupId, java.lang.String portletId, long classNameId, int start,
384                    int end,
385                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
386                    throws com.liferay.portal.kernel.exception.SystemException {
387                    return getPersistence()
388                                       .findByG_P_C(groupId, portletId, classNameId, start, end,
389                            orderByComparator);
390            }
391    
392            /**
393            * Finds the first portlet item in the ordered set where groupId = &#63; and portletId = &#63; and classNameId = &#63;.
394            *
395            * <p>
396            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
397            * </p>
398            *
399            * @param groupId the group ID to search with
400            * @param portletId the portlet ID to search with
401            * @param classNameId the class name ID to search with
402            * @param orderByComparator the comparator to order the set by
403            * @return the first matching portlet item
404            * @throws com.liferay.portal.NoSuchPortletItemException if a matching portlet item could not be found
405            * @throws SystemException if a system exception occurred
406            */
407            public static com.liferay.portal.model.PortletItem findByG_P_C_First(
408                    long groupId, java.lang.String portletId, long classNameId,
409                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
410                    throws com.liferay.portal.NoSuchPortletItemException,
411                            com.liferay.portal.kernel.exception.SystemException {
412                    return getPersistence()
413                                       .findByG_P_C_First(groupId, portletId, classNameId,
414                            orderByComparator);
415            }
416    
417            /**
418            * Finds the last portlet item in the ordered set where groupId = &#63; and portletId = &#63; and classNameId = &#63;.
419            *
420            * <p>
421            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
422            * </p>
423            *
424            * @param groupId the group ID to search with
425            * @param portletId the portlet ID to search with
426            * @param classNameId the class name ID to search with
427            * @param orderByComparator the comparator to order the set by
428            * @return the last matching portlet item
429            * @throws com.liferay.portal.NoSuchPortletItemException if a matching portlet item could not be found
430            * @throws SystemException if a system exception occurred
431            */
432            public static com.liferay.portal.model.PortletItem findByG_P_C_Last(
433                    long groupId, java.lang.String portletId, long classNameId,
434                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
435                    throws com.liferay.portal.NoSuchPortletItemException,
436                            com.liferay.portal.kernel.exception.SystemException {
437                    return getPersistence()
438                                       .findByG_P_C_Last(groupId, portletId, classNameId,
439                            orderByComparator);
440            }
441    
442            /**
443            * Finds the portlet items before and after the current portlet item in the ordered set where groupId = &#63; and portletId = &#63; and classNameId = &#63;.
444            *
445            * <p>
446            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
447            * </p>
448            *
449            * @param portletItemId the primary key of the current portlet item
450            * @param groupId the group ID to search with
451            * @param portletId the portlet ID to search with
452            * @param classNameId the class name ID to search with
453            * @param orderByComparator the comparator to order the set by
454            * @return the previous, current, and next portlet item
455            * @throws com.liferay.portal.NoSuchPortletItemException if a portlet item with the primary key could not be found
456            * @throws SystemException if a system exception occurred
457            */
458            public static com.liferay.portal.model.PortletItem[] findByG_P_C_PrevAndNext(
459                    long portletItemId, long groupId, java.lang.String portletId,
460                    long classNameId,
461                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
462                    throws com.liferay.portal.NoSuchPortletItemException,
463                            com.liferay.portal.kernel.exception.SystemException {
464                    return getPersistence()
465                                       .findByG_P_C_PrevAndNext(portletItemId, groupId, portletId,
466                            classNameId, orderByComparator);
467            }
468    
469            /**
470            * Finds the portlet item where groupId = &#63; and name = &#63; and portletId = &#63; and classNameId = &#63; or throws a {@link com.liferay.portal.NoSuchPortletItemException} if it could not be found.
471            *
472            * @param groupId the group ID to search with
473            * @param name the name to search with
474            * @param portletId the portlet ID to search with
475            * @param classNameId the class name ID to search with
476            * @return the matching portlet item
477            * @throws com.liferay.portal.NoSuchPortletItemException if a matching portlet item could not be found
478            * @throws SystemException if a system exception occurred
479            */
480            public static com.liferay.portal.model.PortletItem findByG_N_P_C(
481                    long groupId, java.lang.String name, java.lang.String portletId,
482                    long classNameId)
483                    throws com.liferay.portal.NoSuchPortletItemException,
484                            com.liferay.portal.kernel.exception.SystemException {
485                    return getPersistence()
486                                       .findByG_N_P_C(groupId, name, portletId, classNameId);
487            }
488    
489            /**
490            * Finds the portlet item where groupId = &#63; and name = &#63; and portletId = &#63; and classNameId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
491            *
492            * @param groupId the group ID to search with
493            * @param name the name to search with
494            * @param portletId the portlet ID to search with
495            * @param classNameId the class name ID to search with
496            * @return the matching portlet item, or <code>null</code> if a matching portlet item could not be found
497            * @throws SystemException if a system exception occurred
498            */
499            public static com.liferay.portal.model.PortletItem fetchByG_N_P_C(
500                    long groupId, java.lang.String name, java.lang.String portletId,
501                    long classNameId)
502                    throws com.liferay.portal.kernel.exception.SystemException {
503                    return getPersistence()
504                                       .fetchByG_N_P_C(groupId, name, portletId, classNameId);
505            }
506    
507            /**
508            * Finds the portlet item where groupId = &#63; and name = &#63; and portletId = &#63; and classNameId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
509            *
510            * @param groupId the group ID to search with
511            * @param name the name to search with
512            * @param portletId the portlet ID to search with
513            * @param classNameId the class name ID to search with
514            * @return the matching portlet item, or <code>null</code> if a matching portlet item could not be found
515            * @throws SystemException if a system exception occurred
516            */
517            public static com.liferay.portal.model.PortletItem fetchByG_N_P_C(
518                    long groupId, java.lang.String name, java.lang.String portletId,
519                    long classNameId, boolean retrieveFromCache)
520                    throws com.liferay.portal.kernel.exception.SystemException {
521                    return getPersistence()
522                                       .fetchByG_N_P_C(groupId, name, portletId, classNameId,
523                            retrieveFromCache);
524            }
525    
526            /**
527            * Finds all the portlet items.
528            *
529            * @return the portlet items
530            * @throws SystemException if a system exception occurred
531            */
532            public static java.util.List<com.liferay.portal.model.PortletItem> findAll()
533                    throws com.liferay.portal.kernel.exception.SystemException {
534                    return getPersistence().findAll();
535            }
536    
537            /**
538            * Finds a range of all the portlet items.
539            *
540            * <p>
541            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
542            * </p>
543            *
544            * @param start the lower bound of the range of portlet items to return
545            * @param end the upper bound of the range of portlet items to return (not inclusive)
546            * @return the range of portlet items
547            * @throws SystemException if a system exception occurred
548            */
549            public static java.util.List<com.liferay.portal.model.PortletItem> findAll(
550                    int start, int end)
551                    throws com.liferay.portal.kernel.exception.SystemException {
552                    return getPersistence().findAll(start, end);
553            }
554    
555            /**
556            * Finds an ordered range of all the portlet items.
557            *
558            * <p>
559            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
560            * </p>
561            *
562            * @param start the lower bound of the range of portlet items to return
563            * @param end the upper bound of the range of portlet items to return (not inclusive)
564            * @param orderByComparator the comparator to order the results by
565            * @return the ordered range of portlet items
566            * @throws SystemException if a system exception occurred
567            */
568            public static java.util.List<com.liferay.portal.model.PortletItem> findAll(
569                    int start, int end,
570                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
571                    throws com.liferay.portal.kernel.exception.SystemException {
572                    return getPersistence().findAll(start, end, orderByComparator);
573            }
574    
575            /**
576            * Removes all the portlet items where groupId = &#63; and classNameId = &#63; from the database.
577            *
578            * @param groupId the group ID to search with
579            * @param classNameId the class name ID to search with
580            * @throws SystemException if a system exception occurred
581            */
582            public static void removeByG_C(long groupId, long classNameId)
583                    throws com.liferay.portal.kernel.exception.SystemException {
584                    getPersistence().removeByG_C(groupId, classNameId);
585            }
586    
587            /**
588            * Removes all the portlet items where groupId = &#63; and portletId = &#63; and classNameId = &#63; from the database.
589            *
590            * @param groupId the group ID to search with
591            * @param portletId the portlet ID to search with
592            * @param classNameId the class name ID to search with
593            * @throws SystemException if a system exception occurred
594            */
595            public static void removeByG_P_C(long groupId, java.lang.String portletId,
596                    long classNameId)
597                    throws com.liferay.portal.kernel.exception.SystemException {
598                    getPersistence().removeByG_P_C(groupId, portletId, classNameId);
599            }
600    
601            /**
602            * Removes the portlet item where groupId = &#63; and name = &#63; and portletId = &#63; and classNameId = &#63; from the database.
603            *
604            * @param groupId the group ID to search with
605            * @param name the name to search with
606            * @param portletId the portlet ID to search with
607            * @param classNameId the class name ID to search with
608            * @throws SystemException if a system exception occurred
609            */
610            public static void removeByG_N_P_C(long groupId, java.lang.String name,
611                    java.lang.String portletId, long classNameId)
612                    throws com.liferay.portal.NoSuchPortletItemException,
613                            com.liferay.portal.kernel.exception.SystemException {
614                    getPersistence().removeByG_N_P_C(groupId, name, portletId, classNameId);
615            }
616    
617            /**
618            * Removes all the portlet items from the database.
619            *
620            * @throws SystemException if a system exception occurred
621            */
622            public static void removeAll()
623                    throws com.liferay.portal.kernel.exception.SystemException {
624                    getPersistence().removeAll();
625            }
626    
627            /**
628            * Counts all the portlet items where groupId = &#63; and classNameId = &#63;.
629            *
630            * @param groupId the group ID to search with
631            * @param classNameId the class name ID to search with
632            * @return the number of matching portlet items
633            * @throws SystemException if a system exception occurred
634            */
635            public static int countByG_C(long groupId, long classNameId)
636                    throws com.liferay.portal.kernel.exception.SystemException {
637                    return getPersistence().countByG_C(groupId, classNameId);
638            }
639    
640            /**
641            * Counts all the portlet items where groupId = &#63; and portletId = &#63; and classNameId = &#63;.
642            *
643            * @param groupId the group ID to search with
644            * @param portletId the portlet ID to search with
645            * @param classNameId the class name ID to search with
646            * @return the number of matching portlet items
647            * @throws SystemException if a system exception occurred
648            */
649            public static int countByG_P_C(long groupId, java.lang.String portletId,
650                    long classNameId)
651                    throws com.liferay.portal.kernel.exception.SystemException {
652                    return getPersistence().countByG_P_C(groupId, portletId, classNameId);
653            }
654    
655            /**
656            * Counts all the portlet items where groupId = &#63; and name = &#63; and portletId = &#63; and classNameId = &#63;.
657            *
658            * @param groupId the group ID to search with
659            * @param name the name to search with
660            * @param portletId the portlet ID to search with
661            * @param classNameId the class name ID to search with
662            * @return the number of matching portlet items
663            * @throws SystemException if a system exception occurred
664            */
665            public static int countByG_N_P_C(long groupId, java.lang.String name,
666                    java.lang.String portletId, long classNameId)
667                    throws com.liferay.portal.kernel.exception.SystemException {
668                    return getPersistence()
669                                       .countByG_N_P_C(groupId, name, portletId, classNameId);
670            }
671    
672            /**
673            * Counts all the portlet items.
674            *
675            * @return the number of portlet items
676            * @throws SystemException if a system exception occurred
677            */
678            public static int countAll()
679                    throws com.liferay.portal.kernel.exception.SystemException {
680                    return getPersistence().countAll();
681            }
682    
683            public static PortletItemPersistence getPersistence() {
684                    if (_persistence == null) {
685                            _persistence = (PortletItemPersistence)PortalBeanLocatorUtil.locate(PortletItemPersistence.class.getName());
686    
687                            ReferenceRegistry.registerReference(PortletItemUtil.class,
688                                    "_persistence");
689                    }
690    
691                    return _persistence;
692            }
693    
694            public void setPersistence(PortletItemPersistence persistence) {
695                    _persistence = persistence;
696    
697                    ReferenceRegistry.registerReference(PortletItemUtil.class,
698                            "_persistence");
699            }
700    
701            private static PortletItemPersistence _persistence;
702    }