1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.SystemException;
18  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
19  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
20  import com.liferay.portal.kernel.util.ReferenceRegistry;
21  import com.liferay.portal.model.UserTracker;
22  
23  import java.util.List;
24  
25  /**
26   * <a href="UserTrackerUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be
30   * overwritten the next time is generated.
31   * </p>
32   *
33   * @author    Brian Wing Shun Chan
34   * @see       UserTrackerPersistence
35   * @see       UserTrackerPersistenceImpl
36   * @generated
37   */
38  public class UserTrackerUtil {
39      /**
40       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
41       */
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      /**
47       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(UserTracker)
48       */
49      public static void clearCache(UserTracker userTracker) {
50          getPersistence().clearCache(userTracker);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
55       */
56      public int countWithDynamicQuery(DynamicQuery dynamicQuery)
57          throws SystemException {
58          return getPersistence().countWithDynamicQuery(dynamicQuery);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
63       */
64      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
65          throws SystemException {
66          return getPersistence().findWithDynamicQuery(dynamicQuery);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
71       */
72      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
73          int start, int end) throws SystemException {
74          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
75      }
76  
77      /**
78       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
79       */
80      public static UserTracker remove(UserTracker userTracker)
81          throws SystemException {
82          return getPersistence().remove(userTracker);
83      }
84  
85      /**
86       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
87       */
88      public static UserTracker update(UserTracker userTracker, boolean merge)
89          throws SystemException {
90          return getPersistence().update(userTracker, merge);
91      }
92  
93      public static void cacheResult(
94          com.liferay.portal.model.UserTracker userTracker) {
95          getPersistence().cacheResult(userTracker);
96      }
97  
98      public static void cacheResult(
99          java.util.List<com.liferay.portal.model.UserTracker> userTrackers) {
100         getPersistence().cacheResult(userTrackers);
101     }
102 
103     public static com.liferay.portal.model.UserTracker create(
104         long userTrackerId) {
105         return getPersistence().create(userTrackerId);
106     }
107 
108     public static com.liferay.portal.model.UserTracker remove(
109         long userTrackerId)
110         throws com.liferay.portal.NoSuchUserTrackerException,
111             com.liferay.portal.SystemException {
112         return getPersistence().remove(userTrackerId);
113     }
114 
115     /**
116      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
117      */
118     public static com.liferay.portal.model.UserTracker update(
119         com.liferay.portal.model.UserTracker userTracker)
120         throws com.liferay.portal.SystemException {
121         return getPersistence().update(userTracker);
122     }
123 
124     public static com.liferay.portal.model.UserTracker updateImpl(
125         com.liferay.portal.model.UserTracker userTracker, boolean merge)
126         throws com.liferay.portal.SystemException {
127         return getPersistence().updateImpl(userTracker, merge);
128     }
129 
130     public static com.liferay.portal.model.UserTracker findByPrimaryKey(
131         long userTrackerId)
132         throws com.liferay.portal.NoSuchUserTrackerException,
133             com.liferay.portal.SystemException {
134         return getPersistence().findByPrimaryKey(userTrackerId);
135     }
136 
137     public static com.liferay.portal.model.UserTracker fetchByPrimaryKey(
138         long userTrackerId) throws com.liferay.portal.SystemException {
139         return getPersistence().fetchByPrimaryKey(userTrackerId);
140     }
141 
142     public static java.util.List<com.liferay.portal.model.UserTracker> findByCompanyId(
143         long companyId) throws com.liferay.portal.SystemException {
144         return getPersistence().findByCompanyId(companyId);
145     }
146 
147     public static java.util.List<com.liferay.portal.model.UserTracker> findByCompanyId(
148         long companyId, int start, int end)
149         throws com.liferay.portal.SystemException {
150         return getPersistence().findByCompanyId(companyId, start, end);
151     }
152 
153     public static java.util.List<com.liferay.portal.model.UserTracker> findByCompanyId(
154         long companyId, int start, int end,
155         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
156         throws com.liferay.portal.SystemException {
157         return getPersistence()
158                    .findByCompanyId(companyId, start, end, orderByComparator);
159     }
160 
161     public static com.liferay.portal.model.UserTracker findByCompanyId_First(
162         long companyId,
163         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
164         throws com.liferay.portal.NoSuchUserTrackerException,
165             com.liferay.portal.SystemException {
166         return getPersistence()
167                    .findByCompanyId_First(companyId, orderByComparator);
168     }
169 
170     public static com.liferay.portal.model.UserTracker findByCompanyId_Last(
171         long companyId,
172         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
173         throws com.liferay.portal.NoSuchUserTrackerException,
174             com.liferay.portal.SystemException {
175         return getPersistence()
176                    .findByCompanyId_Last(companyId, orderByComparator);
177     }
178 
179     public static com.liferay.portal.model.UserTracker[] findByCompanyId_PrevAndNext(
180         long userTrackerId, long companyId,
181         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
182         throws com.liferay.portal.NoSuchUserTrackerException,
183             com.liferay.portal.SystemException {
184         return getPersistence()
185                    .findByCompanyId_PrevAndNext(userTrackerId, companyId,
186             orderByComparator);
187     }
188 
189     public static java.util.List<com.liferay.portal.model.UserTracker> findByUserId(
190         long userId) throws com.liferay.portal.SystemException {
191         return getPersistence().findByUserId(userId);
192     }
193 
194     public static java.util.List<com.liferay.portal.model.UserTracker> findByUserId(
195         long userId, int start, int end)
196         throws com.liferay.portal.SystemException {
197         return getPersistence().findByUserId(userId, start, end);
198     }
199 
200     public static java.util.List<com.liferay.portal.model.UserTracker> findByUserId(
201         long userId, int start, int end,
202         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
203         throws com.liferay.portal.SystemException {
204         return getPersistence()
205                    .findByUserId(userId, start, end, orderByComparator);
206     }
207 
208     public static com.liferay.portal.model.UserTracker findByUserId_First(
209         long userId,
210         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
211         throws com.liferay.portal.NoSuchUserTrackerException,
212             com.liferay.portal.SystemException {
213         return getPersistence().findByUserId_First(userId, orderByComparator);
214     }
215 
216     public static com.liferay.portal.model.UserTracker findByUserId_Last(
217         long userId,
218         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
219         throws com.liferay.portal.NoSuchUserTrackerException,
220             com.liferay.portal.SystemException {
221         return getPersistence().findByUserId_Last(userId, orderByComparator);
222     }
223 
224     public static com.liferay.portal.model.UserTracker[] findByUserId_PrevAndNext(
225         long userTrackerId, long userId,
226         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
227         throws com.liferay.portal.NoSuchUserTrackerException,
228             com.liferay.portal.SystemException {
229         return getPersistence()
230                    .findByUserId_PrevAndNext(userTrackerId, userId,
231             orderByComparator);
232     }
233 
234     public static java.util.List<com.liferay.portal.model.UserTracker> findBySessionId(
235         java.lang.String sessionId) throws com.liferay.portal.SystemException {
236         return getPersistence().findBySessionId(sessionId);
237     }
238 
239     public static java.util.List<com.liferay.portal.model.UserTracker> findBySessionId(
240         java.lang.String sessionId, int start, int end)
241         throws com.liferay.portal.SystemException {
242         return getPersistence().findBySessionId(sessionId, start, end);
243     }
244 
245     public static java.util.List<com.liferay.portal.model.UserTracker> findBySessionId(
246         java.lang.String sessionId, int start, int end,
247         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
248         throws com.liferay.portal.SystemException {
249         return getPersistence()
250                    .findBySessionId(sessionId, start, end, orderByComparator);
251     }
252 
253     public static com.liferay.portal.model.UserTracker findBySessionId_First(
254         java.lang.String sessionId,
255         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
256         throws com.liferay.portal.NoSuchUserTrackerException,
257             com.liferay.portal.SystemException {
258         return getPersistence()
259                    .findBySessionId_First(sessionId, orderByComparator);
260     }
261 
262     public static com.liferay.portal.model.UserTracker findBySessionId_Last(
263         java.lang.String sessionId,
264         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
265         throws com.liferay.portal.NoSuchUserTrackerException,
266             com.liferay.portal.SystemException {
267         return getPersistence()
268                    .findBySessionId_Last(sessionId, orderByComparator);
269     }
270 
271     public static com.liferay.portal.model.UserTracker[] findBySessionId_PrevAndNext(
272         long userTrackerId, java.lang.String sessionId,
273         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
274         throws com.liferay.portal.NoSuchUserTrackerException,
275             com.liferay.portal.SystemException {
276         return getPersistence()
277                    .findBySessionId_PrevAndNext(userTrackerId, sessionId,
278             orderByComparator);
279     }
280 
281     public static java.util.List<com.liferay.portal.model.UserTracker> findAll()
282         throws com.liferay.portal.SystemException {
283         return getPersistence().findAll();
284     }
285 
286     public static java.util.List<com.liferay.portal.model.UserTracker> findAll(
287         int start, int end) throws com.liferay.portal.SystemException {
288         return getPersistence().findAll(start, end);
289     }
290 
291     public static java.util.List<com.liferay.portal.model.UserTracker> findAll(
292         int start, int end,
293         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
294         throws com.liferay.portal.SystemException {
295         return getPersistence().findAll(start, end, orderByComparator);
296     }
297 
298     public static void removeByCompanyId(long companyId)
299         throws com.liferay.portal.SystemException {
300         getPersistence().removeByCompanyId(companyId);
301     }
302 
303     public static void removeByUserId(long userId)
304         throws com.liferay.portal.SystemException {
305         getPersistence().removeByUserId(userId);
306     }
307 
308     public static void removeBySessionId(java.lang.String sessionId)
309         throws com.liferay.portal.SystemException {
310         getPersistence().removeBySessionId(sessionId);
311     }
312 
313     public static void removeAll() throws com.liferay.portal.SystemException {
314         getPersistence().removeAll();
315     }
316 
317     public static int countByCompanyId(long companyId)
318         throws com.liferay.portal.SystemException {
319         return getPersistence().countByCompanyId(companyId);
320     }
321 
322     public static int countByUserId(long userId)
323         throws com.liferay.portal.SystemException {
324         return getPersistence().countByUserId(userId);
325     }
326 
327     public static int countBySessionId(java.lang.String sessionId)
328         throws com.liferay.portal.SystemException {
329         return getPersistence().countBySessionId(sessionId);
330     }
331 
332     public static int countAll() throws com.liferay.portal.SystemException {
333         return getPersistence().countAll();
334     }
335 
336     public static UserTrackerPersistence getPersistence() {
337         if (_persistence == null) {
338             _persistence = (UserTrackerPersistence)PortalBeanLocatorUtil.locate(UserTrackerPersistence.class.getName());
339 
340             ReferenceRegistry.registerReference(UserTrackerUtil.class,
341                 "_persistence");
342         }
343 
344         return _persistence;
345     }
346 
347     public void setPersistence(UserTrackerPersistence persistence) {
348         _persistence = persistence;
349 
350         ReferenceRegistry.registerReference(UserTrackerUtil.class,
351             "_persistence");
352     }
353 
354     private static UserTrackerPersistence _persistence;
355 }