001 /** 002 * Copyright (c) 2000-2013 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 * @param companyId the company ID 250 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 251 * @return the first matching user tracker 252 * @throws com.liferay.portal.NoSuchUserTrackerException if a matching user tracker could not be found 253 * @throws SystemException if a system exception occurred 254 */ 255 public static com.liferay.portal.model.UserTracker findByCompanyId_First( 256 long companyId, 257 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 258 throws com.liferay.portal.NoSuchUserTrackerException, 259 com.liferay.portal.kernel.exception.SystemException { 260 return getPersistence() 261 .findByCompanyId_First(companyId, orderByComparator); 262 } 263 264 /** 265 * Returns the first user tracker in the ordered set where companyId = ?. 266 * 267 * @param companyId the company ID 268 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 269 * @return the first matching user tracker, or <code>null</code> if a matching user tracker could not be found 270 * @throws SystemException if a system exception occurred 271 */ 272 public static com.liferay.portal.model.UserTracker fetchByCompanyId_First( 273 long companyId, 274 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 275 throws com.liferay.portal.kernel.exception.SystemException { 276 return getPersistence() 277 .fetchByCompanyId_First(companyId, orderByComparator); 278 } 279 280 /** 281 * Returns the last user tracker in the ordered set where companyId = ?. 282 * 283 * @param companyId the company ID 284 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 285 * @return the last matching user tracker 286 * @throws com.liferay.portal.NoSuchUserTrackerException if a matching user tracker could not be found 287 * @throws SystemException if a system exception occurred 288 */ 289 public static com.liferay.portal.model.UserTracker findByCompanyId_Last( 290 long companyId, 291 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 292 throws com.liferay.portal.NoSuchUserTrackerException, 293 com.liferay.portal.kernel.exception.SystemException { 294 return getPersistence() 295 .findByCompanyId_Last(companyId, orderByComparator); 296 } 297 298 /** 299 * Returns the last user tracker in the ordered set where companyId = ?. 300 * 301 * @param companyId the company ID 302 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 303 * @return the last matching user tracker, or <code>null</code> if a matching user tracker could not be found 304 * @throws SystemException if a system exception occurred 305 */ 306 public static com.liferay.portal.model.UserTracker fetchByCompanyId_Last( 307 long companyId, 308 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 309 throws com.liferay.portal.kernel.exception.SystemException { 310 return getPersistence() 311 .fetchByCompanyId_Last(companyId, orderByComparator); 312 } 313 314 /** 315 * Returns the user trackers before and after the current user tracker in the ordered set where companyId = ?. 316 * 317 * @param userTrackerId the primary key of the current user tracker 318 * @param companyId the company ID 319 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 320 * @return the previous, current, and next user tracker 321 * @throws com.liferay.portal.NoSuchUserTrackerException if a user tracker with the primary key could not be found 322 * @throws SystemException if a system exception occurred 323 */ 324 public static com.liferay.portal.model.UserTracker[] findByCompanyId_PrevAndNext( 325 long userTrackerId, long companyId, 326 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 327 throws com.liferay.portal.NoSuchUserTrackerException, 328 com.liferay.portal.kernel.exception.SystemException { 329 return getPersistence() 330 .findByCompanyId_PrevAndNext(userTrackerId, companyId, 331 orderByComparator); 332 } 333 334 /** 335 * Returns all the user trackers where userId = ?. 336 * 337 * @param userId the user ID 338 * @return the matching user trackers 339 * @throws SystemException if a system exception occurred 340 */ 341 public static java.util.List<com.liferay.portal.model.UserTracker> findByUserId( 342 long userId) throws com.liferay.portal.kernel.exception.SystemException { 343 return getPersistence().findByUserId(userId); 344 } 345 346 /** 347 * Returns a range of all the user trackers where userId = ?. 348 * 349 * <p> 350 * 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. 351 * </p> 352 * 353 * @param userId the user ID 354 * @param start the lower bound of the range of user trackers 355 * @param end the upper bound of the range of user trackers (not inclusive) 356 * @return the 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 throws com.liferay.portal.kernel.exception.SystemException { 362 return getPersistence().findByUserId(userId, start, end); 363 } 364 365 /** 366 * Returns an ordered range of all the user trackers where userId = ?. 367 * 368 * <p> 369 * 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. 370 * </p> 371 * 372 * @param userId the user ID 373 * @param start the lower bound of the range of user trackers 374 * @param end the upper bound of the range of user trackers (not inclusive) 375 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 376 * @return the ordered range of matching user trackers 377 * @throws SystemException if a system exception occurred 378 */ 379 public static java.util.List<com.liferay.portal.model.UserTracker> findByUserId( 380 long userId, int start, int end, 381 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 382 throws com.liferay.portal.kernel.exception.SystemException { 383 return getPersistence() 384 .findByUserId(userId, start, end, orderByComparator); 385 } 386 387 /** 388 * Returns the first user tracker in the ordered set where userId = ?. 389 * 390 * @param userId the user ID 391 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 392 * @return the first matching user tracker 393 * @throws com.liferay.portal.NoSuchUserTrackerException if a matching user tracker could not be found 394 * @throws SystemException if a system exception occurred 395 */ 396 public static com.liferay.portal.model.UserTracker findByUserId_First( 397 long userId, 398 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 399 throws com.liferay.portal.NoSuchUserTrackerException, 400 com.liferay.portal.kernel.exception.SystemException { 401 return getPersistence().findByUserId_First(userId, orderByComparator); 402 } 403 404 /** 405 * Returns the first user tracker in the ordered set where userId = ?. 406 * 407 * @param userId the user ID 408 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 409 * @return the first matching user tracker, or <code>null</code> if a matching user tracker could not be found 410 * @throws SystemException if a system exception occurred 411 */ 412 public static com.liferay.portal.model.UserTracker fetchByUserId_First( 413 long userId, 414 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 415 throws com.liferay.portal.kernel.exception.SystemException { 416 return getPersistence().fetchByUserId_First(userId, orderByComparator); 417 } 418 419 /** 420 * Returns the last user tracker in the ordered set where userId = ?. 421 * 422 * @param userId the user ID 423 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 424 * @return the last matching user tracker 425 * @throws com.liferay.portal.NoSuchUserTrackerException if a matching user tracker could not be found 426 * @throws SystemException if a system exception occurred 427 */ 428 public static com.liferay.portal.model.UserTracker findByUserId_Last( 429 long userId, 430 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 431 throws com.liferay.portal.NoSuchUserTrackerException, 432 com.liferay.portal.kernel.exception.SystemException { 433 return getPersistence().findByUserId_Last(userId, orderByComparator); 434 } 435 436 /** 437 * Returns the last user tracker in the ordered set where userId = ?. 438 * 439 * @param userId the user ID 440 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 441 * @return the last matching user tracker, or <code>null</code> if a matching user tracker could not be found 442 * @throws SystemException if a system exception occurred 443 */ 444 public static com.liferay.portal.model.UserTracker fetchByUserId_Last( 445 long userId, 446 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 447 throws com.liferay.portal.kernel.exception.SystemException { 448 return getPersistence().fetchByUserId_Last(userId, orderByComparator); 449 } 450 451 /** 452 * Returns the user trackers before and after the current user tracker in the ordered set where userId = ?. 453 * 454 * @param userTrackerId the primary key of the current user tracker 455 * @param userId the user ID 456 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 457 * @return the previous, current, and next user tracker 458 * @throws com.liferay.portal.NoSuchUserTrackerException if a user tracker with the primary key could not be found 459 * @throws SystemException if a system exception occurred 460 */ 461 public static com.liferay.portal.model.UserTracker[] findByUserId_PrevAndNext( 462 long userTrackerId, long userId, 463 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 464 throws com.liferay.portal.NoSuchUserTrackerException, 465 com.liferay.portal.kernel.exception.SystemException { 466 return getPersistence() 467 .findByUserId_PrevAndNext(userTrackerId, userId, 468 orderByComparator); 469 } 470 471 /** 472 * Returns all the user trackers where sessionId = ?. 473 * 474 * @param sessionId the session ID 475 * @return the matching user trackers 476 * @throws SystemException if a system exception occurred 477 */ 478 public static java.util.List<com.liferay.portal.model.UserTracker> findBySessionId( 479 java.lang.String sessionId) 480 throws com.liferay.portal.kernel.exception.SystemException { 481 return getPersistence().findBySessionId(sessionId); 482 } 483 484 /** 485 * Returns a range of all the user trackers where sessionId = ?. 486 * 487 * <p> 488 * 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. 489 * </p> 490 * 491 * @param sessionId the session ID 492 * @param start the lower bound of the range of user trackers 493 * @param end the upper bound of the range of user trackers (not inclusive) 494 * @return the range of matching user trackers 495 * @throws SystemException if a system exception occurred 496 */ 497 public static java.util.List<com.liferay.portal.model.UserTracker> findBySessionId( 498 java.lang.String sessionId, int start, int end) 499 throws com.liferay.portal.kernel.exception.SystemException { 500 return getPersistence().findBySessionId(sessionId, start, end); 501 } 502 503 /** 504 * Returns an ordered range of all the user trackers where sessionId = ?. 505 * 506 * <p> 507 * 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. 508 * </p> 509 * 510 * @param sessionId the session ID 511 * @param start the lower bound of the range of user trackers 512 * @param end the upper bound of the range of user trackers (not inclusive) 513 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 514 * @return the ordered range of matching user trackers 515 * @throws SystemException if a system exception occurred 516 */ 517 public static java.util.List<com.liferay.portal.model.UserTracker> findBySessionId( 518 java.lang.String sessionId, int start, int end, 519 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 520 throws com.liferay.portal.kernel.exception.SystemException { 521 return getPersistence() 522 .findBySessionId(sessionId, start, end, orderByComparator); 523 } 524 525 /** 526 * Returns the first user tracker in the ordered set where sessionId = ?. 527 * 528 * @param sessionId the session ID 529 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 530 * @return the first matching user tracker 531 * @throws com.liferay.portal.NoSuchUserTrackerException if a matching user tracker could not be found 532 * @throws SystemException if a system exception occurred 533 */ 534 public static com.liferay.portal.model.UserTracker findBySessionId_First( 535 java.lang.String sessionId, 536 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 537 throws com.liferay.portal.NoSuchUserTrackerException, 538 com.liferay.portal.kernel.exception.SystemException { 539 return getPersistence() 540 .findBySessionId_First(sessionId, orderByComparator); 541 } 542 543 /** 544 * Returns the first user tracker in the ordered set where sessionId = ?. 545 * 546 * @param sessionId the session ID 547 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 548 * @return the first matching user tracker, or <code>null</code> if a matching user tracker could not be found 549 * @throws SystemException if a system exception occurred 550 */ 551 public static com.liferay.portal.model.UserTracker fetchBySessionId_First( 552 java.lang.String sessionId, 553 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 554 throws com.liferay.portal.kernel.exception.SystemException { 555 return getPersistence() 556 .fetchBySessionId_First(sessionId, orderByComparator); 557 } 558 559 /** 560 * Returns the last user tracker in the ordered set where sessionId = ?. 561 * 562 * @param sessionId the session ID 563 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 564 * @return the last matching user tracker 565 * @throws com.liferay.portal.NoSuchUserTrackerException if a matching user tracker could not be found 566 * @throws SystemException if a system exception occurred 567 */ 568 public static com.liferay.portal.model.UserTracker findBySessionId_Last( 569 java.lang.String sessionId, 570 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 571 throws com.liferay.portal.NoSuchUserTrackerException, 572 com.liferay.portal.kernel.exception.SystemException { 573 return getPersistence() 574 .findBySessionId_Last(sessionId, orderByComparator); 575 } 576 577 /** 578 * Returns the last user tracker in the ordered set where sessionId = ?. 579 * 580 * @param sessionId the session ID 581 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 582 * @return the last matching user tracker, or <code>null</code> if a matching user tracker could not be found 583 * @throws SystemException if a system exception occurred 584 */ 585 public static com.liferay.portal.model.UserTracker fetchBySessionId_Last( 586 java.lang.String sessionId, 587 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 588 throws com.liferay.portal.kernel.exception.SystemException { 589 return getPersistence() 590 .fetchBySessionId_Last(sessionId, orderByComparator); 591 } 592 593 /** 594 * Returns the user trackers before and after the current user tracker in the ordered set where sessionId = ?. 595 * 596 * @param userTrackerId the primary key of the current user tracker 597 * @param sessionId the session ID 598 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 599 * @return the previous, current, and next user tracker 600 * @throws com.liferay.portal.NoSuchUserTrackerException if a user tracker with the primary key could not be found 601 * @throws SystemException if a system exception occurred 602 */ 603 public static com.liferay.portal.model.UserTracker[] findBySessionId_PrevAndNext( 604 long userTrackerId, java.lang.String sessionId, 605 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 606 throws com.liferay.portal.NoSuchUserTrackerException, 607 com.liferay.portal.kernel.exception.SystemException { 608 return getPersistence() 609 .findBySessionId_PrevAndNext(userTrackerId, sessionId, 610 orderByComparator); 611 } 612 613 /** 614 * Returns all the user trackers. 615 * 616 * @return the user trackers 617 * @throws SystemException if a system exception occurred 618 */ 619 public static java.util.List<com.liferay.portal.model.UserTracker> findAll() 620 throws com.liferay.portal.kernel.exception.SystemException { 621 return getPersistence().findAll(); 622 } 623 624 /** 625 * Returns a range of all the user trackers. 626 * 627 * <p> 628 * 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. 629 * </p> 630 * 631 * @param start the lower bound of the range of user trackers 632 * @param end the upper bound of the range of user trackers (not inclusive) 633 * @return the range of user trackers 634 * @throws SystemException if a system exception occurred 635 */ 636 public static java.util.List<com.liferay.portal.model.UserTracker> findAll( 637 int start, int end) 638 throws com.liferay.portal.kernel.exception.SystemException { 639 return getPersistence().findAll(start, end); 640 } 641 642 /** 643 * Returns an ordered range of all the user trackers. 644 * 645 * <p> 646 * 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. 647 * </p> 648 * 649 * @param start the lower bound of the range of user trackers 650 * @param end the upper bound of the range of user trackers (not inclusive) 651 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 652 * @return the ordered range of user trackers 653 * @throws SystemException if a system exception occurred 654 */ 655 public static java.util.List<com.liferay.portal.model.UserTracker> findAll( 656 int start, int end, 657 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 658 throws com.liferay.portal.kernel.exception.SystemException { 659 return getPersistence().findAll(start, end, orderByComparator); 660 } 661 662 /** 663 * Removes all the user trackers where companyId = ? from the database. 664 * 665 * @param companyId the company ID 666 * @throws SystemException if a system exception occurred 667 */ 668 public static void removeByCompanyId(long companyId) 669 throws com.liferay.portal.kernel.exception.SystemException { 670 getPersistence().removeByCompanyId(companyId); 671 } 672 673 /** 674 * Removes all the user trackers where userId = ? from the database. 675 * 676 * @param userId the user ID 677 * @throws SystemException if a system exception occurred 678 */ 679 public static void removeByUserId(long userId) 680 throws com.liferay.portal.kernel.exception.SystemException { 681 getPersistence().removeByUserId(userId); 682 } 683 684 /** 685 * Removes all the user trackers where sessionId = ? from the database. 686 * 687 * @param sessionId the session ID 688 * @throws SystemException if a system exception occurred 689 */ 690 public static void removeBySessionId(java.lang.String sessionId) 691 throws com.liferay.portal.kernel.exception.SystemException { 692 getPersistence().removeBySessionId(sessionId); 693 } 694 695 /** 696 * Removes all the user trackers from the database. 697 * 698 * @throws SystemException if a system exception occurred 699 */ 700 public static void removeAll() 701 throws com.liferay.portal.kernel.exception.SystemException { 702 getPersistence().removeAll(); 703 } 704 705 /** 706 * Returns the number of user trackers where companyId = ?. 707 * 708 * @param companyId the company ID 709 * @return the number of matching user trackers 710 * @throws SystemException if a system exception occurred 711 */ 712 public static int countByCompanyId(long companyId) 713 throws com.liferay.portal.kernel.exception.SystemException { 714 return getPersistence().countByCompanyId(companyId); 715 } 716 717 /** 718 * Returns the number of user trackers where userId = ?. 719 * 720 * @param userId the user ID 721 * @return the number of matching user trackers 722 * @throws SystemException if a system exception occurred 723 */ 724 public static int countByUserId(long userId) 725 throws com.liferay.portal.kernel.exception.SystemException { 726 return getPersistence().countByUserId(userId); 727 } 728 729 /** 730 * Returns the number of user trackers where sessionId = ?. 731 * 732 * @param sessionId the session ID 733 * @return the number of matching user trackers 734 * @throws SystemException if a system exception occurred 735 */ 736 public static int countBySessionId(java.lang.String sessionId) 737 throws com.liferay.portal.kernel.exception.SystemException { 738 return getPersistence().countBySessionId(sessionId); 739 } 740 741 /** 742 * Returns the number of user trackers. 743 * 744 * @return the number of user trackers 745 * @throws SystemException if a system exception occurred 746 */ 747 public static int countAll() 748 throws com.liferay.portal.kernel.exception.SystemException { 749 return getPersistence().countAll(); 750 } 751 752 public static UserTrackerPersistence getPersistence() { 753 if (_persistence == null) { 754 _persistence = (UserTrackerPersistence)PortalBeanLocatorUtil.locate(UserTrackerPersistence.class.getName()); 755 756 ReferenceRegistry.registerReference(UserTrackerUtil.class, 757 "_persistence"); 758 } 759 760 return _persistence; 761 } 762 763 /** 764 * @deprecated 765 */ 766 public void setPersistence(UserTrackerPersistence persistence) { 767 } 768 769 private static UserTrackerPersistence _persistence; 770 }