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