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