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