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