001 /** 002 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved. 003 * 004 * The contents of this file are subject to the terms of the Liferay Enterprise 005 * Subscription License ("License"). You may not use this file except in 006 * compliance with the License. You can obtain a copy of the License by 007 * contacting Liferay, Inc. See the License for the specific language governing 008 * permissions and limitations under the License, including but not limited to 009 * distribution rights of the Software. 010 * 011 * 012 * 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 to cache 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 to cache 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 to remove 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 * Finds 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 to find 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 * Finds 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 to find 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 * Finds all the teams where groupId = ?. 101 * 102 * @param groupId the group ID to search with 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 * Finds 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 to search with 118 * @param start the lower bound of the range of teams to return 119 * @param end the upper bound of the range of teams to return (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 * Finds 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 to search with 135 * @param start the lower bound of the range of teams to return 136 * @param end the upper bound of the range of teams to return (not inclusive) 137 * @param orderByComparator the comparator to order the results by 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 * Finds 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 to search with 154 * @param orderByComparator the comparator to order the set by 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 * Finds 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 to search with 172 * @param orderByComparator the comparator to order the set by 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 * Finds 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 to search with 191 * @param orderByComparator the comparator to order the set by 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 * Filters by the user's permissions and finds all the teams where groupId = ?. 204 * 205 * @param groupId the group ID to search with 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 * Filters by the user's permissions and finds a range of all the teams 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 to search with 221 * @param start the lower bound of the range of teams to return 222 * @param end the upper bound of the range of teams to return (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 * Filters by the user's permissions and finds an ordered range of all the teams 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 to search with 238 * @param start the lower bound of the range of teams to return 239 * @param end the upper bound of the range of teams to return (not inclusive) 240 * @param orderByComparator the comparator to order the results by 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 * Filters the teams before and after the current team in the ordered set where groupId = ?. 251 * 252 * <p> 253 * 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. 254 * </p> 255 * 256 * @param teamId the primary key of the current team 257 * @param groupId the group ID to search with 258 * @param orderByComparator the comparator to order the set by 259 * @return the previous, current, and next team 260 * @throws com.liferay.portal.NoSuchTeamException if a team with the primary key could not be found 261 * @throws SystemException if a system exception occurred 262 */ 263 public com.liferay.portal.model.Team[] filterFindByGroupId_PrevAndNext( 264 long teamId, long groupId, 265 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 266 throws com.liferay.portal.NoSuchTeamException, 267 com.liferay.portal.kernel.exception.SystemException; 268 269 /** 270 * Finds the team where groupId = ? and name = ? or throws a {@link com.liferay.portal.NoSuchTeamException} if it could not be found. 271 * 272 * @param groupId the group ID to search with 273 * @param name the name to search with 274 * @return the matching team 275 * @throws com.liferay.portal.NoSuchTeamException if a matching team could not be found 276 * @throws SystemException if a system exception occurred 277 */ 278 public com.liferay.portal.model.Team findByG_N(long groupId, 279 java.lang.String name) 280 throws com.liferay.portal.NoSuchTeamException, 281 com.liferay.portal.kernel.exception.SystemException; 282 283 /** 284 * Finds the team where groupId = ? and name = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 285 * 286 * @param groupId the group ID to search with 287 * @param name the name to search with 288 * @return the matching team, or <code>null</code> if a matching team could not be found 289 * @throws SystemException if a system exception occurred 290 */ 291 public com.liferay.portal.model.Team fetchByG_N(long groupId, 292 java.lang.String name) 293 throws com.liferay.portal.kernel.exception.SystemException; 294 295 /** 296 * Finds the team where groupId = ? and name = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 297 * 298 * @param groupId the group ID to search with 299 * @param name the name to search with 300 * @return the matching team, or <code>null</code> if a matching team could not be found 301 * @throws SystemException if a system exception occurred 302 */ 303 public com.liferay.portal.model.Team fetchByG_N(long groupId, 304 java.lang.String name, boolean retrieveFromCache) 305 throws com.liferay.portal.kernel.exception.SystemException; 306 307 /** 308 * Finds all the teams. 309 * 310 * @return the teams 311 * @throws SystemException if a system exception occurred 312 */ 313 public java.util.List<com.liferay.portal.model.Team> findAll() 314 throws com.liferay.portal.kernel.exception.SystemException; 315 316 /** 317 * Finds a range of all the teams. 318 * 319 * <p> 320 * 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. 321 * </p> 322 * 323 * @param start the lower bound of the range of teams to return 324 * @param end the upper bound of the range of teams to return (not inclusive) 325 * @return the range of teams 326 * @throws SystemException if a system exception occurred 327 */ 328 public java.util.List<com.liferay.portal.model.Team> findAll(int start, 329 int end) throws com.liferay.portal.kernel.exception.SystemException; 330 331 /** 332 * Finds an ordered range of all the teams. 333 * 334 * <p> 335 * 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. 336 * </p> 337 * 338 * @param start the lower bound of the range of teams to return 339 * @param end the upper bound of the range of teams to return (not inclusive) 340 * @param orderByComparator the comparator to order the results by 341 * @return the ordered range of teams 342 * @throws SystemException if a system exception occurred 343 */ 344 public java.util.List<com.liferay.portal.model.Team> findAll(int start, 345 int end, 346 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 347 throws com.liferay.portal.kernel.exception.SystemException; 348 349 /** 350 * Removes all the teams where groupId = ? from the database. 351 * 352 * @param groupId the group ID to search with 353 * @throws SystemException if a system exception occurred 354 */ 355 public void removeByGroupId(long groupId) 356 throws com.liferay.portal.kernel.exception.SystemException; 357 358 /** 359 * Removes the team where groupId = ? and name = ? from the database. 360 * 361 * @param groupId the group ID to search with 362 * @param name the name to search with 363 * @throws SystemException if a system exception occurred 364 */ 365 public void removeByG_N(long groupId, java.lang.String name) 366 throws com.liferay.portal.NoSuchTeamException, 367 com.liferay.portal.kernel.exception.SystemException; 368 369 /** 370 * Removes all the teams from the database. 371 * 372 * @throws SystemException if a system exception occurred 373 */ 374 public void removeAll() 375 throws com.liferay.portal.kernel.exception.SystemException; 376 377 /** 378 * Counts all the teams where groupId = ?. 379 * 380 * @param groupId the group ID to search with 381 * @return the number of matching teams 382 * @throws SystemException if a system exception occurred 383 */ 384 public int countByGroupId(long groupId) 385 throws com.liferay.portal.kernel.exception.SystemException; 386 387 /** 388 * Filters by the user's permissions and counts all the teams where groupId = ?. 389 * 390 * @param groupId the group ID to search with 391 * @return the number of matching teams that the user has permission to view 392 * @throws SystemException if a system exception occurred 393 */ 394 public int filterCountByGroupId(long groupId) 395 throws com.liferay.portal.kernel.exception.SystemException; 396 397 /** 398 * Counts all the teams where groupId = ? and name = ?. 399 * 400 * @param groupId the group ID to search with 401 * @param name the name to search with 402 * @return the number of matching teams 403 * @throws SystemException if a system exception occurred 404 */ 405 public int countByG_N(long groupId, java.lang.String name) 406 throws com.liferay.portal.kernel.exception.SystemException; 407 408 /** 409 * Counts all the teams. 410 * 411 * @return the number of teams 412 * @throws SystemException if a system exception occurred 413 */ 414 public int countAll() 415 throws com.liferay.portal.kernel.exception.SystemException; 416 417 /** 418 * Gets all the users associated with the team. 419 * 420 * @param pk the primary key of the team to get the associated users for 421 * @return the users associated with the team 422 * @throws SystemException if a system exception occurred 423 */ 424 public java.util.List<com.liferay.portal.model.User> getUsers(long pk) 425 throws com.liferay.portal.kernel.exception.SystemException; 426 427 /** 428 * Gets a range of all the users associated with the team. 429 * 430 * <p> 431 * 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. 432 * </p> 433 * 434 * @param pk the primary key of the team to get the associated users for 435 * @param start the lower bound of the range of teams to return 436 * @param end the upper bound of the range of teams to return (not inclusive) 437 * @return the range of users associated with the team 438 * @throws SystemException if a system exception occurred 439 */ 440 public java.util.List<com.liferay.portal.model.User> getUsers(long pk, 441 int start, int end) 442 throws com.liferay.portal.kernel.exception.SystemException; 443 444 /** 445 * Gets an ordered range of all the users associated with the team. 446 * 447 * <p> 448 * 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. 449 * </p> 450 * 451 * @param pk the primary key of the team to get the associated users for 452 * @param start the lower bound of the range of teams to return 453 * @param end the upper bound of the range of teams to return (not inclusive) 454 * @param orderByComparator the comparator to order the results by 455 * @return the ordered range of users associated with the team 456 * @throws SystemException if a system exception occurred 457 */ 458 public java.util.List<com.liferay.portal.model.User> getUsers(long pk, 459 int start, int end, 460 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 461 throws com.liferay.portal.kernel.exception.SystemException; 462 463 /** 464 * Gets the number of users associated with the team. 465 * 466 * @param pk the primary key of the team to get the number of associated users for 467 * @return the number of users associated with the team 468 * @throws SystemException if a system exception occurred 469 */ 470 public int getUsersSize(long pk) 471 throws com.liferay.portal.kernel.exception.SystemException; 472 473 /** 474 * Determines if the user is associated with the team. 475 * 476 * @param pk the primary key of the team 477 * @param userPK the primary key of the user 478 * @return <code>true</code> if the user is associated with the team; <code>false</code> otherwise 479 * @throws SystemException if a system exception occurred 480 */ 481 public boolean containsUser(long pk, long userPK) 482 throws com.liferay.portal.kernel.exception.SystemException; 483 484 /** 485 * Determines if the team has any users associated with it. 486 * 487 * @param pk the primary key of the team to check for associations with users 488 * @return <code>true</code> if the team has any users associated with it; <code>false</code> otherwise 489 * @throws SystemException if a system exception occurred 490 */ 491 public boolean containsUsers(long pk) 492 throws com.liferay.portal.kernel.exception.SystemException; 493 494 /** 495 * Adds an association between the team and the user. 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 userPK the primary key of the user 499 * @throws SystemException if a system exception occurred 500 */ 501 public void addUser(long pk, long userPK) 502 throws com.liferay.portal.kernel.exception.SystemException; 503 504 /** 505 * Adds an association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 506 * 507 * @param pk the primary key of the team 508 * @param user the user 509 * @throws SystemException if a system exception occurred 510 */ 511 public void addUser(long pk, com.liferay.portal.model.User user) 512 throws com.liferay.portal.kernel.exception.SystemException; 513 514 /** 515 * Adds an association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 516 * 517 * @param pk the primary key of the team 518 * @param userPKs the primary keys of the users 519 * @throws SystemException if a system exception occurred 520 */ 521 public void addUsers(long pk, long[] userPKs) 522 throws com.liferay.portal.kernel.exception.SystemException; 523 524 /** 525 * Adds an association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 526 * 527 * @param pk the primary key of the team 528 * @param users the users 529 * @throws SystemException if a system exception occurred 530 */ 531 public void addUsers(long pk, 532 java.util.List<com.liferay.portal.model.User> users) 533 throws com.liferay.portal.kernel.exception.SystemException; 534 535 /** 536 * Clears all associations between the team and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 537 * 538 * @param pk the primary key of the team to clear the associated users from 539 * @throws SystemException if a system exception occurred 540 */ 541 public void clearUsers(long pk) 542 throws com.liferay.portal.kernel.exception.SystemException; 543 544 /** 545 * Removes the association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 546 * 547 * @param pk the primary key of the team 548 * @param userPK the primary key of the user 549 * @throws SystemException if a system exception occurred 550 */ 551 public void removeUser(long pk, long userPK) 552 throws com.liferay.portal.kernel.exception.SystemException; 553 554 /** 555 * Removes the association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 556 * 557 * @param pk the primary key of the team 558 * @param user the user 559 * @throws SystemException if a system exception occurred 560 */ 561 public void removeUser(long pk, com.liferay.portal.model.User user) 562 throws com.liferay.portal.kernel.exception.SystemException; 563 564 /** 565 * Removes the association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 566 * 567 * @param pk the primary key of the team 568 * @param userPKs the primary keys of the users 569 * @throws SystemException if a system exception occurred 570 */ 571 public void removeUsers(long pk, long[] userPKs) 572 throws com.liferay.portal.kernel.exception.SystemException; 573 574 /** 575 * Removes the association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 576 * 577 * @param pk the primary key of the team 578 * @param users the users 579 * @throws SystemException if a system exception occurred 580 */ 581 public void removeUsers(long pk, 582 java.util.List<com.liferay.portal.model.User> users) 583 throws com.liferay.portal.kernel.exception.SystemException; 584 585 /** 586 * 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. 587 * 588 * @param pk the primary key of the team to set the associations for 589 * @param userPKs the primary keys of the users to be associated with the team 590 * @throws SystemException if a system exception occurred 591 */ 592 public void setUsers(long pk, long[] userPKs) 593 throws com.liferay.portal.kernel.exception.SystemException; 594 595 /** 596 * 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. 597 * 598 * @param pk the primary key of the team to set the associations for 599 * @param users the users to be associated with the team 600 * @throws SystemException if a system exception occurred 601 */ 602 public void setUsers(long pk, 603 java.util.List<com.liferay.portal.model.User> users) 604 throws com.liferay.portal.kernel.exception.SystemException; 605 606 /** 607 * Gets all the user groups associated with the team. 608 * 609 * @param pk the primary key of the team to get the associated user groups for 610 * @return the user groups associated with the team 611 * @throws SystemException if a system exception occurred 612 */ 613 public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups( 614 long pk) throws com.liferay.portal.kernel.exception.SystemException; 615 616 /** 617 * Gets a range of all the user groups associated with the team. 618 * 619 * <p> 620 * 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. 621 * </p> 622 * 623 * @param pk the primary key of the team to get the associated user groups for 624 * @param start the lower bound of the range of teams to return 625 * @param end the upper bound of the range of teams to return (not inclusive) 626 * @return the range of user groups associated with the team 627 * @throws SystemException if a system exception occurred 628 */ 629 public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups( 630 long pk, int start, int end) 631 throws com.liferay.portal.kernel.exception.SystemException; 632 633 /** 634 * Gets an ordered range of all the user groups associated with the team. 635 * 636 * <p> 637 * 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. 638 * </p> 639 * 640 * @param pk the primary key of the team to get the associated user groups for 641 * @param start the lower bound of the range of teams to return 642 * @param end the upper bound of the range of teams to return (not inclusive) 643 * @param orderByComparator the comparator to order the results by 644 * @return the ordered range of user groups associated with the team 645 * @throws SystemException if a system exception occurred 646 */ 647 public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups( 648 long pk, int start, int end, 649 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 650 throws com.liferay.portal.kernel.exception.SystemException; 651 652 /** 653 * Gets the number of user groups associated with the team. 654 * 655 * @param pk the primary key of the team to get the number of associated user groups for 656 * @return the number of user groups associated with the team 657 * @throws SystemException if a system exception occurred 658 */ 659 public int getUserGroupsSize(long pk) 660 throws com.liferay.portal.kernel.exception.SystemException; 661 662 /** 663 * Determines if the user group is associated with the team. 664 * 665 * @param pk the primary key of the team 666 * @param userGroupPK the primary key of the user group 667 * @return <code>true</code> if the user group is associated with the team; <code>false</code> otherwise 668 * @throws SystemException if a system exception occurred 669 */ 670 public boolean containsUserGroup(long pk, long userGroupPK) 671 throws com.liferay.portal.kernel.exception.SystemException; 672 673 /** 674 * Determines if the team has any user groups associated with it. 675 * 676 * @param pk the primary key of the team to check for associations with user groups 677 * @return <code>true</code> if the team has any user groups associated with it; <code>false</code> otherwise 678 * @throws SystemException if a system exception occurred 679 */ 680 public boolean containsUserGroups(long pk) 681 throws com.liferay.portal.kernel.exception.SystemException; 682 683 /** 684 * Adds an association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 685 * 686 * @param pk the primary key of the team 687 * @param userGroupPK the primary key of the user group 688 * @throws SystemException if a system exception occurred 689 */ 690 public void addUserGroup(long pk, long userGroupPK) 691 throws com.liferay.portal.kernel.exception.SystemException; 692 693 /** 694 * Adds an association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 695 * 696 * @param pk the primary key of the team 697 * @param userGroup the user group 698 * @throws SystemException if a system exception occurred 699 */ 700 public void addUserGroup(long pk, 701 com.liferay.portal.model.UserGroup userGroup) 702 throws com.liferay.portal.kernel.exception.SystemException; 703 704 /** 705 * Adds an association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 706 * 707 * @param pk the primary key of the team 708 * @param userGroupPKs the primary keys of the user groups 709 * @throws SystemException if a system exception occurred 710 */ 711 public void addUserGroups(long pk, long[] userGroupPKs) 712 throws com.liferay.portal.kernel.exception.SystemException; 713 714 /** 715 * Adds an association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 716 * 717 * @param pk the primary key of the team 718 * @param userGroups the user groups 719 * @throws SystemException if a system exception occurred 720 */ 721 public void addUserGroups(long pk, 722 java.util.List<com.liferay.portal.model.UserGroup> userGroups) 723 throws com.liferay.portal.kernel.exception.SystemException; 724 725 /** 726 * Clears all associations between the team and its user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 727 * 728 * @param pk the primary key of the team to clear the associated user groups from 729 * @throws SystemException if a system exception occurred 730 */ 731 public void clearUserGroups(long pk) 732 throws com.liferay.portal.kernel.exception.SystemException; 733 734 /** 735 * Removes the association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 736 * 737 * @param pk the primary key of the team 738 * @param userGroupPK the primary key of the user group 739 * @throws SystemException if a system exception occurred 740 */ 741 public void removeUserGroup(long pk, long userGroupPK) 742 throws com.liferay.portal.kernel.exception.SystemException; 743 744 /** 745 * Removes the association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 746 * 747 * @param pk the primary key of the team 748 * @param userGroup the user group 749 * @throws SystemException if a system exception occurred 750 */ 751 public void removeUserGroup(long pk, 752 com.liferay.portal.model.UserGroup userGroup) 753 throws com.liferay.portal.kernel.exception.SystemException; 754 755 /** 756 * Removes the association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 757 * 758 * @param pk the primary key of the team 759 * @param userGroupPKs the primary keys of the user groups 760 * @throws SystemException if a system exception occurred 761 */ 762 public void removeUserGroups(long pk, long[] userGroupPKs) 763 throws com.liferay.portal.kernel.exception.SystemException; 764 765 /** 766 * Removes the association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 767 * 768 * @param pk the primary key of the team 769 * @param userGroups the user groups 770 * @throws SystemException if a system exception occurred 771 */ 772 public void removeUserGroups(long pk, 773 java.util.List<com.liferay.portal.model.UserGroup> userGroups) 774 throws com.liferay.portal.kernel.exception.SystemException; 775 776 /** 777 * 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. 778 * 779 * @param pk the primary key of the team to set the associations for 780 * @param userGroupPKs the primary keys of the user groups to be associated with the team 781 * @throws SystemException if a system exception occurred 782 */ 783 public void setUserGroups(long pk, long[] userGroupPKs) 784 throws com.liferay.portal.kernel.exception.SystemException; 785 786 /** 787 * 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. 788 * 789 * @param pk the primary key of the team to set the associations for 790 * @param userGroups the user groups to be associated with the team 791 * @throws SystemException if a system exception occurred 792 */ 793 public void setUserGroups(long pk, 794 java.util.List<com.liferay.portal.model.UserGroup> userGroups) 795 throws com.liferay.portal.kernel.exception.SystemException; 796 797 public Team remove(Team team) throws SystemException; 798 }