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