001 /** 002 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.service.persistence; 016 017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 019 import com.liferay.portal.kernel.exception.SystemException; 020 import com.liferay.portal.kernel.util.OrderByComparator; 021 import com.liferay.portal.kernel.util.ReferenceRegistry; 022 import com.liferay.portal.model.Team; 023 import com.liferay.portal.service.ServiceContext; 024 025 import java.util.List; 026 027 /** 028 * 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. 029 * 030 * <p> 031 * Caching information and settings can be found in <code>portal.properties</code> 032 * </p> 033 * 034 * @author Brian Wing Shun Chan 035 * @see TeamPersistence 036 * @see TeamPersistenceImpl 037 * @generated 038 */ 039 public class TeamUtil { 040 /* 041 * NOTE FOR DEVELOPERS: 042 * 043 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 044 */ 045 046 /** 047 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 048 */ 049 public static void clearCache() { 050 getPersistence().clearCache(); 051 } 052 053 /** 054 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 055 */ 056 public static void clearCache(Team team) { 057 getPersistence().clearCache(team); 058 } 059 060 /** 061 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 062 */ 063 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 064 throws SystemException { 065 return getPersistence().countWithDynamicQuery(dynamicQuery); 066 } 067 068 /** 069 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 070 */ 071 public static List<Team> findWithDynamicQuery(DynamicQuery dynamicQuery) 072 throws SystemException { 073 return getPersistence().findWithDynamicQuery(dynamicQuery); 074 } 075 076 /** 077 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 078 */ 079 public static List<Team> findWithDynamicQuery(DynamicQuery dynamicQuery, 080 int start, int end) throws SystemException { 081 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 082 } 083 084 /** 085 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 086 */ 087 public static List<Team> findWithDynamicQuery(DynamicQuery dynamicQuery, 088 int start, int end, OrderByComparator orderByComparator) 089 throws SystemException { 090 return getPersistence() 091 .findWithDynamicQuery(dynamicQuery, start, end, 092 orderByComparator); 093 } 094 095 /** 096 * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel) 097 */ 098 public static Team remove(Team team) throws SystemException { 099 return getPersistence().remove(team); 100 } 101 102 /** 103 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 104 */ 105 public static Team update(Team team, boolean merge) 106 throws SystemException { 107 return getPersistence().update(team, merge); 108 } 109 110 /** 111 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 112 */ 113 public static Team update(Team team, boolean merge, 114 ServiceContext serviceContext) throws SystemException { 115 return getPersistence().update(team, merge, serviceContext); 116 } 117 118 /** 119 * Caches the team in the entity cache if it is enabled. 120 * 121 * @param team the team 122 */ 123 public static void cacheResult(com.liferay.portal.model.Team team) { 124 getPersistence().cacheResult(team); 125 } 126 127 /** 128 * Caches the teams in the entity cache if it is enabled. 129 * 130 * @param teams the teams 131 */ 132 public static void cacheResult( 133 java.util.List<com.liferay.portal.model.Team> teams) { 134 getPersistence().cacheResult(teams); 135 } 136 137 /** 138 * Creates a new team with the primary key. Does not add the team to the database. 139 * 140 * @param teamId the primary key for the new team 141 * @return the new team 142 */ 143 public static com.liferay.portal.model.Team create(long teamId) { 144 return getPersistence().create(teamId); 145 } 146 147 /** 148 * Removes the team with the primary key from the database. Also notifies the appropriate model listeners. 149 * 150 * @param teamId the primary key of the team 151 * @return the team that was removed 152 * @throws com.liferay.portal.NoSuchTeamException if a team with the primary key could not be found 153 * @throws SystemException if a system exception occurred 154 */ 155 public static com.liferay.portal.model.Team remove(long teamId) 156 throws com.liferay.portal.NoSuchTeamException, 157 com.liferay.portal.kernel.exception.SystemException { 158 return getPersistence().remove(teamId); 159 } 160 161 public static com.liferay.portal.model.Team updateImpl( 162 com.liferay.portal.model.Team team, boolean merge) 163 throws com.liferay.portal.kernel.exception.SystemException { 164 return getPersistence().updateImpl(team, merge); 165 } 166 167 /** 168 * Returns the team with the primary key or throws a {@link com.liferay.portal.NoSuchTeamException} if it could not be found. 169 * 170 * @param teamId the primary key of the team 171 * @return the team 172 * @throws com.liferay.portal.NoSuchTeamException if a team with the primary key could not be found 173 * @throws SystemException if a system exception occurred 174 */ 175 public static com.liferay.portal.model.Team findByPrimaryKey(long teamId) 176 throws com.liferay.portal.NoSuchTeamException, 177 com.liferay.portal.kernel.exception.SystemException { 178 return getPersistence().findByPrimaryKey(teamId); 179 } 180 181 /** 182 * Returns the team with the primary key or returns <code>null</code> if it could not be found. 183 * 184 * @param teamId the primary key of the team 185 * @return the team, or <code>null</code> if a team with the primary key could not be found 186 * @throws SystemException if a system exception occurred 187 */ 188 public static com.liferay.portal.model.Team fetchByPrimaryKey(long teamId) 189 throws com.liferay.portal.kernel.exception.SystemException { 190 return getPersistence().fetchByPrimaryKey(teamId); 191 } 192 193 /** 194 * Returns all the teams where groupId = ?. 195 * 196 * @param groupId the group ID 197 * @return the matching teams 198 * @throws SystemException if a system exception occurred 199 */ 200 public static java.util.List<com.liferay.portal.model.Team> findByGroupId( 201 long groupId) 202 throws com.liferay.portal.kernel.exception.SystemException { 203 return getPersistence().findByGroupId(groupId); 204 } 205 206 /** 207 * Returns a range of all the teams where groupId = ?. 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 groupId the group ID 214 * @param start the lower bound of the range of teams 215 * @param end the upper bound of the range of teams (not inclusive) 216 * @return the range of matching teams 217 * @throws SystemException if a system exception occurred 218 */ 219 public static java.util.List<com.liferay.portal.model.Team> findByGroupId( 220 long groupId, int start, int end) 221 throws com.liferay.portal.kernel.exception.SystemException { 222 return getPersistence().findByGroupId(groupId, start, end); 223 } 224 225 /** 226 * Returns an ordered range of all the teams where groupId = ?. 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 groupId the group ID 233 * @param start the lower bound of the range of teams 234 * @param end the upper bound of the range of teams (not inclusive) 235 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 236 * @return the ordered range of matching teams 237 * @throws SystemException if a system exception occurred 238 */ 239 public static java.util.List<com.liferay.portal.model.Team> findByGroupId( 240 long groupId, int start, int end, 241 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 242 throws com.liferay.portal.kernel.exception.SystemException { 243 return getPersistence() 244 .findByGroupId(groupId, start, end, orderByComparator); 245 } 246 247 /** 248 * Returns the first team in the ordered set where groupId = ?. 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 groupId the group ID 255 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 256 * @return the first matching team 257 * @throws com.liferay.portal.NoSuchTeamException if a matching team could not be found 258 * @throws SystemException if a system exception occurred 259 */ 260 public static com.liferay.portal.model.Team findByGroupId_First( 261 long groupId, 262 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 263 throws com.liferay.portal.NoSuchTeamException, 264 com.liferay.portal.kernel.exception.SystemException { 265 return getPersistence().findByGroupId_First(groupId, orderByComparator); 266 } 267 268 /** 269 * Returns the last team in the ordered set where groupId = ?. 270 * 271 * <p> 272 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 273 * </p> 274 * 275 * @param groupId the group ID 276 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 277 * @return the last matching team 278 * @throws com.liferay.portal.NoSuchTeamException if a matching team could not be found 279 * @throws SystemException if a system exception occurred 280 */ 281 public static com.liferay.portal.model.Team findByGroupId_Last( 282 long groupId, 283 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 284 throws com.liferay.portal.NoSuchTeamException, 285 com.liferay.portal.kernel.exception.SystemException { 286 return getPersistence().findByGroupId_Last(groupId, orderByComparator); 287 } 288 289 /** 290 * Returns the teams before and after the current team in the ordered set where groupId = ?. 291 * 292 * <p> 293 * 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. 294 * </p> 295 * 296 * @param teamId the primary key of the current team 297 * @param groupId the group ID 298 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 299 * @return the previous, current, and next team 300 * @throws com.liferay.portal.NoSuchTeamException if a team with the primary key could not be found 301 * @throws SystemException if a system exception occurred 302 */ 303 public static com.liferay.portal.model.Team[] findByGroupId_PrevAndNext( 304 long teamId, long groupId, 305 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 306 throws com.liferay.portal.NoSuchTeamException, 307 com.liferay.portal.kernel.exception.SystemException { 308 return getPersistence() 309 .findByGroupId_PrevAndNext(teamId, groupId, orderByComparator); 310 } 311 312 /** 313 * Returns all the teams that the user has permission to view where groupId = ?. 314 * 315 * @param groupId the group ID 316 * @return the matching teams that the user has permission to view 317 * @throws SystemException if a system exception occurred 318 */ 319 public static java.util.List<com.liferay.portal.model.Team> filterFindByGroupId( 320 long groupId) 321 throws com.liferay.portal.kernel.exception.SystemException { 322 return getPersistence().filterFindByGroupId(groupId); 323 } 324 325 /** 326 * Returns a range of all the teams that the user has permission to view where groupId = ?. 327 * 328 * <p> 329 * 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. 330 * </p> 331 * 332 * @param groupId the group ID 333 * @param start the lower bound of the range of teams 334 * @param end the upper bound of the range of teams (not inclusive) 335 * @return the range of matching teams that the user has permission to view 336 * @throws SystemException if a system exception occurred 337 */ 338 public static java.util.List<com.liferay.portal.model.Team> filterFindByGroupId( 339 long groupId, int start, int end) 340 throws com.liferay.portal.kernel.exception.SystemException { 341 return getPersistence().filterFindByGroupId(groupId, start, end); 342 } 343 344 /** 345 * Returns an ordered range of all the teams that the user has permissions to view where groupId = ?. 346 * 347 * <p> 348 * 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. 349 * </p> 350 * 351 * @param groupId the group ID 352 * @param start the lower bound of the range of teams 353 * @param end the upper bound of the range of teams (not inclusive) 354 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 355 * @return the ordered range of matching teams that the user has permission to view 356 * @throws SystemException if a system exception occurred 357 */ 358 public static java.util.List<com.liferay.portal.model.Team> filterFindByGroupId( 359 long groupId, int start, int end, 360 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 361 throws com.liferay.portal.kernel.exception.SystemException { 362 return getPersistence() 363 .filterFindByGroupId(groupId, start, end, orderByComparator); 364 } 365 366 /** 367 * Returns the teams before and after the current team in the ordered set of teams that the user has permission to view where groupId = ?. 368 * 369 * @param teamId the primary key of the current team 370 * @param groupId the group ID 371 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 372 * @return the previous, current, and next team 373 * @throws com.liferay.portal.NoSuchTeamException if a team with the primary key could not be found 374 * @throws SystemException if a system exception occurred 375 */ 376 public static com.liferay.portal.model.Team[] filterFindByGroupId_PrevAndNext( 377 long teamId, long groupId, 378 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 379 throws com.liferay.portal.NoSuchTeamException, 380 com.liferay.portal.kernel.exception.SystemException { 381 return getPersistence() 382 .filterFindByGroupId_PrevAndNext(teamId, groupId, 383 orderByComparator); 384 } 385 386 /** 387 * Returns the team where groupId = ? and name = ? or throws a {@link com.liferay.portal.NoSuchTeamException} if it could not be found. 388 * 389 * @param groupId the group ID 390 * @param name the name 391 * @return the matching team 392 * @throws com.liferay.portal.NoSuchTeamException if a matching team could not be found 393 * @throws SystemException if a system exception occurred 394 */ 395 public static com.liferay.portal.model.Team findByG_N(long groupId, 396 java.lang.String name) 397 throws com.liferay.portal.NoSuchTeamException, 398 com.liferay.portal.kernel.exception.SystemException { 399 return getPersistence().findByG_N(groupId, name); 400 } 401 402 /** 403 * Returns the team where groupId = ? and name = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 404 * 405 * @param groupId the group ID 406 * @param name the name 407 * @return the matching team, or <code>null</code> if a matching team could not be found 408 * @throws SystemException if a system exception occurred 409 */ 410 public static com.liferay.portal.model.Team fetchByG_N(long groupId, 411 java.lang.String name) 412 throws com.liferay.portal.kernel.exception.SystemException { 413 return getPersistence().fetchByG_N(groupId, name); 414 } 415 416 /** 417 * Returns the team where groupId = ? and name = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 418 * 419 * @param groupId the group ID 420 * @param name the name 421 * @param retrieveFromCache whether to use the finder cache 422 * @return the matching team, or <code>null</code> if a matching team could not be found 423 * @throws SystemException if a system exception occurred 424 */ 425 public static com.liferay.portal.model.Team fetchByG_N(long groupId, 426 java.lang.String name, boolean retrieveFromCache) 427 throws com.liferay.portal.kernel.exception.SystemException { 428 return getPersistence().fetchByG_N(groupId, name, retrieveFromCache); 429 } 430 431 /** 432 * Returns all the teams. 433 * 434 * @return the teams 435 * @throws SystemException if a system exception occurred 436 */ 437 public static java.util.List<com.liferay.portal.model.Team> findAll() 438 throws com.liferay.portal.kernel.exception.SystemException { 439 return getPersistence().findAll(); 440 } 441 442 /** 443 * Returns a range of all the teams. 444 * 445 * <p> 446 * 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. 447 * </p> 448 * 449 * @param start the lower bound of the range of teams 450 * @param end the upper bound of the range of teams (not inclusive) 451 * @return the range of teams 452 * @throws SystemException if a system exception occurred 453 */ 454 public static java.util.List<com.liferay.portal.model.Team> findAll( 455 int start, int end) 456 throws com.liferay.portal.kernel.exception.SystemException { 457 return getPersistence().findAll(start, end); 458 } 459 460 /** 461 * Returns an ordered range of all the teams. 462 * 463 * <p> 464 * 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. 465 * </p> 466 * 467 * @param start the lower bound of the range of teams 468 * @param end the upper bound of the range of teams (not inclusive) 469 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 470 * @return the ordered range of teams 471 * @throws SystemException if a system exception occurred 472 */ 473 public static java.util.List<com.liferay.portal.model.Team> findAll( 474 int start, int end, 475 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 476 throws com.liferay.portal.kernel.exception.SystemException { 477 return getPersistence().findAll(start, end, orderByComparator); 478 } 479 480 /** 481 * Removes all the teams where groupId = ? from the database. 482 * 483 * @param groupId the group ID 484 * @throws SystemException if a system exception occurred 485 */ 486 public static void removeByGroupId(long groupId) 487 throws com.liferay.portal.kernel.exception.SystemException { 488 getPersistence().removeByGroupId(groupId); 489 } 490 491 /** 492 * Removes the team where groupId = ? and name = ? from the database. 493 * 494 * @param groupId the group ID 495 * @param name the name 496 * @throws SystemException if a system exception occurred 497 */ 498 public static void removeByG_N(long groupId, java.lang.String name) 499 throws com.liferay.portal.NoSuchTeamException, 500 com.liferay.portal.kernel.exception.SystemException { 501 getPersistence().removeByG_N(groupId, name); 502 } 503 504 /** 505 * Removes all the teams from the database. 506 * 507 * @throws SystemException if a system exception occurred 508 */ 509 public static void removeAll() 510 throws com.liferay.portal.kernel.exception.SystemException { 511 getPersistence().removeAll(); 512 } 513 514 /** 515 * Returns the number of teams where groupId = ?. 516 * 517 * @param groupId the group ID 518 * @return the number of matching teams 519 * @throws SystemException if a system exception occurred 520 */ 521 public static int countByGroupId(long groupId) 522 throws com.liferay.portal.kernel.exception.SystemException { 523 return getPersistence().countByGroupId(groupId); 524 } 525 526 /** 527 * Returns the number of teams that the user has permission to view where groupId = ?. 528 * 529 * @param groupId the group ID 530 * @return the number of matching teams that the user has permission to view 531 * @throws SystemException if a system exception occurred 532 */ 533 public static int filterCountByGroupId(long groupId) 534 throws com.liferay.portal.kernel.exception.SystemException { 535 return getPersistence().filterCountByGroupId(groupId); 536 } 537 538 /** 539 * Returns the number of teams where groupId = ? and name = ?. 540 * 541 * @param groupId the group ID 542 * @param name the name 543 * @return the number of matching teams 544 * @throws SystemException if a system exception occurred 545 */ 546 public static int countByG_N(long groupId, java.lang.String name) 547 throws com.liferay.portal.kernel.exception.SystemException { 548 return getPersistence().countByG_N(groupId, name); 549 } 550 551 /** 552 * Returns the number of teams. 553 * 554 * @return the number of teams 555 * @throws SystemException if a system exception occurred 556 */ 557 public static int countAll() 558 throws com.liferay.portal.kernel.exception.SystemException { 559 return getPersistence().countAll(); 560 } 561 562 /** 563 * Returns all the users associated with the team. 564 * 565 * @param pk the primary key of the team 566 * @return the users associated with the team 567 * @throws SystemException if a system exception occurred 568 */ 569 public static java.util.List<com.liferay.portal.model.User> getUsers( 570 long pk) throws com.liferay.portal.kernel.exception.SystemException { 571 return getPersistence().getUsers(pk); 572 } 573 574 /** 575 * Returns a range of all the users associated with the team. 576 * 577 * <p> 578 * 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. 579 * </p> 580 * 581 * @param pk the primary key of the team 582 * @param start the lower bound of the range of teams 583 * @param end the upper bound of the range of teams (not inclusive) 584 * @return the range of users associated with the team 585 * @throws SystemException if a system exception occurred 586 */ 587 public static java.util.List<com.liferay.portal.model.User> getUsers( 588 long pk, int start, int end) 589 throws com.liferay.portal.kernel.exception.SystemException { 590 return getPersistence().getUsers(pk, start, end); 591 } 592 593 /** 594 * Returns an ordered range of all the users associated with the team. 595 * 596 * <p> 597 * 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. 598 * </p> 599 * 600 * @param pk the primary key of the team 601 * @param start the lower bound of the range of teams 602 * @param end the upper bound of the range of teams (not inclusive) 603 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 604 * @return the ordered range of users associated with the team 605 * @throws SystemException if a system exception occurred 606 */ 607 public static java.util.List<com.liferay.portal.model.User> getUsers( 608 long pk, int start, int end, 609 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 610 throws com.liferay.portal.kernel.exception.SystemException { 611 return getPersistence().getUsers(pk, start, end, orderByComparator); 612 } 613 614 /** 615 * Returns the number of users associated with the team. 616 * 617 * @param pk the primary key of the team 618 * @return the number of users associated with the team 619 * @throws SystemException if a system exception occurred 620 */ 621 public static int getUsersSize(long pk) 622 throws com.liferay.portal.kernel.exception.SystemException { 623 return getPersistence().getUsersSize(pk); 624 } 625 626 /** 627 * Returns <code>true</code> if the user is associated with the team. 628 * 629 * @param pk the primary key of the team 630 * @param userPK the primary key of the user 631 * @return <code>true</code> if the user is associated with the team; <code>false</code> otherwise 632 * @throws SystemException if a system exception occurred 633 */ 634 public static boolean containsUser(long pk, long userPK) 635 throws com.liferay.portal.kernel.exception.SystemException { 636 return getPersistence().containsUser(pk, userPK); 637 } 638 639 /** 640 * Returns <code>true</code> if the team has any users associated with it. 641 * 642 * @param pk the primary key of the team to check for associations with users 643 * @return <code>true</code> if the team has any users associated with it; <code>false</code> otherwise 644 * @throws SystemException if a system exception occurred 645 */ 646 public static boolean containsUsers(long pk) 647 throws com.liferay.portal.kernel.exception.SystemException { 648 return getPersistence().containsUsers(pk); 649 } 650 651 /** 652 * Adds an association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 653 * 654 * @param pk the primary key of the team 655 * @param userPK the primary key of the user 656 * @throws SystemException if a system exception occurred 657 */ 658 public static void addUser(long pk, long userPK) 659 throws com.liferay.portal.kernel.exception.SystemException { 660 getPersistence().addUser(pk, userPK); 661 } 662 663 /** 664 * Adds an association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 665 * 666 * @param pk the primary key of the team 667 * @param user the user 668 * @throws SystemException if a system exception occurred 669 */ 670 public static void addUser(long pk, com.liferay.portal.model.User user) 671 throws com.liferay.portal.kernel.exception.SystemException { 672 getPersistence().addUser(pk, user); 673 } 674 675 /** 676 * Adds an association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 677 * 678 * @param pk the primary key of the team 679 * @param userPKs the primary keys of the users 680 * @throws SystemException if a system exception occurred 681 */ 682 public static void addUsers(long pk, long[] userPKs) 683 throws com.liferay.portal.kernel.exception.SystemException { 684 getPersistence().addUsers(pk, userPKs); 685 } 686 687 /** 688 * Adds an association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 689 * 690 * @param pk the primary key of the team 691 * @param users the users 692 * @throws SystemException if a system exception occurred 693 */ 694 public static void addUsers(long pk, 695 java.util.List<com.liferay.portal.model.User> users) 696 throws com.liferay.portal.kernel.exception.SystemException { 697 getPersistence().addUsers(pk, users); 698 } 699 700 /** 701 * Clears all associations between the team and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 702 * 703 * @param pk the primary key of the team to clear the associated users from 704 * @throws SystemException if a system exception occurred 705 */ 706 public static void clearUsers(long pk) 707 throws com.liferay.portal.kernel.exception.SystemException { 708 getPersistence().clearUsers(pk); 709 } 710 711 /** 712 * Removes the association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 713 * 714 * @param pk the primary key of the team 715 * @param userPK the primary key of the user 716 * @throws SystemException if a system exception occurred 717 */ 718 public static void removeUser(long pk, long userPK) 719 throws com.liferay.portal.kernel.exception.SystemException { 720 getPersistence().removeUser(pk, userPK); 721 } 722 723 /** 724 * Removes the association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 725 * 726 * @param pk the primary key of the team 727 * @param user the user 728 * @throws SystemException if a system exception occurred 729 */ 730 public static void removeUser(long pk, com.liferay.portal.model.User user) 731 throws com.liferay.portal.kernel.exception.SystemException { 732 getPersistence().removeUser(pk, user); 733 } 734 735 /** 736 * Removes the association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 737 * 738 * @param pk the primary key of the team 739 * @param userPKs the primary keys of the users 740 * @throws SystemException if a system exception occurred 741 */ 742 public static void removeUsers(long pk, long[] userPKs) 743 throws com.liferay.portal.kernel.exception.SystemException { 744 getPersistence().removeUsers(pk, userPKs); 745 } 746 747 /** 748 * Removes the association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 749 * 750 * @param pk the primary key of the team 751 * @param users the users 752 * @throws SystemException if a system exception occurred 753 */ 754 public static void removeUsers(long pk, 755 java.util.List<com.liferay.portal.model.User> users) 756 throws com.liferay.portal.kernel.exception.SystemException { 757 getPersistence().removeUsers(pk, users); 758 } 759 760 /** 761 * 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. 762 * 763 * @param pk the primary key of the team 764 * @param userPKs the primary keys of the users to be associated with the team 765 * @throws SystemException if a system exception occurred 766 */ 767 public static void setUsers(long pk, long[] userPKs) 768 throws com.liferay.portal.kernel.exception.SystemException { 769 getPersistence().setUsers(pk, userPKs); 770 } 771 772 /** 773 * 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. 774 * 775 * @param pk the primary key of the team 776 * @param users the users to be associated with the team 777 * @throws SystemException if a system exception occurred 778 */ 779 public static void setUsers(long pk, 780 java.util.List<com.liferay.portal.model.User> users) 781 throws com.liferay.portal.kernel.exception.SystemException { 782 getPersistence().setUsers(pk, users); 783 } 784 785 /** 786 * Returns all the user groups associated with the team. 787 * 788 * @param pk the primary key of the team 789 * @return the user groups associated with the team 790 * @throws SystemException if a system exception occurred 791 */ 792 public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups( 793 long pk) throws com.liferay.portal.kernel.exception.SystemException { 794 return getPersistence().getUserGroups(pk); 795 } 796 797 /** 798 * Returns a range of all the user groups associated with the team. 799 * 800 * <p> 801 * 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. 802 * </p> 803 * 804 * @param pk the primary key of the team 805 * @param start the lower bound of the range of teams 806 * @param end the upper bound of the range of teams (not inclusive) 807 * @return the range of user groups associated with the team 808 * @throws SystemException if a system exception occurred 809 */ 810 public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups( 811 long pk, int start, int end) 812 throws com.liferay.portal.kernel.exception.SystemException { 813 return getPersistence().getUserGroups(pk, start, end); 814 } 815 816 /** 817 * Returns an ordered range of all the user groups associated with the team. 818 * 819 * <p> 820 * 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. 821 * </p> 822 * 823 * @param pk the primary key of the team 824 * @param start the lower bound of the range of teams 825 * @param end the upper bound of the range of teams (not inclusive) 826 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 827 * @return the ordered range of user groups associated with the team 828 * @throws SystemException if a system exception occurred 829 */ 830 public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups( 831 long pk, int start, int end, 832 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 833 throws com.liferay.portal.kernel.exception.SystemException { 834 return getPersistence().getUserGroups(pk, start, end, orderByComparator); 835 } 836 837 /** 838 * Returns the number of user groups associated with the team. 839 * 840 * @param pk the primary key of the team 841 * @return the number of user groups associated with the team 842 * @throws SystemException if a system exception occurred 843 */ 844 public static int getUserGroupsSize(long pk) 845 throws com.liferay.portal.kernel.exception.SystemException { 846 return getPersistence().getUserGroupsSize(pk); 847 } 848 849 /** 850 * Returns <code>true</code> if the user group is associated with the team. 851 * 852 * @param pk the primary key of the team 853 * @param userGroupPK the primary key of the user group 854 * @return <code>true</code> if the user group is associated with the team; <code>false</code> otherwise 855 * @throws SystemException if a system exception occurred 856 */ 857 public static boolean containsUserGroup(long pk, long userGroupPK) 858 throws com.liferay.portal.kernel.exception.SystemException { 859 return getPersistence().containsUserGroup(pk, userGroupPK); 860 } 861 862 /** 863 * Returns <code>true</code> if the team has any user groups associated with it. 864 * 865 * @param pk the primary key of the team to check for associations with user groups 866 * @return <code>true</code> if the team has any user groups associated with it; <code>false</code> otherwise 867 * @throws SystemException if a system exception occurred 868 */ 869 public static boolean containsUserGroups(long pk) 870 throws com.liferay.portal.kernel.exception.SystemException { 871 return getPersistence().containsUserGroups(pk); 872 } 873 874 /** 875 * Adds an association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 876 * 877 * @param pk the primary key of the team 878 * @param userGroupPK the primary key of the user group 879 * @throws SystemException if a system exception occurred 880 */ 881 public static void addUserGroup(long pk, long userGroupPK) 882 throws com.liferay.portal.kernel.exception.SystemException { 883 getPersistence().addUserGroup(pk, userGroupPK); 884 } 885 886 /** 887 * Adds an association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 888 * 889 * @param pk the primary key of the team 890 * @param userGroup the user group 891 * @throws SystemException if a system exception occurred 892 */ 893 public static void addUserGroup(long pk, 894 com.liferay.portal.model.UserGroup userGroup) 895 throws com.liferay.portal.kernel.exception.SystemException { 896 getPersistence().addUserGroup(pk, userGroup); 897 } 898 899 /** 900 * Adds an association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 901 * 902 * @param pk the primary key of the team 903 * @param userGroupPKs the primary keys of the user groups 904 * @throws SystemException if a system exception occurred 905 */ 906 public static void addUserGroups(long pk, long[] userGroupPKs) 907 throws com.liferay.portal.kernel.exception.SystemException { 908 getPersistence().addUserGroups(pk, userGroupPKs); 909 } 910 911 /** 912 * Adds an association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 913 * 914 * @param pk the primary key of the team 915 * @param userGroups the user groups 916 * @throws SystemException if a system exception occurred 917 */ 918 public static void addUserGroups(long pk, 919 java.util.List<com.liferay.portal.model.UserGroup> userGroups) 920 throws com.liferay.portal.kernel.exception.SystemException { 921 getPersistence().addUserGroups(pk, userGroups); 922 } 923 924 /** 925 * Clears all associations between the team and its user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 926 * 927 * @param pk the primary key of the team to clear the associated user groups from 928 * @throws SystemException if a system exception occurred 929 */ 930 public static void clearUserGroups(long pk) 931 throws com.liferay.portal.kernel.exception.SystemException { 932 getPersistence().clearUserGroups(pk); 933 } 934 935 /** 936 * Removes the association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 937 * 938 * @param pk the primary key of the team 939 * @param userGroupPK the primary key of the user group 940 * @throws SystemException if a system exception occurred 941 */ 942 public static void removeUserGroup(long pk, long userGroupPK) 943 throws com.liferay.portal.kernel.exception.SystemException { 944 getPersistence().removeUserGroup(pk, userGroupPK); 945 } 946 947 /** 948 * Removes the association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 949 * 950 * @param pk the primary key of the team 951 * @param userGroup the user group 952 * @throws SystemException if a system exception occurred 953 */ 954 public static void removeUserGroup(long pk, 955 com.liferay.portal.model.UserGroup userGroup) 956 throws com.liferay.portal.kernel.exception.SystemException { 957 getPersistence().removeUserGroup(pk, userGroup); 958 } 959 960 /** 961 * Removes the association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 962 * 963 * @param pk the primary key of the team 964 * @param userGroupPKs the primary keys of the user groups 965 * @throws SystemException if a system exception occurred 966 */ 967 public static void removeUserGroups(long pk, long[] userGroupPKs) 968 throws com.liferay.portal.kernel.exception.SystemException { 969 getPersistence().removeUserGroups(pk, userGroupPKs); 970 } 971 972 /** 973 * Removes the association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 974 * 975 * @param pk the primary key of the team 976 * @param userGroups the user groups 977 * @throws SystemException if a system exception occurred 978 */ 979 public static void removeUserGroups(long pk, 980 java.util.List<com.liferay.portal.model.UserGroup> userGroups) 981 throws com.liferay.portal.kernel.exception.SystemException { 982 getPersistence().removeUserGroups(pk, userGroups); 983 } 984 985 /** 986 * Sets the user groups associated with the team, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 987 * 988 * @param pk the primary key of the team 989 * @param userGroupPKs the primary keys of the user groups to be associated with the team 990 * @throws SystemException if a system exception occurred 991 */ 992 public static void setUserGroups(long pk, long[] userGroupPKs) 993 throws com.liferay.portal.kernel.exception.SystemException { 994 getPersistence().setUserGroups(pk, userGroupPKs); 995 } 996 997 /** 998 * Sets the user groups associated with the team, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 999 * 1000 * @param pk the primary key of the team 1001 * @param userGroups the user groups to be associated with the team 1002 * @throws SystemException if a system exception occurred 1003 */ 1004 public static void setUserGroups(long pk, 1005 java.util.List<com.liferay.portal.model.UserGroup> userGroups) 1006 throws com.liferay.portal.kernel.exception.SystemException { 1007 getPersistence().setUserGroups(pk, userGroups); 1008 } 1009 1010 public static TeamPersistence getPersistence() { 1011 if (_persistence == null) { 1012 _persistence = (TeamPersistence)PortalBeanLocatorUtil.locate(TeamPersistence.class.getName()); 1013 1014 ReferenceRegistry.registerReference(TeamUtil.class, "_persistence"); 1015 } 1016 1017 return _persistence; 1018 } 1019 1020 public void setPersistence(TeamPersistence persistence) { 1021 _persistence = persistence; 1022 1023 ReferenceRegistry.registerReference(TeamUtil.class, "_persistence"); 1024 } 1025 1026 private static TeamPersistence _persistence; 1027 }