001    /**
002     * Copyright (c) 2000-present 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.portlet.calendar.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.util.OrderByComparator;
022    import com.liferay.portal.kernel.util.ReferenceRegistry;
023    import com.liferay.portal.service.ServiceContext;
024    
025    import com.liferay.portlet.calendar.model.CalEvent;
026    
027    import java.util.List;
028    
029    /**
030     * The persistence utility for the cal event service. This utility wraps {@link com.liferay.portlet.calendar.service.persistence.impl.CalEventPersistenceImpl} 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 CalEventPersistence
038     * @see com.liferay.portlet.calendar.service.persistence.impl.CalEventPersistenceImpl
039     * @generated
040     */
041    @ProviderType
042    public class CalEventUtil {
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(CalEvent calEvent) {
060                    getPersistence().clearCache(calEvent);
061            }
062    
063            /**
064             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
065             */
066            public static long countWithDynamicQuery(DynamicQuery dynamicQuery) {
067                    return getPersistence().countWithDynamicQuery(dynamicQuery);
068            }
069    
070            /**
071             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
072             */
073            public static List<CalEvent> findWithDynamicQuery(DynamicQuery dynamicQuery) {
074                    return getPersistence().findWithDynamicQuery(dynamicQuery);
075            }
076    
077            /**
078             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
079             */
080            public static List<CalEvent> findWithDynamicQuery(
081                    DynamicQuery dynamicQuery, int start, int end) {
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<CalEvent> findWithDynamicQuery(
089                    DynamicQuery dynamicQuery, int start, int end,
090                    OrderByComparator<CalEvent> orderByComparator) {
091                    return getPersistence()
092                                       .findWithDynamicQuery(dynamicQuery, start, end,
093                            orderByComparator);
094            }
095    
096            /**
097             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
098             */
099            public static CalEvent update(CalEvent calEvent) {
100                    return getPersistence().update(calEvent);
101            }
102    
103            /**
104             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
105             */
106            public static CalEvent update(CalEvent calEvent,
107                    ServiceContext serviceContext) {
108                    return getPersistence().update(calEvent, serviceContext);
109            }
110    
111            /**
112            * Returns all the cal events where uuid = &#63;.
113            *
114            * @param uuid the uuid
115            * @return the matching cal events
116            */
117            public static List<CalEvent> findByUuid(java.lang.String uuid) {
118                    return getPersistence().findByUuid(uuid);
119            }
120    
121            /**
122            * Returns a range of all the cal events where uuid = &#63;.
123            *
124            * <p>
125            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CalEventModelImpl}. 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.
126            * </p>
127            *
128            * @param uuid the uuid
129            * @param start the lower bound of the range of cal events
130            * @param end the upper bound of the range of cal events (not inclusive)
131            * @return the range of matching cal events
132            */
133            public static List<CalEvent> findByUuid(java.lang.String uuid, int start,
134                    int end) {
135                    return getPersistence().findByUuid(uuid, start, end);
136            }
137    
138            /**
139            * Returns an ordered range of all the cal events where uuid = &#63;.
140            *
141            * <p>
142            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CalEventModelImpl}. 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.
143            * </p>
144            *
145            * @param uuid the uuid
146            * @param start the lower bound of the range of cal events
147            * @param end the upper bound of the range of cal events (not inclusive)
148            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
149            * @return the ordered range of matching cal events
150            */
151            public static List<CalEvent> findByUuid(java.lang.String uuid, int start,
152                    int end, OrderByComparator<CalEvent> orderByComparator) {
153                    return getPersistence().findByUuid(uuid, start, end, orderByComparator);
154            }
155    
156            /**
157            * Returns the first cal event in the ordered set where uuid = &#63;.
158            *
159            * @param uuid the uuid
160            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
161            * @return the first matching cal event
162            * @throws NoSuchEventException if a matching cal event could not be found
163            */
164            public static CalEvent findByUuid_First(java.lang.String uuid,
165                    OrderByComparator<CalEvent> orderByComparator)
166                    throws com.liferay.portlet.calendar.NoSuchEventException {
167                    return getPersistence().findByUuid_First(uuid, orderByComparator);
168            }
169    
170            /**
171            * Returns the first cal event in the ordered set where uuid = &#63;.
172            *
173            * @param uuid the uuid
174            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
175            * @return the first matching cal event, or <code>null</code> if a matching cal event could not be found
176            */
177            public static CalEvent fetchByUuid_First(java.lang.String uuid,
178                    OrderByComparator<CalEvent> orderByComparator) {
179                    return getPersistence().fetchByUuid_First(uuid, orderByComparator);
180            }
181    
182            /**
183            * Returns the last cal event in the ordered set where uuid = &#63;.
184            *
185            * @param uuid the uuid
186            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
187            * @return the last matching cal event
188            * @throws NoSuchEventException if a matching cal event could not be found
189            */
190            public static CalEvent findByUuid_Last(java.lang.String uuid,
191                    OrderByComparator<CalEvent> orderByComparator)
192                    throws com.liferay.portlet.calendar.NoSuchEventException {
193                    return getPersistence().findByUuid_Last(uuid, orderByComparator);
194            }
195    
196            /**
197            * Returns the last cal event in the ordered set where uuid = &#63;.
198            *
199            * @param uuid the uuid
200            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
201            * @return the last matching cal event, or <code>null</code> if a matching cal event could not be found
202            */
203            public static CalEvent fetchByUuid_Last(java.lang.String uuid,
204                    OrderByComparator<CalEvent> orderByComparator) {
205                    return getPersistence().fetchByUuid_Last(uuid, orderByComparator);
206            }
207    
208            /**
209            * Returns the cal events before and after the current cal event in the ordered set where uuid = &#63;.
210            *
211            * @param eventId the primary key of the current cal event
212            * @param uuid the uuid
213            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
214            * @return the previous, current, and next cal event
215            * @throws NoSuchEventException if a cal event with the primary key could not be found
216            */
217            public static CalEvent[] findByUuid_PrevAndNext(long eventId,
218                    java.lang.String uuid, OrderByComparator<CalEvent> orderByComparator)
219                    throws com.liferay.portlet.calendar.NoSuchEventException {
220                    return getPersistence()
221                                       .findByUuid_PrevAndNext(eventId, uuid, orderByComparator);
222            }
223    
224            /**
225            * Removes all the cal events where uuid = &#63; from the database.
226            *
227            * @param uuid the uuid
228            */
229            public static void removeByUuid(java.lang.String uuid) {
230                    getPersistence().removeByUuid(uuid);
231            }
232    
233            /**
234            * Returns the number of cal events where uuid = &#63;.
235            *
236            * @param uuid the uuid
237            * @return the number of matching cal events
238            */
239            public static int countByUuid(java.lang.String uuid) {
240                    return getPersistence().countByUuid(uuid);
241            }
242    
243            /**
244            * Returns the cal event where uuid = &#63; and groupId = &#63; or throws a {@link NoSuchEventException} if it could not be found.
245            *
246            * @param uuid the uuid
247            * @param groupId the group ID
248            * @return the matching cal event
249            * @throws NoSuchEventException if a matching cal event could not be found
250            */
251            public static CalEvent findByUUID_G(java.lang.String uuid, long groupId)
252                    throws com.liferay.portlet.calendar.NoSuchEventException {
253                    return getPersistence().findByUUID_G(uuid, groupId);
254            }
255    
256            /**
257            * Returns the cal event where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
258            *
259            * @param uuid the uuid
260            * @param groupId the group ID
261            * @return the matching cal event, or <code>null</code> if a matching cal event could not be found
262            */
263            public static CalEvent fetchByUUID_G(java.lang.String uuid, long groupId) {
264                    return getPersistence().fetchByUUID_G(uuid, groupId);
265            }
266    
267            /**
268            * Returns the cal event where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
269            *
270            * @param uuid the uuid
271            * @param groupId the group ID
272            * @param retrieveFromCache whether to use the finder cache
273            * @return the matching cal event, or <code>null</code> if a matching cal event could not be found
274            */
275            public static CalEvent fetchByUUID_G(java.lang.String uuid, long groupId,
276                    boolean retrieveFromCache) {
277                    return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache);
278            }
279    
280            /**
281            * Removes the cal event where uuid = &#63; and groupId = &#63; from the database.
282            *
283            * @param uuid the uuid
284            * @param groupId the group ID
285            * @return the cal event that was removed
286            */
287            public static CalEvent removeByUUID_G(java.lang.String uuid, long groupId)
288                    throws com.liferay.portlet.calendar.NoSuchEventException {
289                    return getPersistence().removeByUUID_G(uuid, groupId);
290            }
291    
292            /**
293            * Returns the number of cal events where uuid = &#63; and groupId = &#63;.
294            *
295            * @param uuid the uuid
296            * @param groupId the group ID
297            * @return the number of matching cal events
298            */
299            public static int countByUUID_G(java.lang.String uuid, long groupId) {
300                    return getPersistence().countByUUID_G(uuid, groupId);
301            }
302    
303            /**
304            * Returns all the cal events where uuid = &#63; and companyId = &#63;.
305            *
306            * @param uuid the uuid
307            * @param companyId the company ID
308            * @return the matching cal events
309            */
310            public static List<CalEvent> findByUuid_C(java.lang.String uuid,
311                    long companyId) {
312                    return getPersistence().findByUuid_C(uuid, companyId);
313            }
314    
315            /**
316            * Returns a range of all the cal events where uuid = &#63; and companyId = &#63;.
317            *
318            * <p>
319            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CalEventModelImpl}. 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.
320            * </p>
321            *
322            * @param uuid the uuid
323            * @param companyId the company ID
324            * @param start the lower bound of the range of cal events
325            * @param end the upper bound of the range of cal events (not inclusive)
326            * @return the range of matching cal events
327            */
328            public static List<CalEvent> findByUuid_C(java.lang.String uuid,
329                    long companyId, int start, int end) {
330                    return getPersistence().findByUuid_C(uuid, companyId, start, end);
331            }
332    
333            /**
334            * Returns an ordered range of all the cal events where uuid = &#63; and companyId = &#63;.
335            *
336            * <p>
337            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CalEventModelImpl}. 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.
338            * </p>
339            *
340            * @param uuid the uuid
341            * @param companyId the company ID
342            * @param start the lower bound of the range of cal events
343            * @param end the upper bound of the range of cal events (not inclusive)
344            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
345            * @return the ordered range of matching cal events
346            */
347            public static List<CalEvent> findByUuid_C(java.lang.String uuid,
348                    long companyId, int start, int end,
349                    OrderByComparator<CalEvent> orderByComparator) {
350                    return getPersistence()
351                                       .findByUuid_C(uuid, companyId, start, end, orderByComparator);
352            }
353    
354            /**
355            * Returns the first cal event in the ordered set where uuid = &#63; and companyId = &#63;.
356            *
357            * @param uuid the uuid
358            * @param companyId the company ID
359            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
360            * @return the first matching cal event
361            * @throws NoSuchEventException if a matching cal event could not be found
362            */
363            public static CalEvent findByUuid_C_First(java.lang.String uuid,
364                    long companyId, OrderByComparator<CalEvent> orderByComparator)
365                    throws com.liferay.portlet.calendar.NoSuchEventException {
366                    return getPersistence()
367                                       .findByUuid_C_First(uuid, companyId, orderByComparator);
368            }
369    
370            /**
371            * Returns the first cal event in the ordered set where uuid = &#63; and companyId = &#63;.
372            *
373            * @param uuid the uuid
374            * @param companyId the company ID
375            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
376            * @return the first matching cal event, or <code>null</code> if a matching cal event could not be found
377            */
378            public static CalEvent fetchByUuid_C_First(java.lang.String uuid,
379                    long companyId, OrderByComparator<CalEvent> orderByComparator) {
380                    return getPersistence()
381                                       .fetchByUuid_C_First(uuid, companyId, orderByComparator);
382            }
383    
384            /**
385            * Returns the last cal event in the ordered set where uuid = &#63; and companyId = &#63;.
386            *
387            * @param uuid the uuid
388            * @param companyId the company ID
389            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
390            * @return the last matching cal event
391            * @throws NoSuchEventException if a matching cal event could not be found
392            */
393            public static CalEvent findByUuid_C_Last(java.lang.String uuid,
394                    long companyId, OrderByComparator<CalEvent> orderByComparator)
395                    throws com.liferay.portlet.calendar.NoSuchEventException {
396                    return getPersistence()
397                                       .findByUuid_C_Last(uuid, companyId, orderByComparator);
398            }
399    
400            /**
401            * Returns the last cal event in the ordered set where uuid = &#63; and companyId = &#63;.
402            *
403            * @param uuid the uuid
404            * @param companyId the company ID
405            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
406            * @return the last matching cal event, or <code>null</code> if a matching cal event could not be found
407            */
408            public static CalEvent fetchByUuid_C_Last(java.lang.String uuid,
409                    long companyId, OrderByComparator<CalEvent> orderByComparator) {
410                    return getPersistence()
411                                       .fetchByUuid_C_Last(uuid, companyId, orderByComparator);
412            }
413    
414            /**
415            * Returns the cal events before and after the current cal event in the ordered set where uuid = &#63; and companyId = &#63;.
416            *
417            * @param eventId the primary key of the current cal event
418            * @param uuid the uuid
419            * @param companyId the company ID
420            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
421            * @return the previous, current, and next cal event
422            * @throws NoSuchEventException if a cal event with the primary key could not be found
423            */
424            public static CalEvent[] findByUuid_C_PrevAndNext(long eventId,
425                    java.lang.String uuid, long companyId,
426                    OrderByComparator<CalEvent> orderByComparator)
427                    throws com.liferay.portlet.calendar.NoSuchEventException {
428                    return getPersistence()
429                                       .findByUuid_C_PrevAndNext(eventId, uuid, companyId,
430                            orderByComparator);
431            }
432    
433            /**
434            * Removes all the cal events where uuid = &#63; and companyId = &#63; from the database.
435            *
436            * @param uuid the uuid
437            * @param companyId the company ID
438            */
439            public static void removeByUuid_C(java.lang.String uuid, long companyId) {
440                    getPersistence().removeByUuid_C(uuid, companyId);
441            }
442    
443            /**
444            * Returns the number of cal events where uuid = &#63; and companyId = &#63;.
445            *
446            * @param uuid the uuid
447            * @param companyId the company ID
448            * @return the number of matching cal events
449            */
450            public static int countByUuid_C(java.lang.String uuid, long companyId) {
451                    return getPersistence().countByUuid_C(uuid, companyId);
452            }
453    
454            /**
455            * Returns all the cal events where groupId = &#63;.
456            *
457            * @param groupId the group ID
458            * @return the matching cal events
459            */
460            public static List<CalEvent> findByGroupId(long groupId) {
461                    return getPersistence().findByGroupId(groupId);
462            }
463    
464            /**
465            * Returns a range of all the cal events where groupId = &#63;.
466            *
467            * <p>
468            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CalEventModelImpl}. 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.
469            * </p>
470            *
471            * @param groupId the group ID
472            * @param start the lower bound of the range of cal events
473            * @param end the upper bound of the range of cal events (not inclusive)
474            * @return the range of matching cal events
475            */
476            public static List<CalEvent> findByGroupId(long groupId, int start, int end) {
477                    return getPersistence().findByGroupId(groupId, start, end);
478            }
479    
480            /**
481            * Returns an ordered range of all the cal events where groupId = &#63;.
482            *
483            * <p>
484            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CalEventModelImpl}. 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.
485            * </p>
486            *
487            * @param groupId the group ID
488            * @param start the lower bound of the range of cal events
489            * @param end the upper bound of the range of cal events (not inclusive)
490            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
491            * @return the ordered range of matching cal events
492            */
493            public static List<CalEvent> findByGroupId(long groupId, int start,
494                    int end, OrderByComparator<CalEvent> orderByComparator) {
495                    return getPersistence()
496                                       .findByGroupId(groupId, start, end, orderByComparator);
497            }
498    
499            /**
500            * Returns the first cal event in the ordered set where groupId = &#63;.
501            *
502            * @param groupId the group ID
503            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
504            * @return the first matching cal event
505            * @throws NoSuchEventException if a matching cal event could not be found
506            */
507            public static CalEvent findByGroupId_First(long groupId,
508                    OrderByComparator<CalEvent> orderByComparator)
509                    throws com.liferay.portlet.calendar.NoSuchEventException {
510                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
511            }
512    
513            /**
514            * Returns the first cal event in the ordered set where groupId = &#63;.
515            *
516            * @param groupId the group ID
517            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
518            * @return the first matching cal event, or <code>null</code> if a matching cal event could not be found
519            */
520            public static CalEvent fetchByGroupId_First(long groupId,
521                    OrderByComparator<CalEvent> orderByComparator) {
522                    return getPersistence().fetchByGroupId_First(groupId, orderByComparator);
523            }
524    
525            /**
526            * Returns the last cal event in the ordered set where groupId = &#63;.
527            *
528            * @param groupId the group ID
529            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
530            * @return the last matching cal event
531            * @throws NoSuchEventException if a matching cal event could not be found
532            */
533            public static CalEvent findByGroupId_Last(long groupId,
534                    OrderByComparator<CalEvent> orderByComparator)
535                    throws com.liferay.portlet.calendar.NoSuchEventException {
536                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
537            }
538    
539            /**
540            * Returns the last cal event in the ordered set where groupId = &#63;.
541            *
542            * @param groupId the group ID
543            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
544            * @return the last matching cal event, or <code>null</code> if a matching cal event could not be found
545            */
546            public static CalEvent fetchByGroupId_Last(long groupId,
547                    OrderByComparator<CalEvent> orderByComparator) {
548                    return getPersistence().fetchByGroupId_Last(groupId, orderByComparator);
549            }
550    
551            /**
552            * Returns the cal events before and after the current cal event in the ordered set where groupId = &#63;.
553            *
554            * @param eventId the primary key of the current cal event
555            * @param groupId the group ID
556            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
557            * @return the previous, current, and next cal event
558            * @throws NoSuchEventException if a cal event with the primary key could not be found
559            */
560            public static CalEvent[] findByGroupId_PrevAndNext(long eventId,
561                    long groupId, OrderByComparator<CalEvent> orderByComparator)
562                    throws com.liferay.portlet.calendar.NoSuchEventException {
563                    return getPersistence()
564                                       .findByGroupId_PrevAndNext(eventId, groupId,
565                            orderByComparator);
566            }
567    
568            /**
569            * Removes all the cal events where groupId = &#63; from the database.
570            *
571            * @param groupId the group ID
572            */
573            public static void removeByGroupId(long groupId) {
574                    getPersistence().removeByGroupId(groupId);
575            }
576    
577            /**
578            * Returns the number of cal events where groupId = &#63;.
579            *
580            * @param groupId the group ID
581            * @return the number of matching cal events
582            */
583            public static int countByGroupId(long groupId) {
584                    return getPersistence().countByGroupId(groupId);
585            }
586    
587            /**
588            * Returns all the cal events where companyId = &#63;.
589            *
590            * @param companyId the company ID
591            * @return the matching cal events
592            */
593            public static List<CalEvent> findByCompanyId(long companyId) {
594                    return getPersistence().findByCompanyId(companyId);
595            }
596    
597            /**
598            * Returns a range of all the cal events where companyId = &#63;.
599            *
600            * <p>
601            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CalEventModelImpl}. 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.
602            * </p>
603            *
604            * @param companyId the company ID
605            * @param start the lower bound of the range of cal events
606            * @param end the upper bound of the range of cal events (not inclusive)
607            * @return the range of matching cal events
608            */
609            public static List<CalEvent> findByCompanyId(long companyId, int start,
610                    int end) {
611                    return getPersistence().findByCompanyId(companyId, start, end);
612            }
613    
614            /**
615            * Returns an ordered range of all the cal events where companyId = &#63;.
616            *
617            * <p>
618            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CalEventModelImpl}. 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.
619            * </p>
620            *
621            * @param companyId the company ID
622            * @param start the lower bound of the range of cal events
623            * @param end the upper bound of the range of cal events (not inclusive)
624            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
625            * @return the ordered range of matching cal events
626            */
627            public static List<CalEvent> findByCompanyId(long companyId, int start,
628                    int end, OrderByComparator<CalEvent> orderByComparator) {
629                    return getPersistence()
630                                       .findByCompanyId(companyId, start, end, orderByComparator);
631            }
632    
633            /**
634            * Returns the first cal event in the ordered set where companyId = &#63;.
635            *
636            * @param companyId the company ID
637            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
638            * @return the first matching cal event
639            * @throws NoSuchEventException if a matching cal event could not be found
640            */
641            public static CalEvent findByCompanyId_First(long companyId,
642                    OrderByComparator<CalEvent> orderByComparator)
643                    throws com.liferay.portlet.calendar.NoSuchEventException {
644                    return getPersistence()
645                                       .findByCompanyId_First(companyId, orderByComparator);
646            }
647    
648            /**
649            * Returns the first cal event in the ordered set where companyId = &#63;.
650            *
651            * @param companyId the company ID
652            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
653            * @return the first matching cal event, or <code>null</code> if a matching cal event could not be found
654            */
655            public static CalEvent fetchByCompanyId_First(long companyId,
656                    OrderByComparator<CalEvent> orderByComparator) {
657                    return getPersistence()
658                                       .fetchByCompanyId_First(companyId, orderByComparator);
659            }
660    
661            /**
662            * Returns the last cal event in the ordered set where companyId = &#63;.
663            *
664            * @param companyId the company ID
665            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
666            * @return the last matching cal event
667            * @throws NoSuchEventException if a matching cal event could not be found
668            */
669            public static CalEvent findByCompanyId_Last(long companyId,
670                    OrderByComparator<CalEvent> orderByComparator)
671                    throws com.liferay.portlet.calendar.NoSuchEventException {
672                    return getPersistence()
673                                       .findByCompanyId_Last(companyId, orderByComparator);
674            }
675    
676            /**
677            * Returns the last cal event in the ordered set where companyId = &#63;.
678            *
679            * @param companyId the company ID
680            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
681            * @return the last matching cal event, or <code>null</code> if a matching cal event could not be found
682            */
683            public static CalEvent fetchByCompanyId_Last(long companyId,
684                    OrderByComparator<CalEvent> orderByComparator) {
685                    return getPersistence()
686                                       .fetchByCompanyId_Last(companyId, orderByComparator);
687            }
688    
689            /**
690            * Returns the cal events before and after the current cal event in the ordered set where companyId = &#63;.
691            *
692            * @param eventId the primary key of the current cal event
693            * @param companyId the company ID
694            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
695            * @return the previous, current, and next cal event
696            * @throws NoSuchEventException if a cal event with the primary key could not be found
697            */
698            public static CalEvent[] findByCompanyId_PrevAndNext(long eventId,
699                    long companyId, OrderByComparator<CalEvent> orderByComparator)
700                    throws com.liferay.portlet.calendar.NoSuchEventException {
701                    return getPersistence()
702                                       .findByCompanyId_PrevAndNext(eventId, companyId,
703                            orderByComparator);
704            }
705    
706            /**
707            * Removes all the cal events where companyId = &#63; from the database.
708            *
709            * @param companyId the company ID
710            */
711            public static void removeByCompanyId(long companyId) {
712                    getPersistence().removeByCompanyId(companyId);
713            }
714    
715            /**
716            * Returns the number of cal events where companyId = &#63;.
717            *
718            * @param companyId the company ID
719            * @return the number of matching cal events
720            */
721            public static int countByCompanyId(long companyId) {
722                    return getPersistence().countByCompanyId(companyId);
723            }
724    
725            /**
726            * Returns all the cal events where remindBy &ne; &#63;.
727            *
728            * @param remindBy the remind by
729            * @return the matching cal events
730            */
731            public static List<CalEvent> findByNotRemindBy(int remindBy) {
732                    return getPersistence().findByNotRemindBy(remindBy);
733            }
734    
735            /**
736            * Returns a range of all the cal events where remindBy &ne; &#63;.
737            *
738            * <p>
739            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CalEventModelImpl}. 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.
740            * </p>
741            *
742            * @param remindBy the remind by
743            * @param start the lower bound of the range of cal events
744            * @param end the upper bound of the range of cal events (not inclusive)
745            * @return the range of matching cal events
746            */
747            public static List<CalEvent> findByNotRemindBy(int remindBy, int start,
748                    int end) {
749                    return getPersistence().findByNotRemindBy(remindBy, start, end);
750            }
751    
752            /**
753            * Returns an ordered range of all the cal events where remindBy &ne; &#63;.
754            *
755            * <p>
756            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CalEventModelImpl}. 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.
757            * </p>
758            *
759            * @param remindBy the remind by
760            * @param start the lower bound of the range of cal events
761            * @param end the upper bound of the range of cal events (not inclusive)
762            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
763            * @return the ordered range of matching cal events
764            */
765            public static List<CalEvent> findByNotRemindBy(int remindBy, int start,
766                    int end, OrderByComparator<CalEvent> orderByComparator) {
767                    return getPersistence()
768                                       .findByNotRemindBy(remindBy, start, end, orderByComparator);
769            }
770    
771            /**
772            * Returns the first cal event in the ordered set where remindBy &ne; &#63;.
773            *
774            * @param remindBy the remind by
775            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
776            * @return the first matching cal event
777            * @throws NoSuchEventException if a matching cal event could not be found
778            */
779            public static CalEvent findByNotRemindBy_First(int remindBy,
780                    OrderByComparator<CalEvent> orderByComparator)
781                    throws com.liferay.portlet.calendar.NoSuchEventException {
782                    return getPersistence()
783                                       .findByNotRemindBy_First(remindBy, orderByComparator);
784            }
785    
786            /**
787            * Returns the first cal event in the ordered set where remindBy &ne; &#63;.
788            *
789            * @param remindBy the remind by
790            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
791            * @return the first matching cal event, or <code>null</code> if a matching cal event could not be found
792            */
793            public static CalEvent fetchByNotRemindBy_First(int remindBy,
794                    OrderByComparator<CalEvent> orderByComparator) {
795                    return getPersistence()
796                                       .fetchByNotRemindBy_First(remindBy, orderByComparator);
797            }
798    
799            /**
800            * Returns the last cal event in the ordered set where remindBy &ne; &#63;.
801            *
802            * @param remindBy the remind by
803            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
804            * @return the last matching cal event
805            * @throws NoSuchEventException if a matching cal event could not be found
806            */
807            public static CalEvent findByNotRemindBy_Last(int remindBy,
808                    OrderByComparator<CalEvent> orderByComparator)
809                    throws com.liferay.portlet.calendar.NoSuchEventException {
810                    return getPersistence()
811                                       .findByNotRemindBy_Last(remindBy, orderByComparator);
812            }
813    
814            /**
815            * Returns the last cal event in the ordered set where remindBy &ne; &#63;.
816            *
817            * @param remindBy the remind by
818            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
819            * @return the last matching cal event, or <code>null</code> if a matching cal event could not be found
820            */
821            public static CalEvent fetchByNotRemindBy_Last(int remindBy,
822                    OrderByComparator<CalEvent> orderByComparator) {
823                    return getPersistence()
824                                       .fetchByNotRemindBy_Last(remindBy, orderByComparator);
825            }
826    
827            /**
828            * Returns the cal events before and after the current cal event in the ordered set where remindBy &ne; &#63;.
829            *
830            * @param eventId the primary key of the current cal event
831            * @param remindBy the remind by
832            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
833            * @return the previous, current, and next cal event
834            * @throws NoSuchEventException if a cal event with the primary key could not be found
835            */
836            public static CalEvent[] findByNotRemindBy_PrevAndNext(long eventId,
837                    int remindBy, OrderByComparator<CalEvent> orderByComparator)
838                    throws com.liferay.portlet.calendar.NoSuchEventException {
839                    return getPersistence()
840                                       .findByNotRemindBy_PrevAndNext(eventId, remindBy,
841                            orderByComparator);
842            }
843    
844            /**
845            * Removes all the cal events where remindBy &ne; &#63; from the database.
846            *
847            * @param remindBy the remind by
848            */
849            public static void removeByNotRemindBy(int remindBy) {
850                    getPersistence().removeByNotRemindBy(remindBy);
851            }
852    
853            /**
854            * Returns the number of cal events where remindBy &ne; &#63;.
855            *
856            * @param remindBy the remind by
857            * @return the number of matching cal events
858            */
859            public static int countByNotRemindBy(int remindBy) {
860                    return getPersistence().countByNotRemindBy(remindBy);
861            }
862    
863            /**
864            * Returns all the cal events where groupId = &#63; and type = &#63;.
865            *
866            * @param groupId the group ID
867            * @param type the type
868            * @return the matching cal events
869            */
870            public static List<CalEvent> findByG_T(long groupId, java.lang.String type) {
871                    return getPersistence().findByG_T(groupId, type);
872            }
873    
874            /**
875            * Returns a range of all the cal events where groupId = &#63; and type = &#63;.
876            *
877            * <p>
878            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CalEventModelImpl}. 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.
879            * </p>
880            *
881            * @param groupId the group ID
882            * @param type the type
883            * @param start the lower bound of the range of cal events
884            * @param end the upper bound of the range of cal events (not inclusive)
885            * @return the range of matching cal events
886            */
887            public static List<CalEvent> findByG_T(long groupId, java.lang.String type,
888                    int start, int end) {
889                    return getPersistence().findByG_T(groupId, type, start, end);
890            }
891    
892            /**
893            * Returns an ordered range of all the cal events where groupId = &#63; and type = &#63;.
894            *
895            * <p>
896            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CalEventModelImpl}. 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.
897            * </p>
898            *
899            * @param groupId the group ID
900            * @param type the type
901            * @param start the lower bound of the range of cal events
902            * @param end the upper bound of the range of cal events (not inclusive)
903            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
904            * @return the ordered range of matching cal events
905            */
906            public static List<CalEvent> findByG_T(long groupId, java.lang.String type,
907                    int start, int end, OrderByComparator<CalEvent> orderByComparator) {
908                    return getPersistence()
909                                       .findByG_T(groupId, type, start, end, orderByComparator);
910            }
911    
912            /**
913            * Returns the first cal event in the ordered set where groupId = &#63; and type = &#63;.
914            *
915            * @param groupId the group ID
916            * @param type the type
917            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
918            * @return the first matching cal event
919            * @throws NoSuchEventException if a matching cal event could not be found
920            */
921            public static CalEvent findByG_T_First(long groupId, java.lang.String type,
922                    OrderByComparator<CalEvent> orderByComparator)
923                    throws com.liferay.portlet.calendar.NoSuchEventException {
924                    return getPersistence().findByG_T_First(groupId, type, orderByComparator);
925            }
926    
927            /**
928            * Returns the first cal event in the ordered set where groupId = &#63; and type = &#63;.
929            *
930            * @param groupId the group ID
931            * @param type the type
932            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
933            * @return the first matching cal event, or <code>null</code> if a matching cal event could not be found
934            */
935            public static CalEvent fetchByG_T_First(long groupId,
936                    java.lang.String type, OrderByComparator<CalEvent> orderByComparator) {
937                    return getPersistence()
938                                       .fetchByG_T_First(groupId, type, orderByComparator);
939            }
940    
941            /**
942            * Returns the last cal event in the ordered set where groupId = &#63; and type = &#63;.
943            *
944            * @param groupId the group ID
945            * @param type the type
946            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
947            * @return the last matching cal event
948            * @throws NoSuchEventException if a matching cal event could not be found
949            */
950            public static CalEvent findByG_T_Last(long groupId, java.lang.String type,
951                    OrderByComparator<CalEvent> orderByComparator)
952                    throws com.liferay.portlet.calendar.NoSuchEventException {
953                    return getPersistence().findByG_T_Last(groupId, type, orderByComparator);
954            }
955    
956            /**
957            * Returns the last cal event in the ordered set where groupId = &#63; and type = &#63;.
958            *
959            * @param groupId the group ID
960            * @param type the type
961            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
962            * @return the last matching cal event, or <code>null</code> if a matching cal event could not be found
963            */
964            public static CalEvent fetchByG_T_Last(long groupId, java.lang.String type,
965                    OrderByComparator<CalEvent> orderByComparator) {
966                    return getPersistence().fetchByG_T_Last(groupId, type, orderByComparator);
967            }
968    
969            /**
970            * Returns the cal events before and after the current cal event in the ordered set where groupId = &#63; and type = &#63;.
971            *
972            * @param eventId the primary key of the current cal event
973            * @param groupId the group ID
974            * @param type the type
975            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
976            * @return the previous, current, and next cal event
977            * @throws NoSuchEventException if a cal event with the primary key could not be found
978            */
979            public static CalEvent[] findByG_T_PrevAndNext(long eventId, long groupId,
980                    java.lang.String type, OrderByComparator<CalEvent> orderByComparator)
981                    throws com.liferay.portlet.calendar.NoSuchEventException {
982                    return getPersistence()
983                                       .findByG_T_PrevAndNext(eventId, groupId, type,
984                            orderByComparator);
985            }
986    
987            /**
988            * Returns all the cal events where groupId = &#63; and type = any &#63;.
989            *
990            * <p>
991            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CalEventModelImpl}. 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.
992            * </p>
993            *
994            * @param groupId the group ID
995            * @param types the types
996            * @return the matching cal events
997            */
998            public static List<CalEvent> findByG_T(long groupId,
999                    java.lang.String[] types) {
1000                    return getPersistence().findByG_T(groupId, types);
1001            }
1002    
1003            /**
1004            * Returns a range of all the cal events where groupId = &#63; and type = any &#63;.
1005            *
1006            * <p>
1007            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CalEventModelImpl}. 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.
1008            * </p>
1009            *
1010            * @param groupId the group ID
1011            * @param types the types
1012            * @param start the lower bound of the range of cal events
1013            * @param end the upper bound of the range of cal events (not inclusive)
1014            * @return the range of matching cal events
1015            */
1016            public static List<CalEvent> findByG_T(long groupId,
1017                    java.lang.String[] types, int start, int end) {
1018                    return getPersistence().findByG_T(groupId, types, start, end);
1019            }
1020    
1021            /**
1022            * Returns an ordered range of all the cal events where groupId = &#63; and type = any &#63;.
1023            *
1024            * <p>
1025            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CalEventModelImpl}. 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.
1026            * </p>
1027            *
1028            * @param groupId the group ID
1029            * @param types the types
1030            * @param start the lower bound of the range of cal events
1031            * @param end the upper bound of the range of cal events (not inclusive)
1032            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1033            * @return the ordered range of matching cal events
1034            */
1035            public static List<CalEvent> findByG_T(long groupId,
1036                    java.lang.String[] types, int start, int end,
1037                    OrderByComparator<CalEvent> orderByComparator) {
1038                    return getPersistence()
1039                                       .findByG_T(groupId, types, start, end, orderByComparator);
1040            }
1041    
1042            /**
1043            * Removes all the cal events where groupId = &#63; and type = &#63; from the database.
1044            *
1045            * @param groupId the group ID
1046            * @param type the type
1047            */
1048            public static void removeByG_T(long groupId, java.lang.String type) {
1049                    getPersistence().removeByG_T(groupId, type);
1050            }
1051    
1052            /**
1053            * Returns the number of cal events where groupId = &#63; and type = &#63;.
1054            *
1055            * @param groupId the group ID
1056            * @param type the type
1057            * @return the number of matching cal events
1058            */
1059            public static int countByG_T(long groupId, java.lang.String type) {
1060                    return getPersistence().countByG_T(groupId, type);
1061            }
1062    
1063            /**
1064            * Returns the number of cal events where groupId = &#63; and type = any &#63;.
1065            *
1066            * @param groupId the group ID
1067            * @param types the types
1068            * @return the number of matching cal events
1069            */
1070            public static int countByG_T(long groupId, java.lang.String[] types) {
1071                    return getPersistence().countByG_T(groupId, types);
1072            }
1073    
1074            /**
1075            * Returns all the cal events where groupId = &#63; and repeating = &#63;.
1076            *
1077            * @param groupId the group ID
1078            * @param repeating the repeating
1079            * @return the matching cal events
1080            */
1081            public static List<CalEvent> findByG_R(long groupId, boolean repeating) {
1082                    return getPersistence().findByG_R(groupId, repeating);
1083            }
1084    
1085            /**
1086            * Returns a range of all the cal events where groupId = &#63; and repeating = &#63;.
1087            *
1088            * <p>
1089            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CalEventModelImpl}. 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.
1090            * </p>
1091            *
1092            * @param groupId the group ID
1093            * @param repeating the repeating
1094            * @param start the lower bound of the range of cal events
1095            * @param end the upper bound of the range of cal events (not inclusive)
1096            * @return the range of matching cal events
1097            */
1098            public static List<CalEvent> findByG_R(long groupId, boolean repeating,
1099                    int start, int end) {
1100                    return getPersistence().findByG_R(groupId, repeating, start, end);
1101            }
1102    
1103            /**
1104            * Returns an ordered range of all the cal events where groupId = &#63; and repeating = &#63;.
1105            *
1106            * <p>
1107            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CalEventModelImpl}. 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.
1108            * </p>
1109            *
1110            * @param groupId the group ID
1111            * @param repeating the repeating
1112            * @param start the lower bound of the range of cal events
1113            * @param end the upper bound of the range of cal events (not inclusive)
1114            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1115            * @return the ordered range of matching cal events
1116            */
1117            public static List<CalEvent> findByG_R(long groupId, boolean repeating,
1118                    int start, int end, OrderByComparator<CalEvent> orderByComparator) {
1119                    return getPersistence()
1120                                       .findByG_R(groupId, repeating, start, end, orderByComparator);
1121            }
1122    
1123            /**
1124            * Returns the first cal event in the ordered set where groupId = &#63; and repeating = &#63;.
1125            *
1126            * @param groupId the group ID
1127            * @param repeating the repeating
1128            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1129            * @return the first matching cal event
1130            * @throws NoSuchEventException if a matching cal event could not be found
1131            */
1132            public static CalEvent findByG_R_First(long groupId, boolean repeating,
1133                    OrderByComparator<CalEvent> orderByComparator)
1134                    throws com.liferay.portlet.calendar.NoSuchEventException {
1135                    return getPersistence()
1136                                       .findByG_R_First(groupId, repeating, orderByComparator);
1137            }
1138    
1139            /**
1140            * Returns the first cal event in the ordered set where groupId = &#63; and repeating = &#63;.
1141            *
1142            * @param groupId the group ID
1143            * @param repeating the repeating
1144            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1145            * @return the first matching cal event, or <code>null</code> if a matching cal event could not be found
1146            */
1147            public static CalEvent fetchByG_R_First(long groupId, boolean repeating,
1148                    OrderByComparator<CalEvent> orderByComparator) {
1149                    return getPersistence()
1150                                       .fetchByG_R_First(groupId, repeating, orderByComparator);
1151            }
1152    
1153            /**
1154            * Returns the last cal event in the ordered set where groupId = &#63; and repeating = &#63;.
1155            *
1156            * @param groupId the group ID
1157            * @param repeating the repeating
1158            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1159            * @return the last matching cal event
1160            * @throws NoSuchEventException if a matching cal event could not be found
1161            */
1162            public static CalEvent findByG_R_Last(long groupId, boolean repeating,
1163                    OrderByComparator<CalEvent> orderByComparator)
1164                    throws com.liferay.portlet.calendar.NoSuchEventException {
1165                    return getPersistence()
1166                                       .findByG_R_Last(groupId, repeating, orderByComparator);
1167            }
1168    
1169            /**
1170            * Returns the last cal event in the ordered set where groupId = &#63; and repeating = &#63;.
1171            *
1172            * @param groupId the group ID
1173            * @param repeating the repeating
1174            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1175            * @return the last matching cal event, or <code>null</code> if a matching cal event could not be found
1176            */
1177            public static CalEvent fetchByG_R_Last(long groupId, boolean repeating,
1178                    OrderByComparator<CalEvent> orderByComparator) {
1179                    return getPersistence()
1180                                       .fetchByG_R_Last(groupId, repeating, orderByComparator);
1181            }
1182    
1183            /**
1184            * Returns the cal events before and after the current cal event in the ordered set where groupId = &#63; and repeating = &#63;.
1185            *
1186            * @param eventId the primary key of the current cal event
1187            * @param groupId the group ID
1188            * @param repeating the repeating
1189            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1190            * @return the previous, current, and next cal event
1191            * @throws NoSuchEventException if a cal event with the primary key could not be found
1192            */
1193            public static CalEvent[] findByG_R_PrevAndNext(long eventId, long groupId,
1194                    boolean repeating, OrderByComparator<CalEvent> orderByComparator)
1195                    throws com.liferay.portlet.calendar.NoSuchEventException {
1196                    return getPersistence()
1197                                       .findByG_R_PrevAndNext(eventId, groupId, repeating,
1198                            orderByComparator);
1199            }
1200    
1201            /**
1202            * Removes all the cal events where groupId = &#63; and repeating = &#63; from the database.
1203            *
1204            * @param groupId the group ID
1205            * @param repeating the repeating
1206            */
1207            public static void removeByG_R(long groupId, boolean repeating) {
1208                    getPersistence().removeByG_R(groupId, repeating);
1209            }
1210    
1211            /**
1212            * Returns the number of cal events where groupId = &#63; and repeating = &#63;.
1213            *
1214            * @param groupId the group ID
1215            * @param repeating the repeating
1216            * @return the number of matching cal events
1217            */
1218            public static int countByG_R(long groupId, boolean repeating) {
1219                    return getPersistence().countByG_R(groupId, repeating);
1220            }
1221    
1222            /**
1223            * Returns all the cal events where groupId = &#63; and type = &#63; and repeating = &#63;.
1224            *
1225            * @param groupId the group ID
1226            * @param type the type
1227            * @param repeating the repeating
1228            * @return the matching cal events
1229            */
1230            public static List<CalEvent> findByG_T_R(long groupId,
1231                    java.lang.String type, boolean repeating) {
1232                    return getPersistence().findByG_T_R(groupId, type, repeating);
1233            }
1234    
1235            /**
1236            * Returns a range of all the cal events where groupId = &#63; and type = &#63; and repeating = &#63;.
1237            *
1238            * <p>
1239            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CalEventModelImpl}. 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.
1240            * </p>
1241            *
1242            * @param groupId the group ID
1243            * @param type the type
1244            * @param repeating the repeating
1245            * @param start the lower bound of the range of cal events
1246            * @param end the upper bound of the range of cal events (not inclusive)
1247            * @return the range of matching cal events
1248            */
1249            public static List<CalEvent> findByG_T_R(long groupId,
1250                    java.lang.String type, boolean repeating, int start, int end) {
1251                    return getPersistence().findByG_T_R(groupId, type, repeating, start, end);
1252            }
1253    
1254            /**
1255            * Returns an ordered range of all the cal events where groupId = &#63; and type = &#63; and repeating = &#63;.
1256            *
1257            * <p>
1258            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CalEventModelImpl}. 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.
1259            * </p>
1260            *
1261            * @param groupId the group ID
1262            * @param type the type
1263            * @param repeating the repeating
1264            * @param start the lower bound of the range of cal events
1265            * @param end the upper bound of the range of cal events (not inclusive)
1266            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1267            * @return the ordered range of matching cal events
1268            */
1269            public static List<CalEvent> findByG_T_R(long groupId,
1270                    java.lang.String type, boolean repeating, int start, int end,
1271                    OrderByComparator<CalEvent> orderByComparator) {
1272                    return getPersistence()
1273                                       .findByG_T_R(groupId, type, repeating, start, end,
1274                            orderByComparator);
1275            }
1276    
1277            /**
1278            * Returns the first cal event in the ordered set where groupId = &#63; and type = &#63; and repeating = &#63;.
1279            *
1280            * @param groupId the group ID
1281            * @param type the type
1282            * @param repeating the repeating
1283            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1284            * @return the first matching cal event
1285            * @throws NoSuchEventException if a matching cal event could not be found
1286            */
1287            public static CalEvent findByG_T_R_First(long groupId,
1288                    java.lang.String type, boolean repeating,
1289                    OrderByComparator<CalEvent> orderByComparator)
1290                    throws com.liferay.portlet.calendar.NoSuchEventException {
1291                    return getPersistence()
1292                                       .findByG_T_R_First(groupId, type, repeating,
1293                            orderByComparator);
1294            }
1295    
1296            /**
1297            * Returns the first cal event in the ordered set where groupId = &#63; and type = &#63; and repeating = &#63;.
1298            *
1299            * @param groupId the group ID
1300            * @param type the type
1301            * @param repeating the repeating
1302            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1303            * @return the first matching cal event, or <code>null</code> if a matching cal event could not be found
1304            */
1305            public static CalEvent fetchByG_T_R_First(long groupId,
1306                    java.lang.String type, boolean repeating,
1307                    OrderByComparator<CalEvent> orderByComparator) {
1308                    return getPersistence()
1309                                       .fetchByG_T_R_First(groupId, type, repeating,
1310                            orderByComparator);
1311            }
1312    
1313            /**
1314            * Returns the last cal event in the ordered set where groupId = &#63; and type = &#63; and repeating = &#63;.
1315            *
1316            * @param groupId the group ID
1317            * @param type the type
1318            * @param repeating the repeating
1319            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1320            * @return the last matching cal event
1321            * @throws NoSuchEventException if a matching cal event could not be found
1322            */
1323            public static CalEvent findByG_T_R_Last(long groupId,
1324                    java.lang.String type, boolean repeating,
1325                    OrderByComparator<CalEvent> orderByComparator)
1326                    throws com.liferay.portlet.calendar.NoSuchEventException {
1327                    return getPersistence()
1328                                       .findByG_T_R_Last(groupId, type, repeating, orderByComparator);
1329            }
1330    
1331            /**
1332            * Returns the last cal event in the ordered set where groupId = &#63; and type = &#63; and repeating = &#63;.
1333            *
1334            * @param groupId the group ID
1335            * @param type the type
1336            * @param repeating the repeating
1337            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1338            * @return the last matching cal event, or <code>null</code> if a matching cal event could not be found
1339            */
1340            public static CalEvent fetchByG_T_R_Last(long groupId,
1341                    java.lang.String type, boolean repeating,
1342                    OrderByComparator<CalEvent> orderByComparator) {
1343                    return getPersistence()
1344                                       .fetchByG_T_R_Last(groupId, type, repeating,
1345                            orderByComparator);
1346            }
1347    
1348            /**
1349            * Returns the cal events before and after the current cal event in the ordered set where groupId = &#63; and type = &#63; and repeating = &#63;.
1350            *
1351            * @param eventId the primary key of the current cal event
1352            * @param groupId the group ID
1353            * @param type the type
1354            * @param repeating the repeating
1355            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1356            * @return the previous, current, and next cal event
1357            * @throws NoSuchEventException if a cal event with the primary key could not be found
1358            */
1359            public static CalEvent[] findByG_T_R_PrevAndNext(long eventId,
1360                    long groupId, java.lang.String type, boolean repeating,
1361                    OrderByComparator<CalEvent> orderByComparator)
1362                    throws com.liferay.portlet.calendar.NoSuchEventException {
1363                    return getPersistence()
1364                                       .findByG_T_R_PrevAndNext(eventId, groupId, type, repeating,
1365                            orderByComparator);
1366            }
1367    
1368            /**
1369            * Returns all the cal events where groupId = &#63; and type = any &#63; and repeating = &#63;.
1370            *
1371            * <p>
1372            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CalEventModelImpl}. 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.
1373            * </p>
1374            *
1375            * @param groupId the group ID
1376            * @param types the types
1377            * @param repeating the repeating
1378            * @return the matching cal events
1379            */
1380            public static List<CalEvent> findByG_T_R(long groupId,
1381                    java.lang.String[] types, boolean repeating) {
1382                    return getPersistence().findByG_T_R(groupId, types, repeating);
1383            }
1384    
1385            /**
1386            * Returns a range of all the cal events where groupId = &#63; and type = any &#63; and repeating = &#63;.
1387            *
1388            * <p>
1389            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CalEventModelImpl}. 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.
1390            * </p>
1391            *
1392            * @param groupId the group ID
1393            * @param types the types
1394            * @param repeating the repeating
1395            * @param start the lower bound of the range of cal events
1396            * @param end the upper bound of the range of cal events (not inclusive)
1397            * @return the range of matching cal events
1398            */
1399            public static List<CalEvent> findByG_T_R(long groupId,
1400                    java.lang.String[] types, boolean repeating, int start, int end) {
1401                    return getPersistence()
1402                                       .findByG_T_R(groupId, types, repeating, start, end);
1403            }
1404    
1405            /**
1406            * Returns an ordered range of all the cal events where groupId = &#63; and type = any &#63; and repeating = &#63;.
1407            *
1408            * <p>
1409            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CalEventModelImpl}. 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.
1410            * </p>
1411            *
1412            * @param groupId the group ID
1413            * @param types the types
1414            * @param repeating the repeating
1415            * @param start the lower bound of the range of cal events
1416            * @param end the upper bound of the range of cal events (not inclusive)
1417            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1418            * @return the ordered range of matching cal events
1419            */
1420            public static List<CalEvent> findByG_T_R(long groupId,
1421                    java.lang.String[] types, boolean repeating, int start, int end,
1422                    OrderByComparator<CalEvent> orderByComparator) {
1423                    return getPersistence()
1424                                       .findByG_T_R(groupId, types, repeating, start, end,
1425                            orderByComparator);
1426            }
1427    
1428            /**
1429            * Removes all the cal events where groupId = &#63; and type = &#63; and repeating = &#63; from the database.
1430            *
1431            * @param groupId the group ID
1432            * @param type the type
1433            * @param repeating the repeating
1434            */
1435            public static void removeByG_T_R(long groupId, java.lang.String type,
1436                    boolean repeating) {
1437                    getPersistence().removeByG_T_R(groupId, type, repeating);
1438            }
1439    
1440            /**
1441            * Returns the number of cal events where groupId = &#63; and type = &#63; and repeating = &#63;.
1442            *
1443            * @param groupId the group ID
1444            * @param type the type
1445            * @param repeating the repeating
1446            * @return the number of matching cal events
1447            */
1448            public static int countByG_T_R(long groupId, java.lang.String type,
1449                    boolean repeating) {
1450                    return getPersistence().countByG_T_R(groupId, type, repeating);
1451            }
1452    
1453            /**
1454            * Returns the number of cal events where groupId = &#63; and type = any &#63; and repeating = &#63;.
1455            *
1456            * @param groupId the group ID
1457            * @param types the types
1458            * @param repeating the repeating
1459            * @return the number of matching cal events
1460            */
1461            public static int countByG_T_R(long groupId, java.lang.String[] types,
1462                    boolean repeating) {
1463                    return getPersistence().countByG_T_R(groupId, types, repeating);
1464            }
1465    
1466            /**
1467            * Caches the cal event in the entity cache if it is enabled.
1468            *
1469            * @param calEvent the cal event
1470            */
1471            public static void cacheResult(CalEvent calEvent) {
1472                    getPersistence().cacheResult(calEvent);
1473            }
1474    
1475            /**
1476            * Caches the cal events in the entity cache if it is enabled.
1477            *
1478            * @param calEvents the cal events
1479            */
1480            public static void cacheResult(List<CalEvent> calEvents) {
1481                    getPersistence().cacheResult(calEvents);
1482            }
1483    
1484            /**
1485            * Creates a new cal event with the primary key. Does not add the cal event to the database.
1486            *
1487            * @param eventId the primary key for the new cal event
1488            * @return the new cal event
1489            */
1490            public static CalEvent create(long eventId) {
1491                    return getPersistence().create(eventId);
1492            }
1493    
1494            /**
1495            * Removes the cal event with the primary key from the database. Also notifies the appropriate model listeners.
1496            *
1497            * @param eventId the primary key of the cal event
1498            * @return the cal event that was removed
1499            * @throws NoSuchEventException if a cal event with the primary key could not be found
1500            */
1501            public static CalEvent remove(long eventId)
1502                    throws com.liferay.portlet.calendar.NoSuchEventException {
1503                    return getPersistence().remove(eventId);
1504            }
1505    
1506            public static CalEvent updateImpl(CalEvent calEvent) {
1507                    return getPersistence().updateImpl(calEvent);
1508            }
1509    
1510            /**
1511            * Returns the cal event with the primary key or throws a {@link NoSuchEventException} if it could not be found.
1512            *
1513            * @param eventId the primary key of the cal event
1514            * @return the cal event
1515            * @throws NoSuchEventException if a cal event with the primary key could not be found
1516            */
1517            public static CalEvent findByPrimaryKey(long eventId)
1518                    throws com.liferay.portlet.calendar.NoSuchEventException {
1519                    return getPersistence().findByPrimaryKey(eventId);
1520            }
1521    
1522            /**
1523            * Returns the cal event with the primary key or returns <code>null</code> if it could not be found.
1524            *
1525            * @param eventId the primary key of the cal event
1526            * @return the cal event, or <code>null</code> if a cal event with the primary key could not be found
1527            */
1528            public static CalEvent fetchByPrimaryKey(long eventId) {
1529                    return getPersistence().fetchByPrimaryKey(eventId);
1530            }
1531    
1532            public static java.util.Map<java.io.Serializable, CalEvent> fetchByPrimaryKeys(
1533                    java.util.Set<java.io.Serializable> primaryKeys) {
1534                    return getPersistence().fetchByPrimaryKeys(primaryKeys);
1535            }
1536    
1537            /**
1538            * Returns all the cal events.
1539            *
1540            * @return the cal events
1541            */
1542            public static List<CalEvent> findAll() {
1543                    return getPersistence().findAll();
1544            }
1545    
1546            /**
1547            * Returns a range of all the cal events.
1548            *
1549            * <p>
1550            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CalEventModelImpl}. 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.
1551            * </p>
1552            *
1553            * @param start the lower bound of the range of cal events
1554            * @param end the upper bound of the range of cal events (not inclusive)
1555            * @return the range of cal events
1556            */
1557            public static List<CalEvent> findAll(int start, int end) {
1558                    return getPersistence().findAll(start, end);
1559            }
1560    
1561            /**
1562            * Returns an ordered range of all the cal events.
1563            *
1564            * <p>
1565            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CalEventModelImpl}. 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.
1566            * </p>
1567            *
1568            * @param start the lower bound of the range of cal events
1569            * @param end the upper bound of the range of cal events (not inclusive)
1570            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1571            * @return the ordered range of cal events
1572            */
1573            public static List<CalEvent> findAll(int start, int end,
1574                    OrderByComparator<CalEvent> orderByComparator) {
1575                    return getPersistence().findAll(start, end, orderByComparator);
1576            }
1577    
1578            /**
1579            * Removes all the cal events from the database.
1580            */
1581            public static void removeAll() {
1582                    getPersistence().removeAll();
1583            }
1584    
1585            /**
1586            * Returns the number of cal events.
1587            *
1588            * @return the number of cal events
1589            */
1590            public static int countAll() {
1591                    return getPersistence().countAll();
1592            }
1593    
1594            public static CalEventPersistence getPersistence() {
1595                    if (_persistence == null) {
1596                            _persistence = (CalEventPersistence)PortalBeanLocatorUtil.locate(CalEventPersistence.class.getName());
1597    
1598                            ReferenceRegistry.registerReference(CalEventUtil.class,
1599                                    "_persistence");
1600                    }
1601    
1602                    return _persistence;
1603            }
1604    
1605            /**
1606             * @deprecated As of 6.2.0
1607             */
1608            @Deprecated
1609            public void setPersistence(CalEventPersistence persistence) {
1610            }
1611    
1612            private static CalEventPersistence _persistence;
1613    }