001    /**
002     * Copyright (c) 2000-2012 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.UserTrackerPath;
023    import com.liferay.portal.service.ServiceContext;
024    
025    import java.util.List;
026    
027    /**
028     * The persistence utility for the user tracker path service. This utility wraps {@link UserTrackerPathPersistenceImpl} 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 UserTrackerPathPersistence
036     * @see UserTrackerPathPersistenceImpl
037     * @generated
038     */
039    public class UserTrackerPathUtil {
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(UserTrackerPath userTrackerPath) {
057                    getPersistence().clearCache(userTrackerPath);
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<UserTrackerPath> 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<UserTrackerPath> 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<UserTrackerPath> 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#update(com.liferay.portal.model.BaseModel, boolean)
098             */
099            public static UserTrackerPath update(UserTrackerPath userTrackerPath,
100                    boolean merge) throws SystemException {
101                    return getPersistence().update(userTrackerPath, merge);
102            }
103    
104            /**
105             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
106             */
107            public static UserTrackerPath update(UserTrackerPath userTrackerPath,
108                    boolean merge, ServiceContext serviceContext) throws SystemException {
109                    return getPersistence().update(userTrackerPath, merge, serviceContext);
110            }
111    
112            /**
113            * Caches the user tracker path in the entity cache if it is enabled.
114            *
115            * @param userTrackerPath the user tracker path
116            */
117            public static void cacheResult(
118                    com.liferay.portal.model.UserTrackerPath userTrackerPath) {
119                    getPersistence().cacheResult(userTrackerPath);
120            }
121    
122            /**
123            * Caches the user tracker paths in the entity cache if it is enabled.
124            *
125            * @param userTrackerPaths the user tracker paths
126            */
127            public static void cacheResult(
128                    java.util.List<com.liferay.portal.model.UserTrackerPath> userTrackerPaths) {
129                    getPersistence().cacheResult(userTrackerPaths);
130            }
131    
132            /**
133            * Creates a new user tracker path with the primary key. Does not add the user tracker path to the database.
134            *
135            * @param userTrackerPathId the primary key for the new user tracker path
136            * @return the new user tracker path
137            */
138            public static com.liferay.portal.model.UserTrackerPath create(
139                    long userTrackerPathId) {
140                    return getPersistence().create(userTrackerPathId);
141            }
142    
143            /**
144            * Removes the user tracker path with the primary key from the database. Also notifies the appropriate model listeners.
145            *
146            * @param userTrackerPathId the primary key of the user tracker path
147            * @return the user tracker path that was removed
148            * @throws com.liferay.portal.NoSuchUserTrackerPathException if a user tracker path with the primary key could not be found
149            * @throws SystemException if a system exception occurred
150            */
151            public static com.liferay.portal.model.UserTrackerPath remove(
152                    long userTrackerPathId)
153                    throws com.liferay.portal.NoSuchUserTrackerPathException,
154                            com.liferay.portal.kernel.exception.SystemException {
155                    return getPersistence().remove(userTrackerPathId);
156            }
157    
158            public static com.liferay.portal.model.UserTrackerPath updateImpl(
159                    com.liferay.portal.model.UserTrackerPath userTrackerPath, boolean merge)
160                    throws com.liferay.portal.kernel.exception.SystemException {
161                    return getPersistence().updateImpl(userTrackerPath, merge);
162            }
163    
164            /**
165            * Returns the user tracker path with the primary key or throws a {@link com.liferay.portal.NoSuchUserTrackerPathException} if it could not be found.
166            *
167            * @param userTrackerPathId the primary key of the user tracker path
168            * @return the user tracker path
169            * @throws com.liferay.portal.NoSuchUserTrackerPathException if a user tracker path with the primary key could not be found
170            * @throws SystemException if a system exception occurred
171            */
172            public static com.liferay.portal.model.UserTrackerPath findByPrimaryKey(
173                    long userTrackerPathId)
174                    throws com.liferay.portal.NoSuchUserTrackerPathException,
175                            com.liferay.portal.kernel.exception.SystemException {
176                    return getPersistence().findByPrimaryKey(userTrackerPathId);
177            }
178    
179            /**
180            * Returns the user tracker path with the primary key or returns <code>null</code> if it could not be found.
181            *
182            * @param userTrackerPathId the primary key of the user tracker path
183            * @return the user tracker path, or <code>null</code> if a user tracker path with the primary key could not be found
184            * @throws SystemException if a system exception occurred
185            */
186            public static com.liferay.portal.model.UserTrackerPath fetchByPrimaryKey(
187                    long userTrackerPathId)
188                    throws com.liferay.portal.kernel.exception.SystemException {
189                    return getPersistence().fetchByPrimaryKey(userTrackerPathId);
190            }
191    
192            /**
193            * Returns all the user tracker paths where userTrackerId = &#63;.
194            *
195            * @param userTrackerId the user tracker ID
196            * @return the matching user tracker paths
197            * @throws SystemException if a system exception occurred
198            */
199            public static java.util.List<com.liferay.portal.model.UserTrackerPath> findByUserTrackerId(
200                    long userTrackerId)
201                    throws com.liferay.portal.kernel.exception.SystemException {
202                    return getPersistence().findByUserTrackerId(userTrackerId);
203            }
204    
205            /**
206            * Returns a range of all the user tracker paths where userTrackerId = &#63;.
207            *
208            * <p>
209            * 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.
210            * </p>
211            *
212            * @param userTrackerId the user tracker ID
213            * @param start the lower bound of the range of user tracker paths
214            * @param end the upper bound of the range of user tracker paths (not inclusive)
215            * @return the range of matching user tracker paths
216            * @throws SystemException if a system exception occurred
217            */
218            public static java.util.List<com.liferay.portal.model.UserTrackerPath> findByUserTrackerId(
219                    long userTrackerId, int start, int end)
220                    throws com.liferay.portal.kernel.exception.SystemException {
221                    return getPersistence().findByUserTrackerId(userTrackerId, start, end);
222            }
223    
224            /**
225            * Returns an ordered range of all the user tracker paths where userTrackerId = &#63;.
226            *
227            * <p>
228            * 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.
229            * </p>
230            *
231            * @param userTrackerId the user tracker ID
232            * @param start the lower bound of the range of user tracker paths
233            * @param end the upper bound of the range of user tracker paths (not inclusive)
234            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
235            * @return the ordered range of matching user tracker paths
236            * @throws SystemException if a system exception occurred
237            */
238            public static java.util.List<com.liferay.portal.model.UserTrackerPath> findByUserTrackerId(
239                    long userTrackerId, int start, int end,
240                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
241                    throws com.liferay.portal.kernel.exception.SystemException {
242                    return getPersistence()
243                                       .findByUserTrackerId(userTrackerId, start, end,
244                            orderByComparator);
245            }
246    
247            /**
248            * Returns the first user tracker path in the ordered set where userTrackerId = &#63;.
249            *
250            * <p>
251            * 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.
252            * </p>
253            *
254            * @param userTrackerId the user tracker ID
255            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
256            * @return the first matching user tracker path
257            * @throws com.liferay.portal.NoSuchUserTrackerPathException if a matching user tracker path could not be found
258            * @throws SystemException if a system exception occurred
259            */
260            public static com.liferay.portal.model.UserTrackerPath findByUserTrackerId_First(
261                    long userTrackerId,
262                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
263                    throws com.liferay.portal.NoSuchUserTrackerPathException,
264                            com.liferay.portal.kernel.exception.SystemException {
265                    return getPersistence()
266                                       .findByUserTrackerId_First(userTrackerId, orderByComparator);
267            }
268    
269            /**
270            * Returns the last user tracker path in the ordered set where userTrackerId = &#63;.
271            *
272            * <p>
273            * 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.
274            * </p>
275            *
276            * @param userTrackerId the user tracker ID
277            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
278            * @return the last matching user tracker path
279            * @throws com.liferay.portal.NoSuchUserTrackerPathException if a matching user tracker path could not be found
280            * @throws SystemException if a system exception occurred
281            */
282            public static com.liferay.portal.model.UserTrackerPath findByUserTrackerId_Last(
283                    long userTrackerId,
284                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
285                    throws com.liferay.portal.NoSuchUserTrackerPathException,
286                            com.liferay.portal.kernel.exception.SystemException {
287                    return getPersistence()
288                                       .findByUserTrackerId_Last(userTrackerId, orderByComparator);
289            }
290    
291            /**
292            * Returns the user tracker paths before and after the current user tracker path in the ordered set where userTrackerId = &#63;.
293            *
294            * <p>
295            * 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.
296            * </p>
297            *
298            * @param userTrackerPathId the primary key of the current user tracker path
299            * @param userTrackerId the user tracker ID
300            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
301            * @return the previous, current, and next user tracker path
302            * @throws com.liferay.portal.NoSuchUserTrackerPathException if a user tracker path with the primary key could not be found
303            * @throws SystemException if a system exception occurred
304            */
305            public static com.liferay.portal.model.UserTrackerPath[] findByUserTrackerId_PrevAndNext(
306                    long userTrackerPathId, long userTrackerId,
307                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
308                    throws com.liferay.portal.NoSuchUserTrackerPathException,
309                            com.liferay.portal.kernel.exception.SystemException {
310                    return getPersistence()
311                                       .findByUserTrackerId_PrevAndNext(userTrackerPathId,
312                            userTrackerId, orderByComparator);
313            }
314    
315            /**
316            * Returns all the user tracker paths.
317            *
318            * @return the user tracker paths
319            * @throws SystemException if a system exception occurred
320            */
321            public static java.util.List<com.liferay.portal.model.UserTrackerPath> findAll()
322                    throws com.liferay.portal.kernel.exception.SystemException {
323                    return getPersistence().findAll();
324            }
325    
326            /**
327            * Returns a range of all the user tracker paths.
328            *
329            * <p>
330            * 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.
331            * </p>
332            *
333            * @param start the lower bound of the range of user tracker paths
334            * @param end the upper bound of the range of user tracker paths (not inclusive)
335            * @return the range of user tracker paths
336            * @throws SystemException if a system exception occurred
337            */
338            public static java.util.List<com.liferay.portal.model.UserTrackerPath> findAll(
339                    int start, int end)
340                    throws com.liferay.portal.kernel.exception.SystemException {
341                    return getPersistence().findAll(start, end);
342            }
343    
344            /**
345            * Returns an ordered range of all the user tracker paths.
346            *
347            * <p>
348            * 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.
349            * </p>
350            *
351            * @param start the lower bound of the range of user tracker paths
352            * @param end the upper bound of the range of user tracker paths (not inclusive)
353            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
354            * @return the ordered range of user tracker paths
355            * @throws SystemException if a system exception occurred
356            */
357            public static java.util.List<com.liferay.portal.model.UserTrackerPath> findAll(
358                    int start, int end,
359                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
360                    throws com.liferay.portal.kernel.exception.SystemException {
361                    return getPersistence().findAll(start, end, orderByComparator);
362            }
363    
364            /**
365            * Removes all the user tracker paths where userTrackerId = &#63; from the database.
366            *
367            * @param userTrackerId the user tracker ID
368            * @throws SystemException if a system exception occurred
369            */
370            public static void removeByUserTrackerId(long userTrackerId)
371                    throws com.liferay.portal.kernel.exception.SystemException {
372                    getPersistence().removeByUserTrackerId(userTrackerId);
373            }
374    
375            /**
376            * Removes all the user tracker paths from the database.
377            *
378            * @throws SystemException if a system exception occurred
379            */
380            public static void removeAll()
381                    throws com.liferay.portal.kernel.exception.SystemException {
382                    getPersistence().removeAll();
383            }
384    
385            /**
386            * Returns the number of user tracker paths where userTrackerId = &#63;.
387            *
388            * @param userTrackerId the user tracker ID
389            * @return the number of matching user tracker paths
390            * @throws SystemException if a system exception occurred
391            */
392            public static int countByUserTrackerId(long userTrackerId)
393                    throws com.liferay.portal.kernel.exception.SystemException {
394                    return getPersistence().countByUserTrackerId(userTrackerId);
395            }
396    
397            /**
398            * Returns the number of user tracker paths.
399            *
400            * @return the number of user tracker paths
401            * @throws SystemException if a system exception occurred
402            */
403            public static int countAll()
404                    throws com.liferay.portal.kernel.exception.SystemException {
405                    return getPersistence().countAll();
406            }
407    
408            public static UserTrackerPathPersistence getPersistence() {
409                    if (_persistence == null) {
410                            _persistence = (UserTrackerPathPersistence)PortalBeanLocatorUtil.locate(UserTrackerPathPersistence.class.getName());
411    
412                            ReferenceRegistry.registerReference(UserTrackerPathUtil.class,
413                                    "_persistence");
414                    }
415    
416                    return _persistence;
417            }
418    
419            public void setPersistence(UserTrackerPathPersistence persistence) {
420                    _persistence = persistence;
421    
422                    ReferenceRegistry.registerReference(UserTrackerPathUtil.class,
423                            "_persistence");
424            }
425    
426            private static UserTrackerPathPersistence _persistence;
427    }