1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.service.persistence;
24  
25  /**
26   * <a href="UserTrackerUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class UserTrackerUtil {
32      public static com.liferay.portal.model.UserTracker create(
33          long userTrackerId) {
34          return getPersistence().create(userTrackerId);
35      }
36  
37      public static com.liferay.portal.model.UserTracker remove(
38          long userTrackerId)
39          throws com.liferay.portal.SystemException, 
40              com.liferay.portal.NoSuchUserTrackerException {
41          return getPersistence().remove(userTrackerId);
42      }
43  
44      public static com.liferay.portal.model.UserTracker remove(
45          com.liferay.portal.model.UserTracker userTracker)
46          throws com.liferay.portal.SystemException {
47          return getPersistence().remove(userTracker);
48      }
49  
50      public static com.liferay.portal.model.UserTracker update(
51          com.liferay.portal.model.UserTracker userTracker)
52          throws com.liferay.portal.SystemException {
53          return getPersistence().update(userTracker);
54      }
55  
56      public static com.liferay.portal.model.UserTracker update(
57          com.liferay.portal.model.UserTracker userTracker, boolean merge)
58          throws com.liferay.portal.SystemException {
59          return getPersistence().update(userTracker, merge);
60      }
61  
62      public static com.liferay.portal.model.UserTracker updateImpl(
63          com.liferay.portal.model.UserTracker userTracker, boolean merge)
64          throws com.liferay.portal.SystemException {
65          return getPersistence().updateImpl(userTracker, merge);
66      }
67  
68      public static com.liferay.portal.model.UserTracker findByPrimaryKey(
69          long userTrackerId)
70          throws com.liferay.portal.SystemException, 
71              com.liferay.portal.NoSuchUserTrackerException {
72          return getPersistence().findByPrimaryKey(userTrackerId);
73      }
74  
75      public static com.liferay.portal.model.UserTracker fetchByPrimaryKey(
76          long userTrackerId) throws com.liferay.portal.SystemException {
77          return getPersistence().fetchByPrimaryKey(userTrackerId);
78      }
79  
80      public static java.util.List findByCompanyId(long companyId)
81          throws com.liferay.portal.SystemException {
82          return getPersistence().findByCompanyId(companyId);
83      }
84  
85      public static java.util.List findByCompanyId(long companyId, int begin,
86          int end) throws com.liferay.portal.SystemException {
87          return getPersistence().findByCompanyId(companyId, begin, end);
88      }
89  
90      public static java.util.List findByCompanyId(long companyId, int begin,
91          int end, com.liferay.portal.kernel.util.OrderByComparator obc)
92          throws com.liferay.portal.SystemException {
93          return getPersistence().findByCompanyId(companyId, begin, end, obc);
94      }
95  
96      public static com.liferay.portal.model.UserTracker findByCompanyId_First(
97          long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
98          throws com.liferay.portal.SystemException, 
99              com.liferay.portal.NoSuchUserTrackerException {
100         return getPersistence().findByCompanyId_First(companyId, obc);
101     }
102 
103     public static com.liferay.portal.model.UserTracker findByCompanyId_Last(
104         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
105         throws com.liferay.portal.SystemException, 
106             com.liferay.portal.NoSuchUserTrackerException {
107         return getPersistence().findByCompanyId_Last(companyId, obc);
108     }
109 
110     public static com.liferay.portal.model.UserTracker[] findByCompanyId_PrevAndNext(
111         long userTrackerId, long companyId,
112         com.liferay.portal.kernel.util.OrderByComparator obc)
113         throws com.liferay.portal.SystemException, 
114             com.liferay.portal.NoSuchUserTrackerException {
115         return getPersistence().findByCompanyId_PrevAndNext(userTrackerId,
116             companyId, obc);
117     }
118 
119     public static java.util.List findByUserId(long userId)
120         throws com.liferay.portal.SystemException {
121         return getPersistence().findByUserId(userId);
122     }
123 
124     public static java.util.List findByUserId(long userId, int begin, int end)
125         throws com.liferay.portal.SystemException {
126         return getPersistence().findByUserId(userId, begin, end);
127     }
128 
129     public static java.util.List findByUserId(long userId, int begin, int end,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException {
132         return getPersistence().findByUserId(userId, begin, end, obc);
133     }
134 
135     public static com.liferay.portal.model.UserTracker findByUserId_First(
136         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
137         throws com.liferay.portal.SystemException, 
138             com.liferay.portal.NoSuchUserTrackerException {
139         return getPersistence().findByUserId_First(userId, obc);
140     }
141 
142     public static com.liferay.portal.model.UserTracker findByUserId_Last(
143         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
144         throws com.liferay.portal.SystemException, 
145             com.liferay.portal.NoSuchUserTrackerException {
146         return getPersistence().findByUserId_Last(userId, obc);
147     }
148 
149     public static com.liferay.portal.model.UserTracker[] findByUserId_PrevAndNext(
150         long userTrackerId, long userId,
151         com.liferay.portal.kernel.util.OrderByComparator obc)
152         throws com.liferay.portal.SystemException, 
153             com.liferay.portal.NoSuchUserTrackerException {
154         return getPersistence().findByUserId_PrevAndNext(userTrackerId, userId,
155             obc);
156     }
157 
158     public static java.util.List findBySessionId(java.lang.String sessionId)
159         throws com.liferay.portal.SystemException {
160         return getPersistence().findBySessionId(sessionId);
161     }
162 
163     public static java.util.List findBySessionId(java.lang.String sessionId,
164         int begin, int end) throws com.liferay.portal.SystemException {
165         return getPersistence().findBySessionId(sessionId, begin, end);
166     }
167 
168     public static java.util.List findBySessionId(java.lang.String sessionId,
169         int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
170         throws com.liferay.portal.SystemException {
171         return getPersistence().findBySessionId(sessionId, begin, end, obc);
172     }
173 
174     public static com.liferay.portal.model.UserTracker findBySessionId_First(
175         java.lang.String sessionId,
176         com.liferay.portal.kernel.util.OrderByComparator obc)
177         throws com.liferay.portal.SystemException, 
178             com.liferay.portal.NoSuchUserTrackerException {
179         return getPersistence().findBySessionId_First(sessionId, obc);
180     }
181 
182     public static com.liferay.portal.model.UserTracker findBySessionId_Last(
183         java.lang.String sessionId,
184         com.liferay.portal.kernel.util.OrderByComparator obc)
185         throws com.liferay.portal.SystemException, 
186             com.liferay.portal.NoSuchUserTrackerException {
187         return getPersistence().findBySessionId_Last(sessionId, obc);
188     }
189 
190     public static com.liferay.portal.model.UserTracker[] findBySessionId_PrevAndNext(
191         long userTrackerId, java.lang.String sessionId,
192         com.liferay.portal.kernel.util.OrderByComparator obc)
193         throws com.liferay.portal.SystemException, 
194             com.liferay.portal.NoSuchUserTrackerException {
195         return getPersistence().findBySessionId_PrevAndNext(userTrackerId,
196             sessionId, obc);
197     }
198 
199     public static java.util.List findWithDynamicQuery(
200         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
201         throws com.liferay.portal.SystemException {
202         return getPersistence().findWithDynamicQuery(queryInitializer);
203     }
204 
205     public static java.util.List findWithDynamicQuery(
206         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
207         int begin, int end) throws com.liferay.portal.SystemException {
208         return getPersistence().findWithDynamicQuery(queryInitializer, begin,
209             end);
210     }
211 
212     public static java.util.List findAll()
213         throws com.liferay.portal.SystemException {
214         return getPersistence().findAll();
215     }
216 
217     public static java.util.List findAll(int begin, int end)
218         throws com.liferay.portal.SystemException {
219         return getPersistence().findAll(begin, end);
220     }
221 
222     public static java.util.List findAll(int begin, int end,
223         com.liferay.portal.kernel.util.OrderByComparator obc)
224         throws com.liferay.portal.SystemException {
225         return getPersistence().findAll(begin, end, obc);
226     }
227 
228     public static void removeByCompanyId(long companyId)
229         throws com.liferay.portal.SystemException {
230         getPersistence().removeByCompanyId(companyId);
231     }
232 
233     public static void removeByUserId(long userId)
234         throws com.liferay.portal.SystemException {
235         getPersistence().removeByUserId(userId);
236     }
237 
238     public static void removeBySessionId(java.lang.String sessionId)
239         throws com.liferay.portal.SystemException {
240         getPersistence().removeBySessionId(sessionId);
241     }
242 
243     public static void removeAll() throws com.liferay.portal.SystemException {
244         getPersistence().removeAll();
245     }
246 
247     public static int countByCompanyId(long companyId)
248         throws com.liferay.portal.SystemException {
249         return getPersistence().countByCompanyId(companyId);
250     }
251 
252     public static int countByUserId(long userId)
253         throws com.liferay.portal.SystemException {
254         return getPersistence().countByUserId(userId);
255     }
256 
257     public static int countBySessionId(java.lang.String sessionId)
258         throws com.liferay.portal.SystemException {
259         return getPersistence().countBySessionId(sessionId);
260     }
261 
262     public static int countAll() throws com.liferay.portal.SystemException {
263         return getPersistence().countAll();
264     }
265 
266     public static UserTrackerPersistence getPersistence() {
267         return _getUtil()._persistence;
268     }
269 
270     public void setPersistence(UserTrackerPersistence persistence) {
271         _persistence = persistence;
272     }
273 
274     private static UserTrackerUtil _getUtil() {
275         if (_util == null) {
276             _util = (UserTrackerUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
277         }
278 
279         return _util;
280     }
281 
282     private static final String _UTIL = UserTrackerUtil.class.getName();
283     private static UserTrackerUtil _util;
284     private UserTrackerPersistence _persistence;
285 }