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