1   /**
2    * Copyright (c) 2000-2009 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   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portal.service.persistence;
21  
22  /**
23   * <a href="UserTrackerUtil.java.html"><b><i>View Source</i></b></a>
24   *
25   * @author Brian Wing Shun Chan
26   *
27   */
28  public class UserTrackerUtil {
29      public static void cacheResult(
30          com.liferay.portal.model.UserTracker userTracker) {
31          getPersistence().cacheResult(userTracker);
32      }
33  
34      public static void cacheResult(
35          java.util.List<com.liferay.portal.model.UserTracker> userTrackers) {
36          getPersistence().cacheResult(userTrackers);
37      }
38  
39      public static void clearCache() {
40          getPersistence().clearCache();
41      }
42  
43      public static com.liferay.portal.model.UserTracker create(
44          long userTrackerId) {
45          return getPersistence().create(userTrackerId);
46      }
47  
48      public static com.liferay.portal.model.UserTracker remove(
49          long userTrackerId)
50          throws com.liferay.portal.NoSuchUserTrackerException,
51              com.liferay.portal.SystemException {
52          return getPersistence().remove(userTrackerId);
53      }
54  
55      public static com.liferay.portal.model.UserTracker remove(
56          com.liferay.portal.model.UserTracker userTracker)
57          throws com.liferay.portal.SystemException {
58          return getPersistence().remove(userTracker);
59      }
60  
61      /**
62       * @deprecated Use <code>update(UserTracker userTracker, boolean merge)</code>.
63       */
64      public static com.liferay.portal.model.UserTracker update(
65          com.liferay.portal.model.UserTracker userTracker)
66          throws com.liferay.portal.SystemException {
67          return getPersistence().update(userTracker);
68      }
69  
70      /**
71       * Add, update, or merge, the entity. This method also calls the model
72       * listeners to trigger the proper events associated with adding, deleting,
73       * or updating an entity.
74       *
75       * @param        userTracker the entity to add, update, or merge
76       * @param        merge boolean value for whether to merge the entity. The
77       *                default value is false. Setting merge to true is more
78       *                expensive and should only be true when userTracker is
79       *                transient. See LEP-5473 for a detailed discussion of this
80       *                method.
81       * @return        true if the portlet can be displayed via Ajax
82       */
83      public static com.liferay.portal.model.UserTracker update(
84          com.liferay.portal.model.UserTracker userTracker, boolean merge)
85          throws com.liferay.portal.SystemException {
86          return getPersistence().update(userTracker, merge);
87      }
88  
89      public static com.liferay.portal.model.UserTracker updateImpl(
90          com.liferay.portal.model.UserTracker userTracker, boolean merge)
91          throws com.liferay.portal.SystemException {
92          return getPersistence().updateImpl(userTracker, merge);
93      }
94  
95      public static com.liferay.portal.model.UserTracker findByPrimaryKey(
96          long userTrackerId)
97          throws com.liferay.portal.NoSuchUserTrackerException,
98              com.liferay.portal.SystemException {
99          return getPersistence().findByPrimaryKey(userTrackerId);
100     }
101 
102     public static com.liferay.portal.model.UserTracker fetchByPrimaryKey(
103         long userTrackerId) throws com.liferay.portal.SystemException {
104         return getPersistence().fetchByPrimaryKey(userTrackerId);
105     }
106 
107     public static java.util.List<com.liferay.portal.model.UserTracker> findByCompanyId(
108         long companyId) throws com.liferay.portal.SystemException {
109         return getPersistence().findByCompanyId(companyId);
110     }
111 
112     public static java.util.List<com.liferay.portal.model.UserTracker> findByCompanyId(
113         long companyId, int start, int end)
114         throws com.liferay.portal.SystemException {
115         return getPersistence().findByCompanyId(companyId, start, end);
116     }
117 
118     public static java.util.List<com.liferay.portal.model.UserTracker> findByCompanyId(
119         long companyId, int start, int end,
120         com.liferay.portal.kernel.util.OrderByComparator obc)
121         throws com.liferay.portal.SystemException {
122         return getPersistence().findByCompanyId(companyId, start, end, obc);
123     }
124 
125     public static com.liferay.portal.model.UserTracker findByCompanyId_First(
126         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
127         throws com.liferay.portal.NoSuchUserTrackerException,
128             com.liferay.portal.SystemException {
129         return getPersistence().findByCompanyId_First(companyId, obc);
130     }
131 
132     public static com.liferay.portal.model.UserTracker findByCompanyId_Last(
133         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
134         throws com.liferay.portal.NoSuchUserTrackerException,
135             com.liferay.portal.SystemException {
136         return getPersistence().findByCompanyId_Last(companyId, obc);
137     }
138 
139     public static com.liferay.portal.model.UserTracker[] findByCompanyId_PrevAndNext(
140         long userTrackerId, long companyId,
141         com.liferay.portal.kernel.util.OrderByComparator obc)
142         throws com.liferay.portal.NoSuchUserTrackerException,
143             com.liferay.portal.SystemException {
144         return getPersistence()
145                    .findByCompanyId_PrevAndNext(userTrackerId, companyId, obc);
146     }
147 
148     public static java.util.List<com.liferay.portal.model.UserTracker> findByUserId(
149         long userId) throws com.liferay.portal.SystemException {
150         return getPersistence().findByUserId(userId);
151     }
152 
153     public static java.util.List<com.liferay.portal.model.UserTracker> findByUserId(
154         long userId, int start, int end)
155         throws com.liferay.portal.SystemException {
156         return getPersistence().findByUserId(userId, start, end);
157     }
158 
159     public static java.util.List<com.liferay.portal.model.UserTracker> findByUserId(
160         long userId, int start, int end,
161         com.liferay.portal.kernel.util.OrderByComparator obc)
162         throws com.liferay.portal.SystemException {
163         return getPersistence().findByUserId(userId, start, end, obc);
164     }
165 
166     public static com.liferay.portal.model.UserTracker findByUserId_First(
167         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
168         throws com.liferay.portal.NoSuchUserTrackerException,
169             com.liferay.portal.SystemException {
170         return getPersistence().findByUserId_First(userId, obc);
171     }
172 
173     public static com.liferay.portal.model.UserTracker findByUserId_Last(
174         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
175         throws com.liferay.portal.NoSuchUserTrackerException,
176             com.liferay.portal.SystemException {
177         return getPersistence().findByUserId_Last(userId, obc);
178     }
179 
180     public static com.liferay.portal.model.UserTracker[] findByUserId_PrevAndNext(
181         long userTrackerId, long userId,
182         com.liferay.portal.kernel.util.OrderByComparator obc)
183         throws com.liferay.portal.NoSuchUserTrackerException,
184             com.liferay.portal.SystemException {
185         return getPersistence()
186                    .findByUserId_PrevAndNext(userTrackerId, userId, obc);
187     }
188 
189     public static java.util.List<com.liferay.portal.model.UserTracker> findBySessionId(
190         java.lang.String sessionId) throws com.liferay.portal.SystemException {
191         return getPersistence().findBySessionId(sessionId);
192     }
193 
194     public static java.util.List<com.liferay.portal.model.UserTracker> findBySessionId(
195         java.lang.String sessionId, int start, int end)
196         throws com.liferay.portal.SystemException {
197         return getPersistence().findBySessionId(sessionId, start, end);
198     }
199 
200     public static java.util.List<com.liferay.portal.model.UserTracker> findBySessionId(
201         java.lang.String sessionId, int start, int end,
202         com.liferay.portal.kernel.util.OrderByComparator obc)
203         throws com.liferay.portal.SystemException {
204         return getPersistence().findBySessionId(sessionId, start, end, obc);
205     }
206 
207     public static com.liferay.portal.model.UserTracker findBySessionId_First(
208         java.lang.String sessionId,
209         com.liferay.portal.kernel.util.OrderByComparator obc)
210         throws com.liferay.portal.NoSuchUserTrackerException,
211             com.liferay.portal.SystemException {
212         return getPersistence().findBySessionId_First(sessionId, obc);
213     }
214 
215     public static com.liferay.portal.model.UserTracker findBySessionId_Last(
216         java.lang.String sessionId,
217         com.liferay.portal.kernel.util.OrderByComparator obc)
218         throws com.liferay.portal.NoSuchUserTrackerException,
219             com.liferay.portal.SystemException {
220         return getPersistence().findBySessionId_Last(sessionId, obc);
221     }
222 
223     public static com.liferay.portal.model.UserTracker[] findBySessionId_PrevAndNext(
224         long userTrackerId, java.lang.String sessionId,
225         com.liferay.portal.kernel.util.OrderByComparator obc)
226         throws com.liferay.portal.NoSuchUserTrackerException,
227             com.liferay.portal.SystemException {
228         return getPersistence()
229                    .findBySessionId_PrevAndNext(userTrackerId, sessionId, obc);
230     }
231 
232     public static java.util.List<Object> findWithDynamicQuery(
233         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
234         throws com.liferay.portal.SystemException {
235         return getPersistence().findWithDynamicQuery(dynamicQuery);
236     }
237 
238     public static java.util.List<Object> findWithDynamicQuery(
239         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
240         int end) throws com.liferay.portal.SystemException {
241         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
242     }
243 
244     public static java.util.List<com.liferay.portal.model.UserTracker> findAll()
245         throws com.liferay.portal.SystemException {
246         return getPersistence().findAll();
247     }
248 
249     public static java.util.List<com.liferay.portal.model.UserTracker> findAll(
250         int start, int end) throws com.liferay.portal.SystemException {
251         return getPersistence().findAll(start, end);
252     }
253 
254     public static java.util.List<com.liferay.portal.model.UserTracker> findAll(
255         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
256         throws com.liferay.portal.SystemException {
257         return getPersistence().findAll(start, end, obc);
258     }
259 
260     public static void removeByCompanyId(long companyId)
261         throws com.liferay.portal.SystemException {
262         getPersistence().removeByCompanyId(companyId);
263     }
264 
265     public static void removeByUserId(long userId)
266         throws com.liferay.portal.SystemException {
267         getPersistence().removeByUserId(userId);
268     }
269 
270     public static void removeBySessionId(java.lang.String sessionId)
271         throws com.liferay.portal.SystemException {
272         getPersistence().removeBySessionId(sessionId);
273     }
274 
275     public static void removeAll() throws com.liferay.portal.SystemException {
276         getPersistence().removeAll();
277     }
278 
279     public static int countByCompanyId(long companyId)
280         throws com.liferay.portal.SystemException {
281         return getPersistence().countByCompanyId(companyId);
282     }
283 
284     public static int countByUserId(long userId)
285         throws com.liferay.portal.SystemException {
286         return getPersistence().countByUserId(userId);
287     }
288 
289     public static int countBySessionId(java.lang.String sessionId)
290         throws com.liferay.portal.SystemException {
291         return getPersistence().countBySessionId(sessionId);
292     }
293 
294     public static int countAll() throws com.liferay.portal.SystemException {
295         return getPersistence().countAll();
296     }
297 
298     public static UserTrackerPersistence getPersistence() {
299         return _persistence;
300     }
301 
302     public void setPersistence(UserTrackerPersistence persistence) {
303         _persistence = persistence;
304     }
305 
306     private static UserTrackerPersistence _persistence;
307 }