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.UserIdMapper; 022 import com.liferay.portal.service.ServiceContext; 023 024 import java.util.List; 025 026 /** 027 * The persistence utility for the user id mapper 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 UserIdMapperPersistence 035 * @see UserIdMapperPersistenceImpl 036 * @generated 037 */ 038 public class UserIdMapperUtil { 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(UserIdMapper userIdMapper) { 050 getPersistence().clearCache(userIdMapper); 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<UserIdMapper> 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<UserIdMapper> 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<UserIdMapper> 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 UserIdMapper remove(UserIdMapper userIdMapper) 093 throws SystemException { 094 return getPersistence().remove(userIdMapper); 095 } 096 097 /** 098 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 099 */ 100 public static UserIdMapper update(UserIdMapper userIdMapper, boolean merge) 101 throws SystemException { 102 return getPersistence().update(userIdMapper, merge); 103 } 104 105 /** 106 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 107 */ 108 public static UserIdMapper update(UserIdMapper userIdMapper, boolean merge, 109 ServiceContext serviceContext) throws SystemException { 110 return getPersistence().update(userIdMapper, merge, serviceContext); 111 } 112 113 /** 114 * Caches the user id mapper in the entity cache if it is enabled. 115 * 116 * @param userIdMapper the user id mapper to cache 117 */ 118 public static void cacheResult( 119 com.liferay.portal.model.UserIdMapper userIdMapper) { 120 getPersistence().cacheResult(userIdMapper); 121 } 122 123 /** 124 * Caches the user id mappers in the entity cache if it is enabled. 125 * 126 * @param userIdMappers the user id mappers to cache 127 */ 128 public static void cacheResult( 129 java.util.List<com.liferay.portal.model.UserIdMapper> userIdMappers) { 130 getPersistence().cacheResult(userIdMappers); 131 } 132 133 /** 134 * Creates a new user id mapper with the primary key. 135 * 136 * @param userIdMapperId the primary key for the new user id mapper 137 * @return the new user id mapper 138 */ 139 public static com.liferay.portal.model.UserIdMapper create( 140 long userIdMapperId) { 141 return getPersistence().create(userIdMapperId); 142 } 143 144 /** 145 * Removes the user id mapper with the primary key from the database. Also notifies the appropriate model listeners. 146 * 147 * @param userIdMapperId the primary key of the user id mapper to remove 148 * @return the user id mapper that was removed 149 * @throws com.liferay.portal.NoSuchUserIdMapperException if a user id mapper with the primary key could not be found 150 * @throws SystemException if a system exception occurred 151 */ 152 public static com.liferay.portal.model.UserIdMapper remove( 153 long userIdMapperId) 154 throws com.liferay.portal.NoSuchUserIdMapperException, 155 com.liferay.portal.kernel.exception.SystemException { 156 return getPersistence().remove(userIdMapperId); 157 } 158 159 public static com.liferay.portal.model.UserIdMapper updateImpl( 160 com.liferay.portal.model.UserIdMapper userIdMapper, boolean merge) 161 throws com.liferay.portal.kernel.exception.SystemException { 162 return getPersistence().updateImpl(userIdMapper, merge); 163 } 164 165 /** 166 * Finds the user id mapper with the primary key or throws a {@link com.liferay.portal.NoSuchUserIdMapperException} if it could not be found. 167 * 168 * @param userIdMapperId the primary key of the user id mapper to find 169 * @return the user id mapper 170 * @throws com.liferay.portal.NoSuchUserIdMapperException if a user id mapper with the primary key could not be found 171 * @throws SystemException if a system exception occurred 172 */ 173 public static com.liferay.portal.model.UserIdMapper findByPrimaryKey( 174 long userIdMapperId) 175 throws com.liferay.portal.NoSuchUserIdMapperException, 176 com.liferay.portal.kernel.exception.SystemException { 177 return getPersistence().findByPrimaryKey(userIdMapperId); 178 } 179 180 /** 181 * Finds the user id mapper with the primary key or returns <code>null</code> if it could not be found. 182 * 183 * @param userIdMapperId the primary key of the user id mapper to find 184 * @return the user id mapper, or <code>null</code> if a user id mapper with the primary key could not be found 185 * @throws SystemException if a system exception occurred 186 */ 187 public static com.liferay.portal.model.UserIdMapper fetchByPrimaryKey( 188 long userIdMapperId) 189 throws com.liferay.portal.kernel.exception.SystemException { 190 return getPersistence().fetchByPrimaryKey(userIdMapperId); 191 } 192 193 /** 194 * Finds all the user id mappers where userId = ?. 195 * 196 * @param userId the user id to search with 197 * @return the matching user id mappers 198 * @throws SystemException if a system exception occurred 199 */ 200 public static java.util.List<com.liferay.portal.model.UserIdMapper> findByUserId( 201 long userId) throws com.liferay.portal.kernel.exception.SystemException { 202 return getPersistence().findByUserId(userId); 203 } 204 205 /** 206 * Finds a range of all the user id mappers where userId = ?. 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 userId the user id to search with 213 * @param start the lower bound of the range of user id mappers to return 214 * @param end the upper bound of the range of user id mappers to return (not inclusive) 215 * @return the range of matching user id mappers 216 * @throws SystemException if a system exception occurred 217 */ 218 public static java.util.List<com.liferay.portal.model.UserIdMapper> findByUserId( 219 long userId, int start, int end) 220 throws com.liferay.portal.kernel.exception.SystemException { 221 return getPersistence().findByUserId(userId, start, end); 222 } 223 224 /** 225 * Finds an ordered range of all the user id mappers where userId = ?. 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 userId the user id to search with 232 * @param start the lower bound of the range of user id mappers to return 233 * @param end the upper bound of the range of user id mappers to return (not inclusive) 234 * @param orderByComparator the comparator to order the results by 235 * @return the ordered range of matching user id mappers 236 * @throws SystemException if a system exception occurred 237 */ 238 public static java.util.List<com.liferay.portal.model.UserIdMapper> findByUserId( 239 long userId, int start, int end, 240 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 241 throws com.liferay.portal.kernel.exception.SystemException { 242 return getPersistence() 243 .findByUserId(userId, start, end, orderByComparator); 244 } 245 246 /** 247 * Finds the first user id mapper in the ordered set where userId = ?. 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 userId the user id to search with 254 * @param orderByComparator the comparator to order the set by 255 * @return the first matching user id mapper 256 * @throws com.liferay.portal.NoSuchUserIdMapperException if a matching user id mapper could not be found 257 * @throws SystemException if a system exception occurred 258 */ 259 public static com.liferay.portal.model.UserIdMapper findByUserId_First( 260 long userId, 261 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 262 throws com.liferay.portal.NoSuchUserIdMapperException, 263 com.liferay.portal.kernel.exception.SystemException { 264 return getPersistence().findByUserId_First(userId, orderByComparator); 265 } 266 267 /** 268 * Finds the last user id mapper in the ordered set where userId = ?. 269 * 270 * <p> 271 * 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. 272 * </p> 273 * 274 * @param userId the user id to search with 275 * @param orderByComparator the comparator to order the set by 276 * @return the last matching user id mapper 277 * @throws com.liferay.portal.NoSuchUserIdMapperException if a matching user id mapper could not be found 278 * @throws SystemException if a system exception occurred 279 */ 280 public static com.liferay.portal.model.UserIdMapper findByUserId_Last( 281 long userId, 282 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 283 throws com.liferay.portal.NoSuchUserIdMapperException, 284 com.liferay.portal.kernel.exception.SystemException { 285 return getPersistence().findByUserId_Last(userId, orderByComparator); 286 } 287 288 /** 289 * Finds the user id mappers before and after the current user id mapper in the ordered set where userId = ?. 290 * 291 * <p> 292 * 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. 293 * </p> 294 * 295 * @param userIdMapperId the primary key of the current user id mapper 296 * @param userId the user id to search with 297 * @param orderByComparator the comparator to order the set by 298 * @return the previous, current, and next user id mapper 299 * @throws com.liferay.portal.NoSuchUserIdMapperException if a user id mapper with the primary key could not be found 300 * @throws SystemException if a system exception occurred 301 */ 302 public static com.liferay.portal.model.UserIdMapper[] findByUserId_PrevAndNext( 303 long userIdMapperId, long userId, 304 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 305 throws com.liferay.portal.NoSuchUserIdMapperException, 306 com.liferay.portal.kernel.exception.SystemException { 307 return getPersistence() 308 .findByUserId_PrevAndNext(userIdMapperId, userId, 309 orderByComparator); 310 } 311 312 /** 313 * Finds the user id mapper where userId = ? and type = ? or throws a {@link com.liferay.portal.NoSuchUserIdMapperException} if it could not be found. 314 * 315 * @param userId the user id to search with 316 * @param type the type to search with 317 * @return the matching user id mapper 318 * @throws com.liferay.portal.NoSuchUserIdMapperException if a matching user id mapper could not be found 319 * @throws SystemException if a system exception occurred 320 */ 321 public static com.liferay.portal.model.UserIdMapper findByU_T(long userId, 322 java.lang.String type) 323 throws com.liferay.portal.NoSuchUserIdMapperException, 324 com.liferay.portal.kernel.exception.SystemException { 325 return getPersistence().findByU_T(userId, type); 326 } 327 328 /** 329 * Finds the user id mapper where userId = ? and type = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 330 * 331 * @param userId the user id to search with 332 * @param type the type to search with 333 * @return the matching user id mapper, or <code>null</code> if a matching user id mapper could not be found 334 * @throws SystemException if a system exception occurred 335 */ 336 public static com.liferay.portal.model.UserIdMapper fetchByU_T( 337 long userId, java.lang.String type) 338 throws com.liferay.portal.kernel.exception.SystemException { 339 return getPersistence().fetchByU_T(userId, type); 340 } 341 342 /** 343 * Finds the user id mapper where userId = ? and type = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 344 * 345 * @param userId the user id to search with 346 * @param type the type to search with 347 * @return the matching user id mapper, or <code>null</code> if a matching user id mapper could not be found 348 * @throws SystemException if a system exception occurred 349 */ 350 public static com.liferay.portal.model.UserIdMapper fetchByU_T( 351 long userId, java.lang.String type, boolean retrieveFromCache) 352 throws com.liferay.portal.kernel.exception.SystemException { 353 return getPersistence().fetchByU_T(userId, type, retrieveFromCache); 354 } 355 356 /** 357 * Finds the user id mapper where type = ? and externalUserId = ? or throws a {@link com.liferay.portal.NoSuchUserIdMapperException} if it could not be found. 358 * 359 * @param type the type to search with 360 * @param externalUserId the external user id to search with 361 * @return the matching user id mapper 362 * @throws com.liferay.portal.NoSuchUserIdMapperException if a matching user id mapper could not be found 363 * @throws SystemException if a system exception occurred 364 */ 365 public static com.liferay.portal.model.UserIdMapper findByT_E( 366 java.lang.String type, java.lang.String externalUserId) 367 throws com.liferay.portal.NoSuchUserIdMapperException, 368 com.liferay.portal.kernel.exception.SystemException { 369 return getPersistence().findByT_E(type, externalUserId); 370 } 371 372 /** 373 * Finds the user id mapper where type = ? and externalUserId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 374 * 375 * @param type the type to search with 376 * @param externalUserId the external user id to search with 377 * @return the matching user id mapper, or <code>null</code> if a matching user id mapper could not be found 378 * @throws SystemException if a system exception occurred 379 */ 380 public static com.liferay.portal.model.UserIdMapper fetchByT_E( 381 java.lang.String type, java.lang.String externalUserId) 382 throws com.liferay.portal.kernel.exception.SystemException { 383 return getPersistence().fetchByT_E(type, externalUserId); 384 } 385 386 /** 387 * Finds the user id mapper where type = ? and externalUserId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 388 * 389 * @param type the type to search with 390 * @param externalUserId the external user id to search with 391 * @return the matching user id mapper, or <code>null</code> if a matching user id mapper could not be found 392 * @throws SystemException if a system exception occurred 393 */ 394 public static com.liferay.portal.model.UserIdMapper fetchByT_E( 395 java.lang.String type, java.lang.String externalUserId, 396 boolean retrieveFromCache) 397 throws com.liferay.portal.kernel.exception.SystemException { 398 return getPersistence() 399 .fetchByT_E(type, externalUserId, retrieveFromCache); 400 } 401 402 /** 403 * Finds all the user id mappers. 404 * 405 * @return the user id mappers 406 * @throws SystemException if a system exception occurred 407 */ 408 public static java.util.List<com.liferay.portal.model.UserIdMapper> findAll() 409 throws com.liferay.portal.kernel.exception.SystemException { 410 return getPersistence().findAll(); 411 } 412 413 /** 414 * Finds a range of all the user id mappers. 415 * 416 * <p> 417 * 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. 418 * </p> 419 * 420 * @param start the lower bound of the range of user id mappers to return 421 * @param end the upper bound of the range of user id mappers to return (not inclusive) 422 * @return the range of user id mappers 423 * @throws SystemException if a system exception occurred 424 */ 425 public static java.util.List<com.liferay.portal.model.UserIdMapper> findAll( 426 int start, int end) 427 throws com.liferay.portal.kernel.exception.SystemException { 428 return getPersistence().findAll(start, end); 429 } 430 431 /** 432 * Finds an ordered range of all the user id mappers. 433 * 434 * <p> 435 * 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. 436 * </p> 437 * 438 * @param start the lower bound of the range of user id mappers to return 439 * @param end the upper bound of the range of user id mappers to return (not inclusive) 440 * @param orderByComparator the comparator to order the results by 441 * @return the ordered range of user id mappers 442 * @throws SystemException if a system exception occurred 443 */ 444 public static java.util.List<com.liferay.portal.model.UserIdMapper> findAll( 445 int start, int end, 446 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 447 throws com.liferay.portal.kernel.exception.SystemException { 448 return getPersistence().findAll(start, end, orderByComparator); 449 } 450 451 /** 452 * Removes all the user id mappers where userId = ? from the database. 453 * 454 * @param userId the user id to search with 455 * @throws SystemException if a system exception occurred 456 */ 457 public static void removeByUserId(long userId) 458 throws com.liferay.portal.kernel.exception.SystemException { 459 getPersistence().removeByUserId(userId); 460 } 461 462 /** 463 * Removes the user id mapper where userId = ? and type = ? from the database. 464 * 465 * @param userId the user id to search with 466 * @param type the type to search with 467 * @throws SystemException if a system exception occurred 468 */ 469 public static void removeByU_T(long userId, java.lang.String type) 470 throws com.liferay.portal.NoSuchUserIdMapperException, 471 com.liferay.portal.kernel.exception.SystemException { 472 getPersistence().removeByU_T(userId, type); 473 } 474 475 /** 476 * Removes the user id mapper where type = ? and externalUserId = ? from the database. 477 * 478 * @param type the type to search with 479 * @param externalUserId the external user id to search with 480 * @throws SystemException if a system exception occurred 481 */ 482 public static void removeByT_E(java.lang.String type, 483 java.lang.String externalUserId) 484 throws com.liferay.portal.NoSuchUserIdMapperException, 485 com.liferay.portal.kernel.exception.SystemException { 486 getPersistence().removeByT_E(type, externalUserId); 487 } 488 489 /** 490 * Removes all the user id mappers from the database. 491 * 492 * @throws SystemException if a system exception occurred 493 */ 494 public static void removeAll() 495 throws com.liferay.portal.kernel.exception.SystemException { 496 getPersistence().removeAll(); 497 } 498 499 /** 500 * Counts all the user id mappers where userId = ?. 501 * 502 * @param userId the user id to search with 503 * @return the number of matching user id mappers 504 * @throws SystemException if a system exception occurred 505 */ 506 public static int countByUserId(long userId) 507 throws com.liferay.portal.kernel.exception.SystemException { 508 return getPersistence().countByUserId(userId); 509 } 510 511 /** 512 * Counts all the user id mappers where userId = ? and type = ?. 513 * 514 * @param userId the user id to search with 515 * @param type the type to search with 516 * @return the number of matching user id mappers 517 * @throws SystemException if a system exception occurred 518 */ 519 public static int countByU_T(long userId, java.lang.String type) 520 throws com.liferay.portal.kernel.exception.SystemException { 521 return getPersistence().countByU_T(userId, type); 522 } 523 524 /** 525 * Counts all the user id mappers where type = ? and externalUserId = ?. 526 * 527 * @param type the type to search with 528 * @param externalUserId the external user id to search with 529 * @return the number of matching user id mappers 530 * @throws SystemException if a system exception occurred 531 */ 532 public static int countByT_E(java.lang.String type, 533 java.lang.String externalUserId) 534 throws com.liferay.portal.kernel.exception.SystemException { 535 return getPersistence().countByT_E(type, externalUserId); 536 } 537 538 /** 539 * Counts all the user id mappers. 540 * 541 * @return the number of user id mappers 542 * @throws SystemException if a system exception occurred 543 */ 544 public static int countAll() 545 throws com.liferay.portal.kernel.exception.SystemException { 546 return getPersistence().countAll(); 547 } 548 549 public static UserIdMapperPersistence getPersistence() { 550 if (_persistence == null) { 551 _persistence = (UserIdMapperPersistence)PortalBeanLocatorUtil.locate(UserIdMapperPersistence.class.getName()); 552 } 553 554 return _persistence; 555 } 556 557 public void setPersistence(UserIdMapperPersistence persistence) { 558 _persistence = persistence; 559 } 560 561 private static UserIdMapperPersistence _persistence; 562 }