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.UserTracker; 023 import com.liferay.portal.service.ServiceContext; 024 025 import java.util.List; 026 027 /** 028 * The persistence utility for the user tracker service. This utility wraps {@link UserTrackerPersistenceImpl} 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 UserTrackerPersistence 036 * @see UserTrackerPersistenceImpl 037 * @generated 038 */ 039 public class UserTrackerUtil { 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(UserTracker userTracker) { 057 getPersistence().clearCache(userTracker); 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<UserTracker> 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<UserTracker> 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<UserTracker> 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 UserTracker update(UserTracker userTracker, boolean merge) 100 throws SystemException { 101 return getPersistence().update(userTracker, merge); 102 } 103 104 /** 105 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 106 */ 107 public static UserTracker update(UserTracker userTracker, boolean merge, 108 ServiceContext serviceContext) throws SystemException { 109 return getPersistence().update(userTracker, merge, serviceContext); 110 } 111 112 /** 113 * Caches the user tracker in the entity cache if it is enabled. 114 * 115 * @param userTracker the user tracker 116 */ 117 public static void cacheResult( 118 com.liferay.portal.model.UserTracker userTracker) { 119 getPersistence().cacheResult(userTracker); 120 } 121 122 /** 123 * Caches the user trackers in the entity cache if it is enabled. 124 * 125 * @param userTrackers the user trackers 126 */ 127 public static void cacheResult( 128 java.util.List<com.liferay.portal.model.UserTracker> userTrackers) { 129 getPersistence().cacheResult(userTrackers); 130 } 131 132 /** 133 * Creates a new user tracker with the primary key. Does not add the user tracker to the database. 134 * 135 * @param userTrackerId the primary key for the new user tracker 136 * @return the new user tracker 137 */ 138 public static com.liferay.portal.model.UserTracker create( 139 long userTrackerId) { 140 return getPersistence().create(userTrackerId); 141 } 142 143 /** 144 * Removes the user tracker with the primary key from the database. Also notifies the appropriate model listeners. 145 * 146 * @param userTrackerId the primary key of the user tracker 147 * @return the user tracker that was removed 148 * @throws com.liferay.portal.NoSuchUserTrackerException if a user tracker with the primary key could not be found 149 * @throws SystemException if a system exception occurred 150 */ 151 public static com.liferay.portal.model.UserTracker remove( 152 long userTrackerId) 153 throws com.liferay.portal.NoSuchUserTrackerException, 154 com.liferay.portal.kernel.exception.SystemException { 155 return getPersistence().remove(userTrackerId); 156 } 157 158 public static com.liferay.portal.model.UserTracker updateImpl( 159 com.liferay.portal.model.UserTracker userTracker, boolean merge) 160 throws com.liferay.portal.kernel.exception.SystemException { 161 return getPersistence().updateImpl(userTracker, merge); 162 } 163 164 /** 165 * Returns the user tracker with the primary key or throws a {@link com.liferay.portal.NoSuchUserTrackerException} if it could not be found. 166 * 167 * @param userTrackerId the primary key of the user tracker 168 * @return the user tracker 169 * @throws com.liferay.portal.NoSuchUserTrackerException if a user tracker with the primary key could not be found 170 * @throws SystemException if a system exception occurred 171 */ 172 public static com.liferay.portal.model.UserTracker findByPrimaryKey( 173 long userTrackerId) 174 throws com.liferay.portal.NoSuchUserTrackerException, 175 com.liferay.portal.kernel.exception.SystemException { 176 return getPersistence().findByPrimaryKey(userTrackerId); 177 } 178 179 /** 180 * Returns the user tracker with the primary key or returns <code>null</code> if it could not be found. 181 * 182 * @param userTrackerId the primary key of the user tracker 183 * @return the user tracker, or <code>null</code> if a user tracker with the primary key could not be found 184 * @throws SystemException if a system exception occurred 185 */ 186 public static com.liferay.portal.model.UserTracker fetchByPrimaryKey( 187 long userTrackerId) 188 throws com.liferay.portal.kernel.exception.SystemException { 189 return getPersistence().fetchByPrimaryKey(userTrackerId); 190 } 191 192 /** 193 * Returns all the user trackers where companyId = ?. 194 * 195 * @param companyId the company ID 196 * @return the matching user trackers 197 * @throws SystemException if a system exception occurred 198 */ 199 public static java.util.List<com.liferay.portal.model.UserTracker> findByCompanyId( 200 long companyId) 201 throws com.liferay.portal.kernel.exception.SystemException { 202 return getPersistence().findByCompanyId(companyId); 203 } 204 205 /** 206 * Returns a range of all the user trackers where companyId = ?. 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 companyId the company ID 213 * @param start the lower bound of the range of user trackers 214 * @param end the upper bound of the range of user trackers (not inclusive) 215 * @return the range of matching user trackers 216 * @throws SystemException if a system exception occurred 217 */ 218 public static java.util.List<com.liferay.portal.model.UserTracker> findByCompanyId( 219 long companyId, int start, int end) 220 throws com.liferay.portal.kernel.exception.SystemException { 221 return getPersistence().findByCompanyId(companyId, start, end); 222 } 223 224 /** 225 * Returns an ordered range of all the user trackers where companyId = ?. 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 companyId the company ID 232 * @param start the lower bound of the range of user trackers 233 * @param end the upper bound of the range of user trackers (not inclusive) 234 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 235 * @return the ordered range of matching user trackers 236 * @throws SystemException if a system exception occurred 237 */ 238 public static java.util.List<com.liferay.portal.model.UserTracker> findByCompanyId( 239 long companyId, int start, int end, 240 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 241 throws com.liferay.portal.kernel.exception.SystemException { 242 return getPersistence() 243 .findByCompanyId(companyId, start, end, orderByComparator); 244 } 245 246 /** 247 * Returns the first user tracker in the ordered set where companyId = ?. 248 * 249 * <p> 250 * 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. 251 * </p> 252 * 253 * @param companyId the company ID 254 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 255 * @return the first matching user tracker 256 * @throws com.liferay.portal.NoSuchUserTrackerException if a matching user tracker could not be found 257 * @throws SystemException if a system exception occurred 258 */ 259 public static com.liferay.portal.model.UserTracker findByCompanyId_First( 260 long companyId, 261 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 262 throws com.liferay.portal.NoSuchUserTrackerException, 263 com.liferay.portal.kernel.exception.SystemException { 264 return getPersistence() 265 .findByCompanyId_First(companyId, orderByComparator); 266 } 267 268 /** 269 * Returns the last user tracker in the ordered set where companyId = ?. 270 * 271 * <p> 272 * 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. 273 * </p> 274 * 275 * @param companyId the company ID 276 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 277 * @return the last matching user tracker 278 * @throws com.liferay.portal.NoSuchUserTrackerException if a matching user tracker could not be found 279 * @throws SystemException if a system exception occurred 280 */ 281 public static com.liferay.portal.model.UserTracker findByCompanyId_Last( 282 long companyId, 283 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 284 throws com.liferay.portal.NoSuchUserTrackerException, 285 com.liferay.portal.kernel.exception.SystemException { 286 return getPersistence() 287 .findByCompanyId_Last(companyId, orderByComparator); 288 } 289 290 /** 291 * Returns the user trackers before and after the current user tracker in the ordered set where companyId = ?. 292 * 293 * <p> 294 * 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. 295 * </p> 296 * 297 * @param userTrackerId the primary key of the current user tracker 298 * @param companyId the company ID 299 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 300 * @return the previous, current, and next user tracker 301 * @throws com.liferay.portal.NoSuchUserTrackerException if a user tracker with the primary key could not be found 302 * @throws SystemException if a system exception occurred 303 */ 304 public static com.liferay.portal.model.UserTracker[] findByCompanyId_PrevAndNext( 305 long userTrackerId, long companyId, 306 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 307 throws com.liferay.portal.NoSuchUserTrackerException, 308 com.liferay.portal.kernel.exception.SystemException { 309 return getPersistence() 310 .findByCompanyId_PrevAndNext(userTrackerId, companyId, 311 orderByComparator); 312 } 313 314 /** 315 * Returns all the user trackers where userId = ?. 316 * 317 * @param userId the user ID 318 * @return the matching user trackers 319 * @throws SystemException if a system exception occurred 320 */ 321 public static java.util.List<com.liferay.portal.model.UserTracker> findByUserId( 322 long userId) throws com.liferay.portal.kernel.exception.SystemException { 323 return getPersistence().findByUserId(userId); 324 } 325 326 /** 327 * Returns a range of all the user trackers where userId = ?. 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 userId the user ID 334 * @param start the lower bound of the range of user trackers 335 * @param end the upper bound of the range of user trackers (not inclusive) 336 * @return the range of matching user trackers 337 * @throws SystemException if a system exception occurred 338 */ 339 public static java.util.List<com.liferay.portal.model.UserTracker> findByUserId( 340 long userId, int start, int end) 341 throws com.liferay.portal.kernel.exception.SystemException { 342 return getPersistence().findByUserId(userId, start, end); 343 } 344 345 /** 346 * Returns an ordered range of all the user trackers where userId = ?. 347 * 348 * <p> 349 * 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. 350 * </p> 351 * 352 * @param userId the user ID 353 * @param start the lower bound of the range of user trackers 354 * @param end the upper bound of the range of user trackers (not inclusive) 355 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 356 * @return the ordered range of matching user trackers 357 * @throws SystemException if a system exception occurred 358 */ 359 public static java.util.List<com.liferay.portal.model.UserTracker> findByUserId( 360 long userId, int start, int end, 361 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 362 throws com.liferay.portal.kernel.exception.SystemException { 363 return getPersistence() 364 .findByUserId(userId, start, end, orderByComparator); 365 } 366 367 /** 368 * Returns the first user tracker in the ordered set where userId = ?. 369 * 370 * <p> 371 * 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. 372 * </p> 373 * 374 * @param userId the user ID 375 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 376 * @return the first matching user tracker 377 * @throws com.liferay.portal.NoSuchUserTrackerException if a matching user tracker could not be found 378 * @throws SystemException if a system exception occurred 379 */ 380 public static com.liferay.portal.model.UserTracker findByUserId_First( 381 long userId, 382 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 383 throws com.liferay.portal.NoSuchUserTrackerException, 384 com.liferay.portal.kernel.exception.SystemException { 385 return getPersistence().findByUserId_First(userId, orderByComparator); 386 } 387 388 /** 389 * Returns the last user tracker in the ordered set where userId = ?. 390 * 391 * <p> 392 * 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. 393 * </p> 394 * 395 * @param userId the user ID 396 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 397 * @return the last matching user tracker 398 * @throws com.liferay.portal.NoSuchUserTrackerException if a matching user tracker could not be found 399 * @throws SystemException if a system exception occurred 400 */ 401 public static com.liferay.portal.model.UserTracker findByUserId_Last( 402 long userId, 403 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 404 throws com.liferay.portal.NoSuchUserTrackerException, 405 com.liferay.portal.kernel.exception.SystemException { 406 return getPersistence().findByUserId_Last(userId, orderByComparator); 407 } 408 409 /** 410 * Returns the user trackers before and after the current user tracker in the ordered set where userId = ?. 411 * 412 * <p> 413 * 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. 414 * </p> 415 * 416 * @param userTrackerId the primary key of the current user tracker 417 * @param userId the user ID 418 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 419 * @return the previous, current, and next user tracker 420 * @throws com.liferay.portal.NoSuchUserTrackerException if a user tracker with the primary key could not be found 421 * @throws SystemException if a system exception occurred 422 */ 423 public static com.liferay.portal.model.UserTracker[] findByUserId_PrevAndNext( 424 long userTrackerId, long userId, 425 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 426 throws com.liferay.portal.NoSuchUserTrackerException, 427 com.liferay.portal.kernel.exception.SystemException { 428 return getPersistence() 429 .findByUserId_PrevAndNext(userTrackerId, userId, 430 orderByComparator); 431 } 432 433 /** 434 * Returns all the user trackers where sessionId = ?. 435 * 436 * @param sessionId the session ID 437 * @return the matching user trackers 438 * @throws SystemException if a system exception occurred 439 */ 440 public static java.util.List<com.liferay.portal.model.UserTracker> findBySessionId( 441 java.lang.String sessionId) 442 throws com.liferay.portal.kernel.exception.SystemException { 443 return getPersistence().findBySessionId(sessionId); 444 } 445 446 /** 447 * Returns a range of all the user trackers where sessionId = ?. 448 * 449 * <p> 450 * 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. 451 * </p> 452 * 453 * @param sessionId the session ID 454 * @param start the lower bound of the range of user trackers 455 * @param end the upper bound of the range of user trackers (not inclusive) 456 * @return the range of matching user trackers 457 * @throws SystemException if a system exception occurred 458 */ 459 public static java.util.List<com.liferay.portal.model.UserTracker> findBySessionId( 460 java.lang.String sessionId, int start, int end) 461 throws com.liferay.portal.kernel.exception.SystemException { 462 return getPersistence().findBySessionId(sessionId, start, end); 463 } 464 465 /** 466 * Returns an ordered range of all the user trackers where sessionId = ?. 467 * 468 * <p> 469 * 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. 470 * </p> 471 * 472 * @param sessionId the session ID 473 * @param start the lower bound of the range of user trackers 474 * @param end the upper bound of the range of user trackers (not inclusive) 475 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 476 * @return the ordered range of matching user trackers 477 * @throws SystemException if a system exception occurred 478 */ 479 public static java.util.List<com.liferay.portal.model.UserTracker> findBySessionId( 480 java.lang.String sessionId, int start, int end, 481 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 482 throws com.liferay.portal.kernel.exception.SystemException { 483 return getPersistence() 484 .findBySessionId(sessionId, start, end, orderByComparator); 485 } 486 487 /** 488 * Returns the first user tracker in the ordered set where sessionId = ?. 489 * 490 * <p> 491 * 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. 492 * </p> 493 * 494 * @param sessionId the session ID 495 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 496 * @return the first matching user tracker 497 * @throws com.liferay.portal.NoSuchUserTrackerException if a matching user tracker could not be found 498 * @throws SystemException if a system exception occurred 499 */ 500 public static com.liferay.portal.model.UserTracker findBySessionId_First( 501 java.lang.String sessionId, 502 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 503 throws com.liferay.portal.NoSuchUserTrackerException, 504 com.liferay.portal.kernel.exception.SystemException { 505 return getPersistence() 506 .findBySessionId_First(sessionId, orderByComparator); 507 } 508 509 /** 510 * Returns the last user tracker in the ordered set where sessionId = ?. 511 * 512 * <p> 513 * 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. 514 * </p> 515 * 516 * @param sessionId the session ID 517 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 518 * @return the last matching user tracker 519 * @throws com.liferay.portal.NoSuchUserTrackerException if a matching user tracker could not be found 520 * @throws SystemException if a system exception occurred 521 */ 522 public static com.liferay.portal.model.UserTracker findBySessionId_Last( 523 java.lang.String sessionId, 524 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 525 throws com.liferay.portal.NoSuchUserTrackerException, 526 com.liferay.portal.kernel.exception.SystemException { 527 return getPersistence() 528 .findBySessionId_Last(sessionId, orderByComparator); 529 } 530 531 /** 532 * Returns the user trackers before and after the current user tracker in the ordered set where sessionId = ?. 533 * 534 * <p> 535 * 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. 536 * </p> 537 * 538 * @param userTrackerId the primary key of the current user tracker 539 * @param sessionId the session ID 540 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 541 * @return the previous, current, and next user tracker 542 * @throws com.liferay.portal.NoSuchUserTrackerException if a user tracker with the primary key could not be found 543 * @throws SystemException if a system exception occurred 544 */ 545 public static com.liferay.portal.model.UserTracker[] findBySessionId_PrevAndNext( 546 long userTrackerId, java.lang.String sessionId, 547 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 548 throws com.liferay.portal.NoSuchUserTrackerException, 549 com.liferay.portal.kernel.exception.SystemException { 550 return getPersistence() 551 .findBySessionId_PrevAndNext(userTrackerId, sessionId, 552 orderByComparator); 553 } 554 555 /** 556 * Returns all the user trackers. 557 * 558 * @return the user trackers 559 * @throws SystemException if a system exception occurred 560 */ 561 public static java.util.List<com.liferay.portal.model.UserTracker> findAll() 562 throws com.liferay.portal.kernel.exception.SystemException { 563 return getPersistence().findAll(); 564 } 565 566 /** 567 * Returns a range of all the user trackers. 568 * 569 * <p> 570 * 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. 571 * </p> 572 * 573 * @param start the lower bound of the range of user trackers 574 * @param end the upper bound of the range of user trackers (not inclusive) 575 * @return the range of user trackers 576 * @throws SystemException if a system exception occurred 577 */ 578 public static java.util.List<com.liferay.portal.model.UserTracker> findAll( 579 int start, int end) 580 throws com.liferay.portal.kernel.exception.SystemException { 581 return getPersistence().findAll(start, end); 582 } 583 584 /** 585 * Returns an ordered range of all the user trackers. 586 * 587 * <p> 588 * 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. 589 * </p> 590 * 591 * @param start the lower bound of the range of user trackers 592 * @param end the upper bound of the range of user trackers (not inclusive) 593 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 594 * @return the ordered range of user trackers 595 * @throws SystemException if a system exception occurred 596 */ 597 public static java.util.List<com.liferay.portal.model.UserTracker> findAll( 598 int start, int end, 599 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 600 throws com.liferay.portal.kernel.exception.SystemException { 601 return getPersistence().findAll(start, end, orderByComparator); 602 } 603 604 /** 605 * Removes all the user trackers where companyId = ? from the database. 606 * 607 * @param companyId the company ID 608 * @throws SystemException if a system exception occurred 609 */ 610 public static void removeByCompanyId(long companyId) 611 throws com.liferay.portal.kernel.exception.SystemException { 612 getPersistence().removeByCompanyId(companyId); 613 } 614 615 /** 616 * Removes all the user trackers where userId = ? from the database. 617 * 618 * @param userId the user ID 619 * @throws SystemException if a system exception occurred 620 */ 621 public static void removeByUserId(long userId) 622 throws com.liferay.portal.kernel.exception.SystemException { 623 getPersistence().removeByUserId(userId); 624 } 625 626 /** 627 * Removes all the user trackers where sessionId = ? from the database. 628 * 629 * @param sessionId the session ID 630 * @throws SystemException if a system exception occurred 631 */ 632 public static void removeBySessionId(java.lang.String sessionId) 633 throws com.liferay.portal.kernel.exception.SystemException { 634 getPersistence().removeBySessionId(sessionId); 635 } 636 637 /** 638 * Removes all the user trackers from the database. 639 * 640 * @throws SystemException if a system exception occurred 641 */ 642 public static void removeAll() 643 throws com.liferay.portal.kernel.exception.SystemException { 644 getPersistence().removeAll(); 645 } 646 647 /** 648 * Returns the number of user trackers where companyId = ?. 649 * 650 * @param companyId the company ID 651 * @return the number of matching user trackers 652 * @throws SystemException if a system exception occurred 653 */ 654 public static int countByCompanyId(long companyId) 655 throws com.liferay.portal.kernel.exception.SystemException { 656 return getPersistence().countByCompanyId(companyId); 657 } 658 659 /** 660 * Returns the number of user trackers where userId = ?. 661 * 662 * @param userId the user ID 663 * @return the number of matching user trackers 664 * @throws SystemException if a system exception occurred 665 */ 666 public static int countByUserId(long userId) 667 throws com.liferay.portal.kernel.exception.SystemException { 668 return getPersistence().countByUserId(userId); 669 } 670 671 /** 672 * Returns the number of user trackers where sessionId = ?. 673 * 674 * @param sessionId the session ID 675 * @return the number of matching user trackers 676 * @throws SystemException if a system exception occurred 677 */ 678 public static int countBySessionId(java.lang.String sessionId) 679 throws com.liferay.portal.kernel.exception.SystemException { 680 return getPersistence().countBySessionId(sessionId); 681 } 682 683 /** 684 * Returns the number of user trackers. 685 * 686 * @return the number of user trackers 687 * @throws SystemException if a system exception occurred 688 */ 689 public static int countAll() 690 throws com.liferay.portal.kernel.exception.SystemException { 691 return getPersistence().countAll(); 692 } 693 694 public static UserTrackerPersistence getPersistence() { 695 if (_persistence == null) { 696 _persistence = (UserTrackerPersistence)PortalBeanLocatorUtil.locate(UserTrackerPersistence.class.getName()); 697 698 ReferenceRegistry.registerReference(UserTrackerUtil.class, 699 "_persistence"); 700 } 701 702 return _persistence; 703 } 704 705 public void setPersistence(UserTrackerPersistence persistence) { 706 _persistence = persistence; 707 708 ReferenceRegistry.registerReference(UserTrackerUtil.class, 709 "_persistence"); 710 } 711 712 private static UserTrackerPersistence _persistence; 713 }