Liferay 6.1.2-ce-ga3

com.liferay.portal.service.persistence
Interface TeamPersistence

All Superinterfaces:
BasePersistence<Team>
All Known Implementing Classes:
TeamPersistenceImpl

public interface TeamPersistence
extends BasePersistence<Team>

The persistence interface for the team service.

Caching information and settings can be found in portal.properties

See Also:
TeamPersistenceImpl, TeamUtil
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time it is generated.

Method Summary
 void addUser(long pk, long userPK)
          Adds an association between the team and the user.
 void addUser(long pk, User user)
          Adds an association between the team and the user.
 void addUserGroup(long pk, long userGroupPK)
          Adds an association between the team and the user group.
 void addUserGroup(long pk, UserGroup userGroup)
          Adds an association between the team and the user group.
 void addUserGroups(long pk, List<UserGroup> userGroups)
          Adds an association between the team and the user groups.
 void addUserGroups(long pk, long[] userGroupPKs)
          Adds an association between the team and the user groups.
 void addUsers(long pk, List<User> users)
          Adds an association between the team and the users.
 void addUsers(long pk, long[] userPKs)
          Adds an association between the team and the users.
 void cacheResult(List<Team> teams)
          Caches the teams in the entity cache if it is enabled.
 void cacheResult(Team team)
          Caches the team in the entity cache if it is enabled.
 void clearUserGroups(long pk)
          Clears all associations between the team and its user groups.
 void clearUsers(long pk)
          Clears all associations between the team and its users.
 boolean containsUser(long pk, long userPK)
          Returns true if the user is associated with the team.
 boolean containsUserGroup(long pk, long userGroupPK)
          Returns true if the user group is associated with the team.
 boolean containsUserGroups(long pk)
          Returns true if the team has any user groups associated with it.
 boolean containsUsers(long pk)
          Returns true if the team has any users associated with it.
 int countAll()
          Returns the number of teams.
 int countByG_N(long groupId, String name)
          Returns the number of teams where groupId = ? and name = ?.
 int countByGroupId(long groupId)
          Returns the number of teams where groupId = ?.
 Team create(long teamId)
          Creates a new team with the primary key.
 Team fetchByG_N(long groupId, String name)
          Returns the team where groupId = ? and name = ? or returns null if it could not be found.
 Team fetchByG_N(long groupId, String name, boolean retrieveFromCache)
          Returns the team where groupId = ? and name = ? or returns null if it could not be found, optionally using the finder cache.
 Team fetchByGroupId_First(long groupId, OrderByComparator orderByComparator)
          Returns the first team in the ordered set where groupId = ?.
 Team fetchByGroupId_Last(long groupId, OrderByComparator orderByComparator)
          Returns the last team in the ordered set where groupId = ?.
 Team fetchByPrimaryKey(long teamId)
          Returns the team with the primary key or returns null if it could not be found.
 int filterCountByGroupId(long groupId)
          Returns the number of teams that the user has permission to view where groupId = ?.
 Team[] filterFindByGroupId_PrevAndNext(long teamId, long groupId, OrderByComparator orderByComparator)
          Returns the teams before and after the current team in the ordered set of teams that the user has permission to view where groupId = ?.
 List<Team> filterFindByGroupId(long groupId)
          Returns all the teams that the user has permission to view where groupId = ?.
 List<Team> filterFindByGroupId(long groupId, int start, int end)
          Returns a range of all the teams that the user has permission to view where groupId = ?.
 List<Team> filterFindByGroupId(long groupId, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the teams that the user has permissions to view where groupId = ?.
 List<Team> findAll()
          Returns all the teams.
 List<Team> findAll(int start, int end)
          Returns a range of all the teams.
 List<Team> findAll(int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the teams.
 Team findByG_N(long groupId, String name)
          Returns the team where groupId = ? and name = ? or throws a NoSuchTeamException if it could not be found.
 Team findByGroupId_First(long groupId, OrderByComparator orderByComparator)
          Returns the first team in the ordered set where groupId = ?.
 Team findByGroupId_Last(long groupId, OrderByComparator orderByComparator)
          Returns the last team in the ordered set where groupId = ?.
 Team[] findByGroupId_PrevAndNext(long teamId, long groupId, OrderByComparator orderByComparator)
          Returns the teams before and after the current team in the ordered set where groupId = ?.
 List<Team> findByGroupId(long groupId)
          Returns all the teams where groupId = ?.
 List<Team> findByGroupId(long groupId, int start, int end)
          Returns a range of all the teams where groupId = ?.
 List<Team> findByGroupId(long groupId, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the teams where groupId = ?.
 Team findByPrimaryKey(long teamId)
          Returns the team with the primary key or throws a NoSuchTeamException if it could not be found.
 List<UserGroup> getUserGroups(long pk)
          Returns all the user groups associated with the team.
 List<UserGroup> getUserGroups(long pk, int start, int end)
          Returns a range of all the user groups associated with the team.
 List<UserGroup> getUserGroups(long pk, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the user groups associated with the team.
 int getUserGroupsSize(long pk)
          Returns the number of user groups associated with the team.
 List<User> getUsers(long pk)
          Returns all the users associated with the team.
 List<User> getUsers(long pk, int start, int end)
          Returns a range of all the users associated with the team.
 List<User> getUsers(long pk, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the users associated with the team.
 int getUsersSize(long pk)
          Returns the number of users associated with the team.
 Team remove(long teamId)
          Removes the team with the primary key from the database.
 void removeAll()
          Removes all the teams from the database.
 Team removeByG_N(long groupId, String name)
          Removes the team where groupId = ? and name = ? from the database.
 void removeByGroupId(long groupId)
          Removes all the teams where groupId = ? from the database.
 void removeUser(long pk, long userPK)
          Removes the association between the team and the user.
 void removeUser(long pk, User user)
          Removes the association between the team and the user.
 void removeUserGroup(long pk, long userGroupPK)
          Removes the association between the team and the user group.
 void removeUserGroup(long pk, UserGroup userGroup)
          Removes the association between the team and the user group.
 void removeUserGroups(long pk, List<UserGroup> userGroups)
          Removes the association between the team and the user groups.
 void removeUserGroups(long pk, long[] userGroupPKs)
          Removes the association between the team and the user groups.
 void removeUsers(long pk, List<User> users)
          Removes the association between the team and the users.
 void removeUsers(long pk, long[] userPKs)
          Removes the association between the team and the users.
 void setUserGroups(long pk, List<UserGroup> userGroups)
          Sets the user groups associated with the team, removing and adding associations as necessary.
 void setUserGroups(long pk, long[] userGroupPKs)
          Sets the user groups associated with the team, removing and adding associations as necessary.
 void setUsers(long pk, List<User> users)
          Sets the users associated with the team, removing and adding associations as necessary.
 void setUsers(long pk, long[] userPKs)
          Sets the users associated with the team, removing and adding associations as necessary.
 Team updateImpl(Team team, boolean merge)
           
 
Methods inherited from interface com.liferay.portal.service.persistence.BasePersistence
clearCache, clearCache, clearCache, closeSession, countWithDynamicQuery, fetchByPrimaryKey, findByPrimaryKey, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, getDataSource, getListeners, openSession, processException, registerListener, remove, remove, setDataSource, unregisterListener, update, update
 

Method Detail

cacheResult

void cacheResult(Team team)
Caches the team in the entity cache if it is enabled.

Parameters:
team - the team

cacheResult

void cacheResult(List<Team> teams)
Caches the teams in the entity cache if it is enabled.

Parameters:
teams - the teams

create

Team create(long teamId)
Creates a new team with the primary key. Does not add the team to the database.

Parameters:
teamId - the primary key for the new team
Returns:
the new team

remove

Team remove(long teamId)
            throws NoSuchTeamException,
                   SystemException
Removes the team with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
teamId - the primary key of the team
Returns:
the team that was removed
Throws:
NoSuchTeamException - if a team with the primary key could not be found
SystemException - if a system exception occurred

updateImpl

Team updateImpl(Team team,
                boolean merge)
                throws SystemException
Throws:
SystemException

findByPrimaryKey

Team findByPrimaryKey(long teamId)
                      throws NoSuchTeamException,
                             SystemException
Returns the team with the primary key or throws a NoSuchTeamException if it could not be found.

Parameters:
teamId - the primary key of the team
Returns:
the team
Throws:
NoSuchTeamException - if a team with the primary key could not be found
SystemException - if a system exception occurred

fetchByPrimaryKey

Team fetchByPrimaryKey(long teamId)
                       throws SystemException
Returns the team with the primary key or returns null if it could not be found.

Parameters:
teamId - the primary key of the team
Returns:
the team, or null if a team with the primary key could not be found
Throws:
SystemException - if a system exception occurred

findByGroupId

List<Team> findByGroupId(long groupId)
                         throws SystemException
Returns all the teams where groupId = ?.

Parameters:
groupId - the group ID
Returns:
the matching teams
Throws:
SystemException - if a system exception occurred

findByGroupId

List<Team> findByGroupId(long groupId,
                         int start,
                         int end)
                         throws SystemException
Returns a range of all the teams where groupId = ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
groupId - the group ID
start - the lower bound of the range of teams
end - the upper bound of the range of teams (not inclusive)
Returns:
the range of matching teams
Throws:
SystemException - if a system exception occurred

findByGroupId

List<Team> findByGroupId(long groupId,
                         int start,
                         int end,
                         OrderByComparator orderByComparator)
                         throws SystemException
Returns an ordered range of all the teams where groupId = ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
groupId - the group ID
start - the lower bound of the range of teams
end - the upper bound of the range of teams (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching teams
Throws:
SystemException - if a system exception occurred

findByGroupId_First

Team findByGroupId_First(long groupId,
                         OrderByComparator orderByComparator)
                         throws NoSuchTeamException,
                                SystemException
Returns the first team in the ordered set where groupId = ?.

Parameters:
groupId - the group ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching team
Throws:
NoSuchTeamException - if a matching team could not be found
SystemException - if a system exception occurred

fetchByGroupId_First

Team fetchByGroupId_First(long groupId,
                          OrderByComparator orderByComparator)
                          throws SystemException
Returns the first team in the ordered set where groupId = ?.

Parameters:
groupId - the group ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching team, or null if a matching team could not be found
Throws:
SystemException - if a system exception occurred

findByGroupId_Last

Team findByGroupId_Last(long groupId,
                        OrderByComparator orderByComparator)
                        throws NoSuchTeamException,
                               SystemException
Returns the last team in the ordered set where groupId = ?.

Parameters:
groupId - the group ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching team
Throws:
NoSuchTeamException - if a matching team could not be found
SystemException - if a system exception occurred

fetchByGroupId_Last

Team fetchByGroupId_Last(long groupId,
                         OrderByComparator orderByComparator)
                         throws SystemException
Returns the last team in the ordered set where groupId = ?.

Parameters:
groupId - the group ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching team, or null if a matching team could not be found
Throws:
SystemException - if a system exception occurred

findByGroupId_PrevAndNext

Team[] findByGroupId_PrevAndNext(long teamId,
                                 long groupId,
                                 OrderByComparator orderByComparator)
                                 throws NoSuchTeamException,
                                        SystemException
Returns the teams before and after the current team in the ordered set where groupId = ?.

Parameters:
teamId - the primary key of the current team
groupId - the group ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the previous, current, and next team
Throws:
NoSuchTeamException - if a team with the primary key could not be found
SystemException - if a system exception occurred

filterFindByGroupId

List<Team> filterFindByGroupId(long groupId)
                               throws SystemException
Returns all the teams that the user has permission to view where groupId = ?.

Parameters:
groupId - the group ID
Returns:
the matching teams that the user has permission to view
Throws:
SystemException - if a system exception occurred

filterFindByGroupId

List<Team> filterFindByGroupId(long groupId,
                               int start,
                               int end)
                               throws SystemException
Returns a range of all the teams that the user has permission to view where groupId = ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
groupId - the group ID
start - the lower bound of the range of teams
end - the upper bound of the range of teams (not inclusive)
Returns:
the range of matching teams that the user has permission to view
Throws:
SystemException - if a system exception occurred

filterFindByGroupId

List<Team> filterFindByGroupId(long groupId,
                               int start,
                               int end,
                               OrderByComparator orderByComparator)
                               throws SystemException
Returns an ordered range of all the teams that the user has permissions to view where groupId = ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
groupId - the group ID
start - the lower bound of the range of teams
end - the upper bound of the range of teams (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching teams that the user has permission to view
Throws:
SystemException - if a system exception occurred

filterFindByGroupId_PrevAndNext

Team[] filterFindByGroupId_PrevAndNext(long teamId,
                                       long groupId,
                                       OrderByComparator orderByComparator)
                                       throws NoSuchTeamException,
                                              SystemException
Returns the teams before and after the current team in the ordered set of teams that the user has permission to view where groupId = ?.

Parameters:
teamId - the primary key of the current team
groupId - the group ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the previous, current, and next team
Throws:
NoSuchTeamException - if a team with the primary key could not be found
SystemException - if a system exception occurred

findByG_N

Team findByG_N(long groupId,
               String name)
               throws NoSuchTeamException,
                      SystemException
Returns the team where groupId = ? and name = ? or throws a NoSuchTeamException if it could not be found.

Parameters:
groupId - the group ID
name - the name
Returns:
the matching team
Throws:
NoSuchTeamException - if a matching team could not be found
SystemException - if a system exception occurred

fetchByG_N

Team fetchByG_N(long groupId,
                String name)
                throws SystemException
Returns the team where groupId = ? and name = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
groupId - the group ID
name - the name
Returns:
the matching team, or null if a matching team could not be found
Throws:
SystemException - if a system exception occurred

fetchByG_N

Team fetchByG_N(long groupId,
                String name,
                boolean retrieveFromCache)
                throws SystemException
Returns the team where groupId = ? and name = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
groupId - the group ID
name - the name
retrieveFromCache - whether to use the finder cache
Returns:
the matching team, or null if a matching team could not be found
Throws:
SystemException - if a system exception occurred

findAll

List<Team> findAll()
                   throws SystemException
Returns all the teams.

Returns:
the teams
Throws:
SystemException - if a system exception occurred

findAll

List<Team> findAll(int start,
                   int end)
                   throws SystemException
Returns a range of all the teams.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
start - the lower bound of the range of teams
end - the upper bound of the range of teams (not inclusive)
Returns:
the range of teams
Throws:
SystemException - if a system exception occurred

findAll

List<Team> findAll(int start,
                   int end,
                   OrderByComparator orderByComparator)
                   throws SystemException
Returns an ordered range of all the teams.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
start - the lower bound of the range of teams
end - the upper bound of the range of teams (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of teams
Throws:
SystemException - if a system exception occurred

removeByGroupId

void removeByGroupId(long groupId)
                     throws SystemException
Removes all the teams where groupId = ? from the database.

Parameters:
groupId - the group ID
Throws:
SystemException - if a system exception occurred

removeByG_N

Team removeByG_N(long groupId,
                 String name)
                 throws NoSuchTeamException,
                        SystemException
Removes the team where groupId = ? and name = ? from the database.

Parameters:
groupId - the group ID
name - the name
Returns:
the team that was removed
Throws:
SystemException - if a system exception occurred
NoSuchTeamException

removeAll

void removeAll()
               throws SystemException
Removes all the teams from the database.

Throws:
SystemException - if a system exception occurred

countByGroupId

int countByGroupId(long groupId)
                   throws SystemException
Returns the number of teams where groupId = ?.

Parameters:
groupId - the group ID
Returns:
the number of matching teams
Throws:
SystemException - if a system exception occurred

filterCountByGroupId

int filterCountByGroupId(long groupId)
                         throws SystemException
Returns the number of teams that the user has permission to view where groupId = ?.

Parameters:
groupId - the group ID
Returns:
the number of matching teams that the user has permission to view
Throws:
SystemException - if a system exception occurred

countByG_N

int countByG_N(long groupId,
               String name)
               throws SystemException
Returns the number of teams where groupId = ? and name = ?.

Parameters:
groupId - the group ID
name - the name
Returns:
the number of matching teams
Throws:
SystemException - if a system exception occurred

countAll

int countAll()
             throws SystemException
Returns the number of teams.

Returns:
the number of teams
Throws:
SystemException - if a system exception occurred

getUsers

List<User> getUsers(long pk)
                    throws SystemException
Returns all the users associated with the team.

Parameters:
pk - the primary key of the team
Returns:
the users associated with the team
Throws:
SystemException - if a system exception occurred

getUsers

List<User> getUsers(long pk,
                    int start,
                    int end)
                    throws SystemException
Returns a range of all the users associated with the team.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
pk - the primary key of the team
start - the lower bound of the range of teams
end - the upper bound of the range of teams (not inclusive)
Returns:
the range of users associated with the team
Throws:
SystemException - if a system exception occurred

getUsers

List<User> getUsers(long pk,
                    int start,
                    int end,
                    OrderByComparator orderByComparator)
                    throws SystemException
Returns an ordered range of all the users associated with the team.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
pk - the primary key of the team
start - the lower bound of the range of teams
end - the upper bound of the range of teams (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of users associated with the team
Throws:
SystemException - if a system exception occurred

getUsersSize

int getUsersSize(long pk)
                 throws SystemException
Returns the number of users associated with the team.

Parameters:
pk - the primary key of the team
Returns:
the number of users associated with the team
Throws:
SystemException - if a system exception occurred

containsUser

boolean containsUser(long pk,
                     long userPK)
                     throws SystemException
Returns true if the user is associated with the team.

Parameters:
pk - the primary key of the team
userPK - the primary key of the user
Returns:
true if the user is associated with the team; false otherwise
Throws:
SystemException - if a system exception occurred

containsUsers

boolean containsUsers(long pk)
                      throws SystemException
Returns true if the team has any users associated with it.

Parameters:
pk - the primary key of the team to check for associations with users
Returns:
true if the team has any users associated with it; false otherwise
Throws:
SystemException - if a system exception occurred

addUser

void addUser(long pk,
             long userPK)
             throws SystemException
Adds an association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the team
userPK - the primary key of the user
Throws:
SystemException - if a system exception occurred

addUser

void addUser(long pk,
             User user)
             throws SystemException
Adds an association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the team
user - the user
Throws:
SystemException - if a system exception occurred

addUsers

void addUsers(long pk,
              long[] userPKs)
              throws SystemException
Adds an association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the team
userPKs - the primary keys of the users
Throws:
SystemException - if a system exception occurred

addUsers

void addUsers(long pk,
              List<User> users)
              throws SystemException
Adds an association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the team
users - the users
Throws:
SystemException - if a system exception occurred

clearUsers

void clearUsers(long pk)
                throws SystemException
Clears all associations between the team and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the team to clear the associated users from
Throws:
SystemException - if a system exception occurred

removeUser

void removeUser(long pk,
                long userPK)
                throws SystemException
Removes the association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the team
userPK - the primary key of the user
Throws:
SystemException - if a system exception occurred

removeUser

void removeUser(long pk,
                User user)
                throws SystemException
Removes the association between the team and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the team
user - the user
Throws:
SystemException - if a system exception occurred

removeUsers

void removeUsers(long pk,
                 long[] userPKs)
                 throws SystemException
Removes the association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the team
userPKs - the primary keys of the users
Throws:
SystemException - if a system exception occurred

removeUsers

void removeUsers(long pk,
                 List<User> users)
                 throws SystemException
Removes the association between the team and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the team
users - the users
Throws:
SystemException - if a system exception occurred

setUsers

void setUsers(long pk,
              long[] userPKs)
              throws SystemException
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.

Parameters:
pk - the primary key of the team
userPKs - the primary keys of the users to be associated with the team
Throws:
SystemException - if a system exception occurred

setUsers

void setUsers(long pk,
              List<User> users)
              throws SystemException
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.

Parameters:
pk - the primary key of the team
users - the users to be associated with the team
Throws:
SystemException - if a system exception occurred

getUserGroups

List<UserGroup> getUserGroups(long pk)
                              throws SystemException
Returns all the user groups associated with the team.

Parameters:
pk - the primary key of the team
Returns:
the user groups associated with the team
Throws:
SystemException - if a system exception occurred

getUserGroups

List<UserGroup> getUserGroups(long pk,
                              int start,
                              int end)
                              throws SystemException
Returns a range of all the user groups associated with the team.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
pk - the primary key of the team
start - the lower bound of the range of teams
end - the upper bound of the range of teams (not inclusive)
Returns:
the range of user groups associated with the team
Throws:
SystemException - if a system exception occurred

getUserGroups

List<UserGroup> getUserGroups(long pk,
                              int start,
                              int end,
                              OrderByComparator orderByComparator)
                              throws SystemException
Returns an ordered range of all the user groups associated with the team.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
pk - the primary key of the team
start - the lower bound of the range of teams
end - the upper bound of the range of teams (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of user groups associated with the team
Throws:
SystemException - if a system exception occurred

getUserGroupsSize

int getUserGroupsSize(long pk)
                      throws SystemException
Returns the number of user groups associated with the team.

Parameters:
pk - the primary key of the team
Returns:
the number of user groups associated with the team
Throws:
SystemException - if a system exception occurred

containsUserGroup

boolean containsUserGroup(long pk,
                          long userGroupPK)
                          throws SystemException
Returns true if the user group is associated with the team.

Parameters:
pk - the primary key of the team
userGroupPK - the primary key of the user group
Returns:
true if the user group is associated with the team; false otherwise
Throws:
SystemException - if a system exception occurred

containsUserGroups

boolean containsUserGroups(long pk)
                           throws SystemException
Returns true if the team has any user groups associated with it.

Parameters:
pk - the primary key of the team to check for associations with user groups
Returns:
true if the team has any user groups associated with it; false otherwise
Throws:
SystemException - if a system exception occurred

addUserGroup

void addUserGroup(long pk,
                  long userGroupPK)
                  throws SystemException
Adds an association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the team
userGroupPK - the primary key of the user group
Throws:
SystemException - if a system exception occurred

addUserGroup

void addUserGroup(long pk,
                  UserGroup userGroup)
                  throws SystemException
Adds an association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the team
userGroup - the user group
Throws:
SystemException - if a system exception occurred

addUserGroups

void addUserGroups(long pk,
                   long[] userGroupPKs)
                   throws SystemException
Adds an association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the team
userGroupPKs - the primary keys of the user groups
Throws:
SystemException - if a system exception occurred

addUserGroups

void addUserGroups(long pk,
                   List<UserGroup> userGroups)
                   throws SystemException
Adds an association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the team
userGroups - the user groups
Throws:
SystemException - if a system exception occurred

clearUserGroups

void clearUserGroups(long pk)
                     throws SystemException
Clears all associations between the team and its user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the team to clear the associated user groups from
Throws:
SystemException - if a system exception occurred

removeUserGroup

void removeUserGroup(long pk,
                     long userGroupPK)
                     throws SystemException
Removes the association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the team
userGroupPK - the primary key of the user group
Throws:
SystemException - if a system exception occurred

removeUserGroup

void removeUserGroup(long pk,
                     UserGroup userGroup)
                     throws SystemException
Removes the association between the team and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the team
userGroup - the user group
Throws:
SystemException - if a system exception occurred

removeUserGroups

void removeUserGroups(long pk,
                      long[] userGroupPKs)
                      throws SystemException
Removes the association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the team
userGroupPKs - the primary keys of the user groups
Throws:
SystemException - if a system exception occurred

removeUserGroups

void removeUserGroups(long pk,
                      List<UserGroup> userGroups)
                      throws SystemException
Removes the association between the team and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the team
userGroups - the user groups
Throws:
SystemException - if a system exception occurred

setUserGroups

void setUserGroups(long pk,
                   long[] userGroupPKs)
                   throws SystemException
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.

Parameters:
pk - the primary key of the team
userGroupPKs - the primary keys of the user groups to be associated with the team
Throws:
SystemException - if a system exception occurred

setUserGroups

void setUserGroups(long pk,
                   List<UserGroup> userGroups)
                   throws SystemException
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.

Parameters:
pk - the primary key of the team
userGroups - the user groups to be associated with the team
Throws:
SystemException - if a system exception occurred

Liferay 6.1.2-ce-ga3