1   /**
2    * Copyright (c) 2000-2009 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.NoSuchUserTrackerException,
40              com.liferay.portal.SystemException {
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      /**
51       * @deprecated Use <code>update(UserTracker userTracker, boolean merge)</code>.
52       */
53      public static com.liferay.portal.model.UserTracker update(
54          com.liferay.portal.model.UserTracker userTracker)
55          throws com.liferay.portal.SystemException {
56          return getPersistence().update(userTracker);
57      }
58  
59      /**
60       * Add, update, or merge, the entity. This method also calls the model
61       * listeners to trigger the proper events associated with adding, deleting,
62       * or updating an entity.
63       *
64       * @param        userTracker the entity to add, update, or merge
65       * @param        merge boolean value for whether to merge the entity. The
66       *                default value is false. Setting merge to true is more
67       *                expensive and should only be true when userTracker is
68       *                transient. See LEP-5473 for a detailed discussion of this
69       *                method.
70       * @return        true if the portlet can be displayed via Ajax
71       */
72      public static com.liferay.portal.model.UserTracker update(
73          com.liferay.portal.model.UserTracker userTracker, boolean merge)
74          throws com.liferay.portal.SystemException {
75          return getPersistence().update(userTracker, merge);
76      }
77  
78      public static com.liferay.portal.model.UserTracker updateImpl(
79          com.liferay.portal.model.UserTracker userTracker, boolean merge)
80          throws com.liferay.portal.SystemException {
81          return getPersistence().updateImpl(userTracker, merge);
82      }
83  
84      public static com.liferay.portal.model.UserTracker findByPrimaryKey(
85          long userTrackerId)
86          throws com.liferay.portal.NoSuchUserTrackerException,
87              com.liferay.portal.SystemException {
88          return getPersistence().findByPrimaryKey(userTrackerId);
89      }
90  
91      public static com.liferay.portal.model.UserTracker fetchByPrimaryKey(
92          long userTrackerId) throws com.liferay.portal.SystemException {
93          return getPersistence().fetchByPrimaryKey(userTrackerId);
94      }
95  
96      public static java.util.List<com.liferay.portal.model.UserTracker> findByCompanyId(
97          long companyId) throws com.liferay.portal.SystemException {
98          return getPersistence().findByCompanyId(companyId);
99      }
100 
101     public static java.util.List<com.liferay.portal.model.UserTracker> findByCompanyId(
102         long companyId, int start, int end)
103         throws com.liferay.portal.SystemException {
104         return getPersistence().findByCompanyId(companyId, start, end);
105     }
106 
107     public static java.util.List<com.liferay.portal.model.UserTracker> findByCompanyId(
108         long companyId, int start, int end,
109         com.liferay.portal.kernel.util.OrderByComparator obc)
110         throws com.liferay.portal.SystemException {
111         return getPersistence().findByCompanyId(companyId, start, end, obc);
112     }
113 
114     public static com.liferay.portal.model.UserTracker findByCompanyId_First(
115         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
116         throws com.liferay.portal.NoSuchUserTrackerException,
117             com.liferay.portal.SystemException {
118         return getPersistence().findByCompanyId_First(companyId, obc);
119     }
120 
121     public static com.liferay.portal.model.UserTracker findByCompanyId_Last(
122         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
123         throws com.liferay.portal.NoSuchUserTrackerException,
124             com.liferay.portal.SystemException {
125         return getPersistence().findByCompanyId_Last(companyId, obc);
126     }
127 
128     public static com.liferay.portal.model.UserTracker[] findByCompanyId_PrevAndNext(
129         long userTrackerId, long companyId,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.NoSuchUserTrackerException,
132             com.liferay.portal.SystemException {
133         return getPersistence()
134                    .findByCompanyId_PrevAndNext(userTrackerId, companyId, obc);
135     }
136 
137     public static java.util.List<com.liferay.portal.model.UserTracker> findByUserId(
138         long userId) throws com.liferay.portal.SystemException {
139         return getPersistence().findByUserId(userId);
140     }
141 
142     public static java.util.List<com.liferay.portal.model.UserTracker> findByUserId(
143         long userId, int start, int end)
144         throws com.liferay.portal.SystemException {
145         return getPersistence().findByUserId(userId, start, end);
146     }
147 
148     public static java.util.List<com.liferay.portal.model.UserTracker> findByUserId(
149         long userId, int start, int end,
150         com.liferay.portal.kernel.util.OrderByComparator obc)
151         throws com.liferay.portal.SystemException {
152         return getPersistence().findByUserId(userId, start, end, obc);
153     }
154 
155     public static com.liferay.portal.model.UserTracker findByUserId_First(
156         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
157         throws com.liferay.portal.NoSuchUserTrackerException,
158             com.liferay.portal.SystemException {
159         return getPersistence().findByUserId_First(userId, obc);
160     }
161 
162     public static com.liferay.portal.model.UserTracker findByUserId_Last(
163         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
164         throws com.liferay.portal.NoSuchUserTrackerException,
165             com.liferay.portal.SystemException {
166         return getPersistence().findByUserId_Last(userId, obc);
167     }
168 
169     public static com.liferay.portal.model.UserTracker[] findByUserId_PrevAndNext(
170         long userTrackerId, long userId,
171         com.liferay.portal.kernel.util.OrderByComparator obc)
172         throws com.liferay.portal.NoSuchUserTrackerException,
173             com.liferay.portal.SystemException {
174         return getPersistence()
175                    .findByUserId_PrevAndNext(userTrackerId, userId, obc);
176     }
177 
178     public static java.util.List<com.liferay.portal.model.UserTracker> findBySessionId(
179         java.lang.String sessionId) throws com.liferay.portal.SystemException {
180         return getPersistence().findBySessionId(sessionId);
181     }
182 
183     public static java.util.List<com.liferay.portal.model.UserTracker> findBySessionId(
184         java.lang.String sessionId, int start, int end)
185         throws com.liferay.portal.SystemException {
186         return getPersistence().findBySessionId(sessionId, start, end);
187     }
188 
189     public static java.util.List<com.liferay.portal.model.UserTracker> findBySessionId(
190         java.lang.String sessionId, int start, int end,
191         com.liferay.portal.kernel.util.OrderByComparator obc)
192         throws com.liferay.portal.SystemException {
193         return getPersistence().findBySessionId(sessionId, start, end, obc);
194     }
195 
196     public static com.liferay.portal.model.UserTracker findBySessionId_First(
197         java.lang.String sessionId,
198         com.liferay.portal.kernel.util.OrderByComparator obc)
199         throws com.liferay.portal.NoSuchUserTrackerException,
200             com.liferay.portal.SystemException {
201         return getPersistence().findBySessionId_First(sessionId, obc);
202     }
203 
204     public static com.liferay.portal.model.UserTracker findBySessionId_Last(
205         java.lang.String sessionId,
206         com.liferay.portal.kernel.util.OrderByComparator obc)
207         throws com.liferay.portal.NoSuchUserTrackerException,
208             com.liferay.portal.SystemException {
209         return getPersistence().findBySessionId_Last(sessionId, obc);
210     }
211 
212     public static com.liferay.portal.model.UserTracker[] findBySessionId_PrevAndNext(
213         long userTrackerId, java.lang.String sessionId,
214         com.liferay.portal.kernel.util.OrderByComparator obc)
215         throws com.liferay.portal.NoSuchUserTrackerException,
216             com.liferay.portal.SystemException {
217         return getPersistence()
218                    .findBySessionId_PrevAndNext(userTrackerId, sessionId, obc);
219     }
220 
221     public static java.util.List<Object> findWithDynamicQuery(
222         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
223         throws com.liferay.portal.SystemException {
224         return getPersistence().findWithDynamicQuery(dynamicQuery);
225     }
226 
227     public static java.util.List<Object> findWithDynamicQuery(
228         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
229         int end) throws com.liferay.portal.SystemException {
230         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
231     }
232 
233     public static java.util.List<com.liferay.portal.model.UserTracker> findAll()
234         throws com.liferay.portal.SystemException {
235         return getPersistence().findAll();
236     }
237 
238     public static java.util.List<com.liferay.portal.model.UserTracker> findAll(
239         int start, int end) throws com.liferay.portal.SystemException {
240         return getPersistence().findAll(start, end);
241     }
242 
243     public static java.util.List<com.liferay.portal.model.UserTracker> findAll(
244         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
245         throws com.liferay.portal.SystemException {
246         return getPersistence().findAll(start, end, obc);
247     }
248 
249     public static void removeByCompanyId(long companyId)
250         throws com.liferay.portal.SystemException {
251         getPersistence().removeByCompanyId(companyId);
252     }
253 
254     public static void removeByUserId(long userId)
255         throws com.liferay.portal.SystemException {
256         getPersistence().removeByUserId(userId);
257     }
258 
259     public static void removeBySessionId(java.lang.String sessionId)
260         throws com.liferay.portal.SystemException {
261         getPersistence().removeBySessionId(sessionId);
262     }
263 
264     public static void removeAll() throws com.liferay.portal.SystemException {
265         getPersistence().removeAll();
266     }
267 
268     public static int countByCompanyId(long companyId)
269         throws com.liferay.portal.SystemException {
270         return getPersistence().countByCompanyId(companyId);
271     }
272 
273     public static int countByUserId(long userId)
274         throws com.liferay.portal.SystemException {
275         return getPersistence().countByUserId(userId);
276     }
277 
278     public static int countBySessionId(java.lang.String sessionId)
279         throws com.liferay.portal.SystemException {
280         return getPersistence().countBySessionId(sessionId);
281     }
282 
283     public static int countAll() throws com.liferay.portal.SystemException {
284         return getPersistence().countAll();
285     }
286 
287     public static UserTrackerPersistence getPersistence() {
288         return _persistence;
289     }
290 
291     public void setPersistence(UserTrackerPersistence persistence) {
292         _persistence = persistence;
293     }
294 
295     private static UserTrackerPersistence _persistence;
296 }