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
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
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
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            * Returns 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
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            * Returns 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
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            * Returns all the portlet items where groupId = &#63; and classNameId = &#63;.
202            *
203            * @param groupId the group ID
204            * @param classNameId the class name ID
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            * Returns 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
222            * @param classNameId the class name ID
223            * @param start the lower bound of the range of portlet items
224            * @param end the upper bound of the range of portlet items (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            * Returns 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
242            * @param classNameId the class name ID
243            * @param start the lower bound of the range of portlet items
244            * @param end the upper bound of the range of portlet items (not inclusive)
245            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
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            * Returns 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
266            * @param classNameId the class name ID
267            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
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            * Returns 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
289            * @param classNameId the class name ID
290            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
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            * Returns 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
313            * @param classNameId the class name ID
314            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
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            * Returns all the portlet items where groupId = &#63; and portletId = &#63; and classNameId = &#63;.
331            *
332            * @param groupId the group ID
333            * @param portletId the portlet ID
334            * @param classNameId the class name ID
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            * Returns 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
352            * @param portletId the portlet ID
353            * @param classNameId the class name ID
354            * @param start the lower bound of the range of portlet items
355            * @param end the upper bound of the range of portlet items (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            * Returns 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
374            * @param portletId the portlet ID
375            * @param classNameId the class name ID
376            * @param start the lower bound of the range of portlet items
377            * @param end the upper bound of the range of portlet items (not inclusive)
378            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
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            * Returns 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
400            * @param portletId the portlet ID
401            * @param classNameId the class name ID
402            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
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            * Returns 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
425            * @param portletId the portlet ID
426            * @param classNameId the class name ID
427            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
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            * Returns 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
451            * @param portletId the portlet ID
452            * @param classNameId the class name ID
453            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
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            * Returns 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
473            * @param name the name
474            * @param portletId the portlet ID
475            * @param classNameId the class name ID
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            * Returns 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
493            * @param name the name
494            * @param portletId the portlet ID
495            * @param classNameId the class name ID
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            * Returns 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
511            * @param name the name
512            * @param portletId the portlet ID
513            * @param classNameId the class name ID
514            * @param retrieveFromCache whether to use the finder cache
515            * @return the matching portlet item, or <code>null</code> if a matching portlet item could not be found
516            * @throws SystemException if a system exception occurred
517            */
518            public static com.liferay.portal.model.PortletItem fetchByG_N_P_C(
519                    long groupId, java.lang.String name, java.lang.String portletId,
520                    long classNameId, boolean retrieveFromCache)
521                    throws com.liferay.portal.kernel.exception.SystemException {
522                    return getPersistence()
523                                       .fetchByG_N_P_C(groupId, name, portletId, classNameId,
524                            retrieveFromCache);
525            }
526    
527            /**
528            * Returns all the portlet items.
529            *
530            * @return the portlet items
531            * @throws SystemException if a system exception occurred
532            */
533            public static java.util.List<com.liferay.portal.model.PortletItem> findAll()
534                    throws com.liferay.portal.kernel.exception.SystemException {
535                    return getPersistence().findAll();
536            }
537    
538            /**
539            * Returns a range of all the portlet items.
540            *
541            * <p>
542            * 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.
543            * </p>
544            *
545            * @param start the lower bound of the range of portlet items
546            * @param end the upper bound of the range of portlet items (not inclusive)
547            * @return the range of portlet items
548            * @throws SystemException if a system exception occurred
549            */
550            public static java.util.List<com.liferay.portal.model.PortletItem> findAll(
551                    int start, int end)
552                    throws com.liferay.portal.kernel.exception.SystemException {
553                    return getPersistence().findAll(start, end);
554            }
555    
556            /**
557            * Returns an ordered range of all the portlet items.
558            *
559            * <p>
560            * 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.
561            * </p>
562            *
563            * @param start the lower bound of the range of portlet items
564            * @param end the upper bound of the range of portlet items (not inclusive)
565            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
566            * @return the ordered range of portlet items
567            * @throws SystemException if a system exception occurred
568            */
569            public static java.util.List<com.liferay.portal.model.PortletItem> findAll(
570                    int start, int end,
571                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
572                    throws com.liferay.portal.kernel.exception.SystemException {
573                    return getPersistence().findAll(start, end, orderByComparator);
574            }
575    
576            /**
577            * Removes all the portlet items where groupId = &#63; and classNameId = &#63; from the database.
578            *
579            * @param groupId the group ID
580            * @param classNameId the class name ID
581            * @throws SystemException if a system exception occurred
582            */
583            public static void removeByG_C(long groupId, long classNameId)
584                    throws com.liferay.portal.kernel.exception.SystemException {
585                    getPersistence().removeByG_C(groupId, classNameId);
586            }
587    
588            /**
589            * Removes all the portlet items where groupId = &#63; and portletId = &#63; and classNameId = &#63; from the database.
590            *
591            * @param groupId the group ID
592            * @param portletId the portlet ID
593            * @param classNameId the class name ID
594            * @throws SystemException if a system exception occurred
595            */
596            public static void removeByG_P_C(long groupId, java.lang.String portletId,
597                    long classNameId)
598                    throws com.liferay.portal.kernel.exception.SystemException {
599                    getPersistence().removeByG_P_C(groupId, portletId, classNameId);
600            }
601    
602            /**
603            * Removes the portlet item where groupId = &#63; and name = &#63; and portletId = &#63; and classNameId = &#63; from the database.
604            *
605            * @param groupId the group ID
606            * @param name the name
607            * @param portletId the portlet ID
608            * @param classNameId the class name ID
609            * @throws SystemException if a system exception occurred
610            */
611            public static void removeByG_N_P_C(long groupId, java.lang.String name,
612                    java.lang.String portletId, long classNameId)
613                    throws com.liferay.portal.NoSuchPortletItemException,
614                            com.liferay.portal.kernel.exception.SystemException {
615                    getPersistence().removeByG_N_P_C(groupId, name, portletId, classNameId);
616            }
617    
618            /**
619            * Removes all the portlet items from the database.
620            *
621            * @throws SystemException if a system exception occurred
622            */
623            public static void removeAll()
624                    throws com.liferay.portal.kernel.exception.SystemException {
625                    getPersistence().removeAll();
626            }
627    
628            /**
629            * Returns the number of portlet items where groupId = &#63; and classNameId = &#63;.
630            *
631            * @param groupId the group ID
632            * @param classNameId the class name ID
633            * @return the number of matching portlet items
634            * @throws SystemException if a system exception occurred
635            */
636            public static int countByG_C(long groupId, long classNameId)
637                    throws com.liferay.portal.kernel.exception.SystemException {
638                    return getPersistence().countByG_C(groupId, classNameId);
639            }
640    
641            /**
642            * Returns the number of portlet items where groupId = &#63; and portletId = &#63; and classNameId = &#63;.
643            *
644            * @param groupId the group ID
645            * @param portletId the portlet ID
646            * @param classNameId the class name ID
647            * @return the number of matching portlet items
648            * @throws SystemException if a system exception occurred
649            */
650            public static int countByG_P_C(long groupId, java.lang.String portletId,
651                    long classNameId)
652                    throws com.liferay.portal.kernel.exception.SystemException {
653                    return getPersistence().countByG_P_C(groupId, portletId, classNameId);
654            }
655    
656            /**
657            * Returns the number of portlet items where groupId = &#63; and name = &#63; and portletId = &#63; and classNameId = &#63;.
658            *
659            * @param groupId the group ID
660            * @param name the name
661            * @param portletId the portlet ID
662            * @param classNameId the class name ID
663            * @return the number of matching portlet items
664            * @throws SystemException if a system exception occurred
665            */
666            public static int countByG_N_P_C(long groupId, java.lang.String name,
667                    java.lang.String portletId, long classNameId)
668                    throws com.liferay.portal.kernel.exception.SystemException {
669                    return getPersistence()
670                                       .countByG_N_P_C(groupId, name, portletId, classNameId);
671            }
672    
673            /**
674            * Returns the number of portlet items.
675            *
676            * @return the number of portlet items
677            * @throws SystemException if a system exception occurred
678            */
679            public static int countAll()
680                    throws com.liferay.portal.kernel.exception.SystemException {
681                    return getPersistence().countAll();
682            }
683    
684            public static PortletItemPersistence getPersistence() {
685                    if (_persistence == null) {
686                            _persistence = (PortletItemPersistence)PortalBeanLocatorUtil.locate(PortletItemPersistence.class.getName());
687    
688                            ReferenceRegistry.registerReference(PortletItemUtil.class,
689                                    "_persistence");
690                    }
691    
692                    return _persistence;
693            }
694    
695            public void setPersistence(PortletItemPersistence persistence) {
696                    _persistence = persistence;
697    
698                    ReferenceRegistry.registerReference(PortletItemUtil.class,
699                            "_persistence");
700            }
701    
702            private static PortletItemPersistence _persistence;
703    }