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