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.documentlibrary.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.documentlibrary.model.DLSyncEvent;
026    
027    import java.util.List;
028    
029    /**
030     * The persistence utility for the d l sync event service. This utility wraps {@link com.liferay.portlet.documentlibrary.service.persistence.impl.DLSyncEventPersistenceImpl} 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 DLSyncEventPersistence
038     * @see com.liferay.portlet.documentlibrary.service.persistence.impl.DLSyncEventPersistenceImpl
039     * @generated
040     */
041    @ProviderType
042    public class DLSyncEventUtil {
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(DLSyncEvent dlSyncEvent) {
060                    getPersistence().clearCache(dlSyncEvent);
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<DLSyncEvent> findWithDynamicQuery(
074                    DynamicQuery dynamicQuery) {
075                    return getPersistence().findWithDynamicQuery(dynamicQuery);
076            }
077    
078            /**
079             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
080             */
081            public static List<DLSyncEvent> findWithDynamicQuery(
082                    DynamicQuery dynamicQuery, int start, int end) {
083                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
084            }
085    
086            /**
087             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
088             */
089            public static List<DLSyncEvent> findWithDynamicQuery(
090                    DynamicQuery dynamicQuery, int start, int end,
091                    OrderByComparator<DLSyncEvent> orderByComparator) {
092                    return getPersistence()
093                                       .findWithDynamicQuery(dynamicQuery, start, end,
094                            orderByComparator);
095            }
096    
097            /**
098             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
099             */
100            public static DLSyncEvent update(DLSyncEvent dlSyncEvent) {
101                    return getPersistence().update(dlSyncEvent);
102            }
103    
104            /**
105             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
106             */
107            public static DLSyncEvent update(DLSyncEvent dlSyncEvent,
108                    ServiceContext serviceContext) {
109                    return getPersistence().update(dlSyncEvent, serviceContext);
110            }
111    
112            /**
113            * Returns all the d l sync events where modifiedTime &gt; &#63;.
114            *
115            * @param modifiedTime the modified time
116            * @return the matching d l sync events
117            */
118            public static List<DLSyncEvent> findByModifiedTime(long modifiedTime) {
119                    return getPersistence().findByModifiedTime(modifiedTime);
120            }
121    
122            /**
123            * Returns a range of all the d l sync events where modifiedTime &gt; &#63;.
124            *
125            * <p>
126            * 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 DLSyncEventModelImpl}. 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.
127            * </p>
128            *
129            * @param modifiedTime the modified time
130            * @param start the lower bound of the range of d l sync events
131            * @param end the upper bound of the range of d l sync events (not inclusive)
132            * @return the range of matching d l sync events
133            */
134            public static List<DLSyncEvent> findByModifiedTime(long modifiedTime,
135                    int start, int end) {
136                    return getPersistence().findByModifiedTime(modifiedTime, start, end);
137            }
138    
139            /**
140            * Returns an ordered range of all the d l sync events where modifiedTime &gt; &#63;.
141            *
142            * <p>
143            * 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 DLSyncEventModelImpl}. 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.
144            * </p>
145            *
146            * @param modifiedTime the modified time
147            * @param start the lower bound of the range of d l sync events
148            * @param end the upper bound of the range of d l sync events (not inclusive)
149            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
150            * @return the ordered range of matching d l sync events
151            */
152            public static List<DLSyncEvent> findByModifiedTime(long modifiedTime,
153                    int start, int end, OrderByComparator<DLSyncEvent> orderByComparator) {
154                    return getPersistence()
155                                       .findByModifiedTime(modifiedTime, start, end,
156                            orderByComparator);
157            }
158    
159            /**
160            * Returns an ordered range of all the d l sync events where modifiedTime &gt; &#63;.
161            *
162            * <p>
163            * 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 DLSyncEventModelImpl}. 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.
164            * </p>
165            *
166            * @param modifiedTime the modified time
167            * @param start the lower bound of the range of d l sync events
168            * @param end the upper bound of the range of d l sync events (not inclusive)
169            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
170            * @param retrieveFromCache whether to retrieve from the finder cache
171            * @return the ordered range of matching d l sync events
172            */
173            public static List<DLSyncEvent> findByModifiedTime(long modifiedTime,
174                    int start, int end, OrderByComparator<DLSyncEvent> orderByComparator,
175                    boolean retrieveFromCache) {
176                    return getPersistence()
177                                       .findByModifiedTime(modifiedTime, start, end,
178                            orderByComparator, retrieveFromCache);
179            }
180    
181            /**
182            * Returns the first d l sync event in the ordered set where modifiedTime &gt; &#63;.
183            *
184            * @param modifiedTime the modified time
185            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
186            * @return the first matching d l sync event
187            * @throws NoSuchSyncEventException if a matching d l sync event could not be found
188            */
189            public static DLSyncEvent findByModifiedTime_First(long modifiedTime,
190                    OrderByComparator<DLSyncEvent> orderByComparator)
191                    throws com.liferay.portlet.documentlibrary.exception.NoSuchSyncEventException {
192                    return getPersistence()
193                                       .findByModifiedTime_First(modifiedTime, orderByComparator);
194            }
195    
196            /**
197            * Returns the first d l sync event in the ordered set where modifiedTime &gt; &#63;.
198            *
199            * @param modifiedTime the modified time
200            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
201            * @return the first matching d l sync event, or <code>null</code> if a matching d l sync event could not be found
202            */
203            public static DLSyncEvent fetchByModifiedTime_First(long modifiedTime,
204                    OrderByComparator<DLSyncEvent> orderByComparator) {
205                    return getPersistence()
206                                       .fetchByModifiedTime_First(modifiedTime, orderByComparator);
207            }
208    
209            /**
210            * Returns the last d l sync event in the ordered set where modifiedTime &gt; &#63;.
211            *
212            * @param modifiedTime the modified time
213            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
214            * @return the last matching d l sync event
215            * @throws NoSuchSyncEventException if a matching d l sync event could not be found
216            */
217            public static DLSyncEvent findByModifiedTime_Last(long modifiedTime,
218                    OrderByComparator<DLSyncEvent> orderByComparator)
219                    throws com.liferay.portlet.documentlibrary.exception.NoSuchSyncEventException {
220                    return getPersistence()
221                                       .findByModifiedTime_Last(modifiedTime, orderByComparator);
222            }
223    
224            /**
225            * Returns the last d l sync event in the ordered set where modifiedTime &gt; &#63;.
226            *
227            * @param modifiedTime the modified time
228            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
229            * @return the last matching d l sync event, or <code>null</code> if a matching d l sync event could not be found
230            */
231            public static DLSyncEvent fetchByModifiedTime_Last(long modifiedTime,
232                    OrderByComparator<DLSyncEvent> orderByComparator) {
233                    return getPersistence()
234                                       .fetchByModifiedTime_Last(modifiedTime, orderByComparator);
235            }
236    
237            /**
238            * Returns the d l sync events before and after the current d l sync event in the ordered set where modifiedTime &gt; &#63;.
239            *
240            * @param syncEventId the primary key of the current d l sync event
241            * @param modifiedTime the modified time
242            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
243            * @return the previous, current, and next d l sync event
244            * @throws NoSuchSyncEventException if a d l sync event with the primary key could not be found
245            */
246            public static DLSyncEvent[] findByModifiedTime_PrevAndNext(
247                    long syncEventId, long modifiedTime,
248                    OrderByComparator<DLSyncEvent> orderByComparator)
249                    throws com.liferay.portlet.documentlibrary.exception.NoSuchSyncEventException {
250                    return getPersistence()
251                                       .findByModifiedTime_PrevAndNext(syncEventId, modifiedTime,
252                            orderByComparator);
253            }
254    
255            /**
256            * Removes all the d l sync events where modifiedTime &gt; &#63; from the database.
257            *
258            * @param modifiedTime the modified time
259            */
260            public static void removeByModifiedTime(long modifiedTime) {
261                    getPersistence().removeByModifiedTime(modifiedTime);
262            }
263    
264            /**
265            * Returns the number of d l sync events where modifiedTime &gt; &#63;.
266            *
267            * @param modifiedTime the modified time
268            * @return the number of matching d l sync events
269            */
270            public static int countByModifiedTime(long modifiedTime) {
271                    return getPersistence().countByModifiedTime(modifiedTime);
272            }
273    
274            /**
275            * Returns the d l sync event where typePK = &#63; or throws a {@link NoSuchSyncEventException} if it could not be found.
276            *
277            * @param typePK the type p k
278            * @return the matching d l sync event
279            * @throws NoSuchSyncEventException if a matching d l sync event could not be found
280            */
281            public static DLSyncEvent findByTypePK(long typePK)
282                    throws com.liferay.portlet.documentlibrary.exception.NoSuchSyncEventException {
283                    return getPersistence().findByTypePK(typePK);
284            }
285    
286            /**
287            * Returns the d l sync event where typePK = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
288            *
289            * @param typePK the type p k
290            * @return the matching d l sync event, or <code>null</code> if a matching d l sync event could not be found
291            */
292            public static DLSyncEvent fetchByTypePK(long typePK) {
293                    return getPersistence().fetchByTypePK(typePK);
294            }
295    
296            /**
297            * Returns the d l sync event where typePK = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
298            *
299            * @param typePK the type p k
300            * @param retrieveFromCache whether to retrieve from the finder cache
301            * @return the matching d l sync event, or <code>null</code> if a matching d l sync event could not be found
302            */
303            public static DLSyncEvent fetchByTypePK(long typePK,
304                    boolean retrieveFromCache) {
305                    return getPersistence().fetchByTypePK(typePK, retrieveFromCache);
306            }
307    
308            /**
309            * Removes the d l sync event where typePK = &#63; from the database.
310            *
311            * @param typePK the type p k
312            * @return the d l sync event that was removed
313            */
314            public static DLSyncEvent removeByTypePK(long typePK)
315                    throws com.liferay.portlet.documentlibrary.exception.NoSuchSyncEventException {
316                    return getPersistence().removeByTypePK(typePK);
317            }
318    
319            /**
320            * Returns the number of d l sync events where typePK = &#63;.
321            *
322            * @param typePK the type p k
323            * @return the number of matching d l sync events
324            */
325            public static int countByTypePK(long typePK) {
326                    return getPersistence().countByTypePK(typePK);
327            }
328    
329            /**
330            * Caches the d l sync event in the entity cache if it is enabled.
331            *
332            * @param dlSyncEvent the d l sync event
333            */
334            public static void cacheResult(DLSyncEvent dlSyncEvent) {
335                    getPersistence().cacheResult(dlSyncEvent);
336            }
337    
338            /**
339            * Caches the d l sync events in the entity cache if it is enabled.
340            *
341            * @param dlSyncEvents the d l sync events
342            */
343            public static void cacheResult(List<DLSyncEvent> dlSyncEvents) {
344                    getPersistence().cacheResult(dlSyncEvents);
345            }
346    
347            /**
348            * Creates a new d l sync event with the primary key. Does not add the d l sync event to the database.
349            *
350            * @param syncEventId the primary key for the new d l sync event
351            * @return the new d l sync event
352            */
353            public static DLSyncEvent create(long syncEventId) {
354                    return getPersistence().create(syncEventId);
355            }
356    
357            /**
358            * Removes the d l sync event with the primary key from the database. Also notifies the appropriate model listeners.
359            *
360            * @param syncEventId the primary key of the d l sync event
361            * @return the d l sync event that was removed
362            * @throws NoSuchSyncEventException if a d l sync event with the primary key could not be found
363            */
364            public static DLSyncEvent remove(long syncEventId)
365                    throws com.liferay.portlet.documentlibrary.exception.NoSuchSyncEventException {
366                    return getPersistence().remove(syncEventId);
367            }
368    
369            public static DLSyncEvent updateImpl(DLSyncEvent dlSyncEvent) {
370                    return getPersistence().updateImpl(dlSyncEvent);
371            }
372    
373            /**
374            * Returns the d l sync event with the primary key or throws a {@link NoSuchSyncEventException} if it could not be found.
375            *
376            * @param syncEventId the primary key of the d l sync event
377            * @return the d l sync event
378            * @throws NoSuchSyncEventException if a d l sync event with the primary key could not be found
379            */
380            public static DLSyncEvent findByPrimaryKey(long syncEventId)
381                    throws com.liferay.portlet.documentlibrary.exception.NoSuchSyncEventException {
382                    return getPersistence().findByPrimaryKey(syncEventId);
383            }
384    
385            /**
386            * Returns the d l sync event with the primary key or returns <code>null</code> if it could not be found.
387            *
388            * @param syncEventId the primary key of the d l sync event
389            * @return the d l sync event, or <code>null</code> if a d l sync event with the primary key could not be found
390            */
391            public static DLSyncEvent fetchByPrimaryKey(long syncEventId) {
392                    return getPersistence().fetchByPrimaryKey(syncEventId);
393            }
394    
395            public static java.util.Map<java.io.Serializable, DLSyncEvent> fetchByPrimaryKeys(
396                    java.util.Set<java.io.Serializable> primaryKeys) {
397                    return getPersistence().fetchByPrimaryKeys(primaryKeys);
398            }
399    
400            /**
401            * Returns all the d l sync events.
402            *
403            * @return the d l sync events
404            */
405            public static List<DLSyncEvent> findAll() {
406                    return getPersistence().findAll();
407            }
408    
409            /**
410            * Returns a range of all the d l sync events.
411            *
412            * <p>
413            * 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 DLSyncEventModelImpl}. 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.
414            * </p>
415            *
416            * @param start the lower bound of the range of d l sync events
417            * @param end the upper bound of the range of d l sync events (not inclusive)
418            * @return the range of d l sync events
419            */
420            public static List<DLSyncEvent> findAll(int start, int end) {
421                    return getPersistence().findAll(start, end);
422            }
423    
424            /**
425            * Returns an ordered range of all the d l sync events.
426            *
427            * <p>
428            * 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 DLSyncEventModelImpl}. 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.
429            * </p>
430            *
431            * @param start the lower bound of the range of d l sync events
432            * @param end the upper bound of the range of d l sync events (not inclusive)
433            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
434            * @return the ordered range of d l sync events
435            */
436            public static List<DLSyncEvent> findAll(int start, int end,
437                    OrderByComparator<DLSyncEvent> orderByComparator) {
438                    return getPersistence().findAll(start, end, orderByComparator);
439            }
440    
441            /**
442            * Returns an ordered range of all the d l sync events.
443            *
444            * <p>
445            * 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 DLSyncEventModelImpl}. 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.
446            * </p>
447            *
448            * @param start the lower bound of the range of d l sync events
449            * @param end the upper bound of the range of d l sync events (not inclusive)
450            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
451            * @param retrieveFromCache whether to retrieve from the finder cache
452            * @return the ordered range of d l sync events
453            */
454            public static List<DLSyncEvent> findAll(int start, int end,
455                    OrderByComparator<DLSyncEvent> orderByComparator,
456                    boolean retrieveFromCache) {
457                    return getPersistence()
458                                       .findAll(start, end, orderByComparator, retrieveFromCache);
459            }
460    
461            /**
462            * Removes all the d l sync events from the database.
463            */
464            public static void removeAll() {
465                    getPersistence().removeAll();
466            }
467    
468            /**
469            * Returns the number of d l sync events.
470            *
471            * @return the number of d l sync events
472            */
473            public static int countAll() {
474                    return getPersistence().countAll();
475            }
476    
477            public static java.util.Set<java.lang.String> getBadColumnNames() {
478                    return getPersistence().getBadColumnNames();
479            }
480    
481            public static DLSyncEventPersistence getPersistence() {
482                    if (_persistence == null) {
483                            _persistence = (DLSyncEventPersistence)PortalBeanLocatorUtil.locate(DLSyncEventPersistence.class.getName());
484    
485                            ReferenceRegistry.registerReference(DLSyncEventUtil.class,
486                                    "_persistence");
487                    }
488    
489                    return _persistence;
490            }
491    
492            private static DLSyncEventPersistence _persistence;
493    }