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