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