Liferay 6.0.5

com.liferay.portal.service.persistence
Interface UserGroupRolePersistence

All Superinterfaces:
BasePersistence<UserGroupRole>
All Known Implementing Classes:
UserGroupRolePersistenceImpl

public interface UserGroupRolePersistence
extends BasePersistence<UserGroupRole>

The persistence interface for the user group role service.

Never modify or reference this interface directly. Always use UserGroupRoleUtil to access the user group role persistence. Modify service.xml and rerun ServiceBuilder to regenerate this interface.

Caching information and settings can be found in portal.properties

See Also:
UserGroupRolePersistenceImpl, UserGroupRoleUtil
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time is generated.

Method Summary
 void cacheResult(List<UserGroupRole> userGroupRoles)
          Caches the user group roles in the entity cache if it is enabled.
 void cacheResult(UserGroupRole userGroupRole)
          Caches the user group role in the entity cache if it is enabled.
 int countAll()
          Counts all the user group roles.
 int countByG_R(long groupId, long roleId)
          Counts all the user group roles where groupId = ? and roleId = ?.
 int countByGroupId(long groupId)
          Counts all the user group roles where groupId = ?.
 int countByRoleId(long roleId)
          Counts all the user group roles where roleId = ?.
 int countByU_G(long userId, long groupId)
          Counts all the user group roles where userId = ? and groupId = ?.
 int countByUserId(long userId)
          Counts all the user group roles where userId = ?.
 UserGroupRole create(UserGroupRolePK userGroupRolePK)
          Creates a new user group role with the primary key.
 UserGroupRole fetchByPrimaryKey(UserGroupRolePK userGroupRolePK)
          Finds the user group role with the primary key or returns null if it could not be found.
 List<UserGroupRole> findAll()
          Finds all the user group roles.
 List<UserGroupRole> findAll(int start, int end)
          Finds a range of all the user group roles.
 List<UserGroupRole> findAll(int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the user group roles.
 UserGroupRole findByG_R_First(long groupId, long roleId, OrderByComparator orderByComparator)
          Finds the first user group role in the ordered set where groupId = ? and roleId = ?.
 UserGroupRole findByG_R_Last(long groupId, long roleId, OrderByComparator orderByComparator)
          Finds the last user group role in the ordered set where groupId = ? and roleId = ?.
 UserGroupRole[] findByG_R_PrevAndNext(UserGroupRolePK userGroupRolePK, long groupId, long roleId, OrderByComparator orderByComparator)
          Finds the user group roles before and after the current user group role in the ordered set where groupId = ? and roleId = ?.
 List<UserGroupRole> findByG_R(long groupId, long roleId)
          Finds all the user group roles where groupId = ? and roleId = ?.
 List<UserGroupRole> findByG_R(long groupId, long roleId, int start, int end)
          Finds a range of all the user group roles where groupId = ? and roleId = ?.
 List<UserGroupRole> findByG_R(long groupId, long roleId, int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the user group roles where groupId = ? and roleId = ?.
 UserGroupRole findByGroupId_First(long groupId, OrderByComparator orderByComparator)
          Finds the first user group role in the ordered set where groupId = ?.
 UserGroupRole findByGroupId_Last(long groupId, OrderByComparator orderByComparator)
          Finds the last user group role in the ordered set where groupId = ?.
 UserGroupRole[] findByGroupId_PrevAndNext(UserGroupRolePK userGroupRolePK, long groupId, OrderByComparator orderByComparator)
          Finds the user group roles before and after the current user group role in the ordered set where groupId = ?.
 List<UserGroupRole> findByGroupId(long groupId)
          Finds all the user group roles where groupId = ?.
 List<UserGroupRole> findByGroupId(long groupId, int start, int end)
          Finds a range of all the user group roles where groupId = ?.
 List<UserGroupRole> findByGroupId(long groupId, int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the user group roles where groupId = ?.
 UserGroupRole findByPrimaryKey(UserGroupRolePK userGroupRolePK)
          Finds the user group role with the primary key or throws a NoSuchUserGroupRoleException if it could not be found.
 UserGroupRole findByRoleId_First(long roleId, OrderByComparator orderByComparator)
          Finds the first user group role in the ordered set where roleId = ?.
 UserGroupRole findByRoleId_Last(long roleId, OrderByComparator orderByComparator)
          Finds the last user group role in the ordered set where roleId = ?.
 UserGroupRole[] findByRoleId_PrevAndNext(UserGroupRolePK userGroupRolePK, long roleId, OrderByComparator orderByComparator)
          Finds the user group roles before and after the current user group role in the ordered set where roleId = ?.
 List<UserGroupRole> findByRoleId(long roleId)
          Finds all the user group roles where roleId = ?.
 List<UserGroupRole> findByRoleId(long roleId, int start, int end)
          Finds a range of all the user group roles where roleId = ?.
 List<UserGroupRole> findByRoleId(long roleId, int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the user group roles where roleId = ?.
 UserGroupRole findByU_G_First(long userId, long groupId, OrderByComparator orderByComparator)
          Finds the first user group role in the ordered set where userId = ? and groupId = ?.
 UserGroupRole findByU_G_Last(long userId, long groupId, OrderByComparator orderByComparator)
          Finds the last user group role in the ordered set where userId = ? and groupId = ?.
 UserGroupRole[] findByU_G_PrevAndNext(UserGroupRolePK userGroupRolePK, long userId, long groupId, OrderByComparator orderByComparator)
          Finds the user group roles before and after the current user group role in the ordered set where userId = ? and groupId = ?.
 List<UserGroupRole> findByU_G(long userId, long groupId)
          Finds all the user group roles where userId = ? and groupId = ?.
 List<UserGroupRole> findByU_G(long userId, long groupId, int start, int end)
          Finds a range of all the user group roles where userId = ? and groupId = ?.
 List<UserGroupRole> findByU_G(long userId, long groupId, int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the user group roles where userId = ? and groupId = ?.
 UserGroupRole findByUserId_First(long userId, OrderByComparator orderByComparator)
          Finds the first user group role in the ordered set where userId = ?.
 UserGroupRole findByUserId_Last(long userId, OrderByComparator orderByComparator)
          Finds the last user group role in the ordered set where userId = ?.
 UserGroupRole[] findByUserId_PrevAndNext(UserGroupRolePK userGroupRolePK, long userId, OrderByComparator orderByComparator)
          Finds the user group roles before and after the current user group role in the ordered set where userId = ?.
 List<UserGroupRole> findByUserId(long userId)
          Finds all the user group roles where userId = ?.
 List<UserGroupRole> findByUserId(long userId, int start, int end)
          Finds a range of all the user group roles where userId = ?.
 List<UserGroupRole> findByUserId(long userId, int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the user group roles where userId = ?.
 UserGroupRole remove(UserGroupRolePK userGroupRolePK)
          Removes the user group role with the primary key from the database.
 void removeAll()
          Removes all the user group roles from the database.
 void removeByG_R(long groupId, long roleId)
          Removes all the user group roles where groupId = ? and roleId = ? from the database.
 void removeByGroupId(long groupId)
          Removes all the user group roles where groupId = ? from the database.
 void removeByRoleId(long roleId)
          Removes all the user group roles where roleId = ? from the database.
 void removeByU_G(long userId, long groupId)
          Removes all the user group roles where userId = ? and groupId = ? from the database.
 void removeByUserId(long userId)
          Removes all the user group roles where userId = ? from the database.
 UserGroupRole updateImpl(UserGroupRole userGroupRole, boolean merge)
           
 
Methods inherited from interface com.liferay.portal.service.persistence.BasePersistence
clearCache, clearCache, countWithDynamicQuery, fetchByPrimaryKey, findByPrimaryKey, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, getDataSource, getListeners, registerListener, remove, remove, setDataSource, unregisterListener, update, update
 

Method Detail

cacheResult

void cacheResult(UserGroupRole userGroupRole)
Caches the user group role in the entity cache if it is enabled.

Parameters:
userGroupRole - the user group role to cache

cacheResult

void cacheResult(List<UserGroupRole> userGroupRoles)
Caches the user group roles in the entity cache if it is enabled.

Parameters:
userGroupRoles - the user group roles to cache

create

UserGroupRole create(UserGroupRolePK userGroupRolePK)
Creates a new user group role with the primary key. Does not add the user group role to the database.

Parameters:
userGroupRolePK - the primary key for the new user group role
Returns:
the new user group role

remove

UserGroupRole remove(UserGroupRolePK userGroupRolePK)
                     throws NoSuchUserGroupRoleException,
                            SystemException
Removes the user group role with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
userGroupRolePK - the primary key of the user group role to remove
Returns:
the user group role that was removed
Throws:
NoSuchUserGroupRoleException - if a user group role with the primary key could not be found
SystemException - if a system exception occurred

updateImpl

UserGroupRole updateImpl(UserGroupRole userGroupRole,
                         boolean merge)
                         throws SystemException
Throws:
SystemException

findByPrimaryKey

UserGroupRole findByPrimaryKey(UserGroupRolePK userGroupRolePK)
                               throws NoSuchUserGroupRoleException,
                                      SystemException
Finds the user group role with the primary key or throws a NoSuchUserGroupRoleException if it could not be found.

Parameters:
userGroupRolePK - the primary key of the user group role to find
Returns:
the user group role
Throws:
NoSuchUserGroupRoleException - if a user group role with the primary key could not be found
SystemException - if a system exception occurred

fetchByPrimaryKey

UserGroupRole fetchByPrimaryKey(UserGroupRolePK userGroupRolePK)
                                throws SystemException
Finds the user group role with the primary key or returns null if it could not be found.

Parameters:
userGroupRolePK - the primary key of the user group role to find
Returns:
the user group role, or null if a user group role with the primary key could not be found
Throws:
SystemException - if a system exception occurred

findByUserId

List<UserGroupRole> findByUserId(long userId)
                                 throws SystemException
Finds all the user group roles where userId = ?.

Parameters:
userId - the user id to search with
Returns:
the matching user group roles
Throws:
SystemException - if a system exception occurred

findByUserId

List<UserGroupRole> findByUserId(long userId,
                                 int start,
                                 int end)
                                 throws SystemException
Finds a range of all the user group roles where userId = ?.

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:
userId - the user id to search with
start - the lower bound of the range of user group roles to return
end - the upper bound of the range of user group roles to return (not inclusive)
Returns:
the range of matching user group roles
Throws:
SystemException - if a system exception occurred

findByUserId

List<UserGroupRole> findByUserId(long userId,
                                 int start,
                                 int end,
                                 OrderByComparator orderByComparator)
                                 throws SystemException
Finds an ordered range of all the user group roles where userId = ?.

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:
userId - the user id to search with
start - the lower bound of the range of user group roles to return
end - the upper bound of the range of user group roles to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of matching user group roles
Throws:
SystemException - if a system exception occurred

findByUserId_First

UserGroupRole findByUserId_First(long userId,
                                 OrderByComparator orderByComparator)
                                 throws NoSuchUserGroupRoleException,
                                        SystemException
Finds the first user group role in the ordered set where userId = ?.

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:
userId - the user id to search with
orderByComparator - the comparator to order the set by
Returns:
the first matching user group role
Throws:
NoSuchUserGroupRoleException - if a matching user group role could not be found
SystemException - if a system exception occurred

findByUserId_Last

UserGroupRole findByUserId_Last(long userId,
                                OrderByComparator orderByComparator)
                                throws NoSuchUserGroupRoleException,
                                       SystemException
Finds the last user group role in the ordered set where userId = ?.

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:
userId - the user id to search with
orderByComparator - the comparator to order the set by
Returns:
the last matching user group role
Throws:
NoSuchUserGroupRoleException - if a matching user group role could not be found
SystemException - if a system exception occurred

findByUserId_PrevAndNext

UserGroupRole[] findByUserId_PrevAndNext(UserGroupRolePK userGroupRolePK,
                                         long userId,
                                         OrderByComparator orderByComparator)
                                         throws NoSuchUserGroupRoleException,
                                                SystemException
Finds the user group roles before and after the current user group role in the ordered set where userId = ?.

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:
userGroupRolePK - the primary key of the current user group role
userId - the user id to search with
orderByComparator - the comparator to order the set by
Returns:
the previous, current, and next user group role
Throws:
NoSuchUserGroupRoleException - if a user group role with the primary key could not be found
SystemException - if a system exception occurred

findByGroupId

List<UserGroupRole> findByGroupId(long groupId)
                                  throws SystemException
Finds all the user group roles where groupId = ?.

Parameters:
groupId - the group id to search with
Returns:
the matching user group roles
Throws:
SystemException - if a system exception occurred

findByGroupId

List<UserGroupRole> findByGroupId(long groupId,
                                  int start,
                                  int end)
                                  throws SystemException
Finds a range of all the user group roles 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 to search with
start - the lower bound of the range of user group roles to return
end - the upper bound of the range of user group roles to return (not inclusive)
Returns:
the range of matching user group roles
Throws:
SystemException - if a system exception occurred

findByGroupId

List<UserGroupRole> findByGroupId(long groupId,
                                  int start,
                                  int end,
                                  OrderByComparator orderByComparator)
                                  throws SystemException
Finds an ordered range of all the user group roles 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 to search with
start - the lower bound of the range of user group roles to return
end - the upper bound of the range of user group roles to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of matching user group roles
Throws:
SystemException - if a system exception occurred

findByGroupId_First

UserGroupRole findByGroupId_First(long groupId,
                                  OrderByComparator orderByComparator)
                                  throws NoSuchUserGroupRoleException,
                                         SystemException
Finds the first user group role in the ordered set 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 to search with
orderByComparator - the comparator to order the set by
Returns:
the first matching user group role
Throws:
NoSuchUserGroupRoleException - if a matching user group role could not be found
SystemException - if a system exception occurred

findByGroupId_Last

UserGroupRole findByGroupId_Last(long groupId,
                                 OrderByComparator orderByComparator)
                                 throws NoSuchUserGroupRoleException,
                                        SystemException
Finds the last user group role in the ordered set 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 to search with
orderByComparator - the comparator to order the set by
Returns:
the last matching user group role
Throws:
NoSuchUserGroupRoleException - if a matching user group role could not be found
SystemException - if a system exception occurred

findByGroupId_PrevAndNext

UserGroupRole[] findByGroupId_PrevAndNext(UserGroupRolePK userGroupRolePK,
                                          long groupId,
                                          OrderByComparator orderByComparator)
                                          throws NoSuchUserGroupRoleException,
                                                 SystemException
Finds the user group roles before and after the current user group role in the ordered set 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:
userGroupRolePK - the primary key of the current user group role
groupId - the group id to search with
orderByComparator - the comparator to order the set by
Returns:
the previous, current, and next user group role
Throws:
NoSuchUserGroupRoleException - if a user group role with the primary key could not be found
SystemException - if a system exception occurred

findByRoleId

List<UserGroupRole> findByRoleId(long roleId)
                                 throws SystemException
Finds all the user group roles where roleId = ?.

Parameters:
roleId - the role id to search with
Returns:
the matching user group roles
Throws:
SystemException - if a system exception occurred

findByRoleId

List<UserGroupRole> findByRoleId(long roleId,
                                 int start,
                                 int end)
                                 throws SystemException
Finds a range of all the user group roles where roleId = ?.

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:
roleId - the role id to search with
start - the lower bound of the range of user group roles to return
end - the upper bound of the range of user group roles to return (not inclusive)
Returns:
the range of matching user group roles
Throws:
SystemException - if a system exception occurred

findByRoleId

List<UserGroupRole> findByRoleId(long roleId,
                                 int start,
                                 int end,
                                 OrderByComparator orderByComparator)
                                 throws SystemException
Finds an ordered range of all the user group roles where roleId = ?.

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:
roleId - the role id to search with
start - the lower bound of the range of user group roles to return
end - the upper bound of the range of user group roles to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of matching user group roles
Throws:
SystemException - if a system exception occurred

findByRoleId_First

UserGroupRole findByRoleId_First(long roleId,
                                 OrderByComparator orderByComparator)
                                 throws NoSuchUserGroupRoleException,
                                        SystemException
Finds the first user group role in the ordered set where roleId = ?.

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:
roleId - the role id to search with
orderByComparator - the comparator to order the set by
Returns:
the first matching user group role
Throws:
NoSuchUserGroupRoleException - if a matching user group role could not be found
SystemException - if a system exception occurred

findByRoleId_Last

UserGroupRole findByRoleId_Last(long roleId,
                                OrderByComparator orderByComparator)
                                throws NoSuchUserGroupRoleException,
                                       SystemException
Finds the last user group role in the ordered set where roleId = ?.

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:
roleId - the role id to search with
orderByComparator - the comparator to order the set by
Returns:
the last matching user group role
Throws:
NoSuchUserGroupRoleException - if a matching user group role could not be found
SystemException - if a system exception occurred

findByRoleId_PrevAndNext

UserGroupRole[] findByRoleId_PrevAndNext(UserGroupRolePK userGroupRolePK,
                                         long roleId,
                                         OrderByComparator orderByComparator)
                                         throws NoSuchUserGroupRoleException,
                                                SystemException
Finds the user group roles before and after the current user group role in the ordered set where roleId = ?.

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:
userGroupRolePK - the primary key of the current user group role
roleId - the role id to search with
orderByComparator - the comparator to order the set by
Returns:
the previous, current, and next user group role
Throws:
NoSuchUserGroupRoleException - if a user group role with the primary key could not be found
SystemException - if a system exception occurred

findByU_G

List<UserGroupRole> findByU_G(long userId,
                              long groupId)
                              throws SystemException
Finds all the user group roles where userId = ? and groupId = ?.

Parameters:
userId - the user id to search with
groupId - the group id to search with
Returns:
the matching user group roles
Throws:
SystemException - if a system exception occurred

findByU_G

List<UserGroupRole> findByU_G(long userId,
                              long groupId,
                              int start,
                              int end)
                              throws SystemException
Finds a range of all the user group roles where userId = ? and 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:
userId - the user id to search with
groupId - the group id to search with
start - the lower bound of the range of user group roles to return
end - the upper bound of the range of user group roles to return (not inclusive)
Returns:
the range of matching user group roles
Throws:
SystemException - if a system exception occurred

findByU_G

List<UserGroupRole> findByU_G(long userId,
                              long groupId,
                              int start,
                              int end,
                              OrderByComparator orderByComparator)
                              throws SystemException
Finds an ordered range of all the user group roles where userId = ? and 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:
userId - the user id to search with
groupId - the group id to search with
start - the lower bound of the range of user group roles to return
end - the upper bound of the range of user group roles to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of matching user group roles
Throws:
SystemException - if a system exception occurred

findByU_G_First

UserGroupRole findByU_G_First(long userId,
                              long groupId,
                              OrderByComparator orderByComparator)
                              throws NoSuchUserGroupRoleException,
                                     SystemException
Finds the first user group role in the ordered set where userId = ? and 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:
userId - the user id to search with
groupId - the group id to search with
orderByComparator - the comparator to order the set by
Returns:
the first matching user group role
Throws:
NoSuchUserGroupRoleException - if a matching user group role could not be found
SystemException - if a system exception occurred

findByU_G_Last

UserGroupRole findByU_G_Last(long userId,
                             long groupId,
                             OrderByComparator orderByComparator)
                             throws NoSuchUserGroupRoleException,
                                    SystemException
Finds the last user group role in the ordered set where userId = ? and 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:
userId - the user id to search with
groupId - the group id to search with
orderByComparator - the comparator to order the set by
Returns:
the last matching user group role
Throws:
NoSuchUserGroupRoleException - if a matching user group role could not be found
SystemException - if a system exception occurred

findByU_G_PrevAndNext

UserGroupRole[] findByU_G_PrevAndNext(UserGroupRolePK userGroupRolePK,
                                      long userId,
                                      long groupId,
                                      OrderByComparator orderByComparator)
                                      throws NoSuchUserGroupRoleException,
                                             SystemException
Finds the user group roles before and after the current user group role in the ordered set where userId = ? and 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:
userGroupRolePK - the primary key of the current user group role
userId - the user id to search with
groupId - the group id to search with
orderByComparator - the comparator to order the set by
Returns:
the previous, current, and next user group role
Throws:
NoSuchUserGroupRoleException - if a user group role with the primary key could not be found
SystemException - if a system exception occurred

findByG_R

List<UserGroupRole> findByG_R(long groupId,
                              long roleId)
                              throws SystemException
Finds all the user group roles where groupId = ? and roleId = ?.

Parameters:
groupId - the group id to search with
roleId - the role id to search with
Returns:
the matching user group roles
Throws:
SystemException - if a system exception occurred

findByG_R

List<UserGroupRole> findByG_R(long groupId,
                              long roleId,
                              int start,
                              int end)
                              throws SystemException
Finds a range of all the user group roles where groupId = ? and roleId = ?.

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 to search with
roleId - the role id to search with
start - the lower bound of the range of user group roles to return
end - the upper bound of the range of user group roles to return (not inclusive)
Returns:
the range of matching user group roles
Throws:
SystemException - if a system exception occurred

findByG_R

List<UserGroupRole> findByG_R(long groupId,
                              long roleId,
                              int start,
                              int end,
                              OrderByComparator orderByComparator)
                              throws SystemException
Finds an ordered range of all the user group roles where groupId = ? and roleId = ?.

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 to search with
roleId - the role id to search with
start - the lower bound of the range of user group roles to return
end - the upper bound of the range of user group roles to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of matching user group roles
Throws:
SystemException - if a system exception occurred

findByG_R_First

UserGroupRole findByG_R_First(long groupId,
                              long roleId,
                              OrderByComparator orderByComparator)
                              throws NoSuchUserGroupRoleException,
                                     SystemException
Finds the first user group role in the ordered set where groupId = ? and roleId = ?.

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 to search with
roleId - the role id to search with
orderByComparator - the comparator to order the set by
Returns:
the first matching user group role
Throws:
NoSuchUserGroupRoleException - if a matching user group role could not be found
SystemException - if a system exception occurred

findByG_R_Last

UserGroupRole findByG_R_Last(long groupId,
                             long roleId,
                             OrderByComparator orderByComparator)
                             throws NoSuchUserGroupRoleException,
                                    SystemException
Finds the last user group role in the ordered set where groupId = ? and roleId = ?.

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 to search with
roleId - the role id to search with
orderByComparator - the comparator to order the set by
Returns:
the last matching user group role
Throws:
NoSuchUserGroupRoleException - if a matching user group role could not be found
SystemException - if a system exception occurred

findByG_R_PrevAndNext

UserGroupRole[] findByG_R_PrevAndNext(UserGroupRolePK userGroupRolePK,
                                      long groupId,
                                      long roleId,
                                      OrderByComparator orderByComparator)
                                      throws NoSuchUserGroupRoleException,
                                             SystemException
Finds the user group roles before and after the current user group role in the ordered set where groupId = ? and roleId = ?.

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:
userGroupRolePK - the primary key of the current user group role
groupId - the group id to search with
roleId - the role id to search with
orderByComparator - the comparator to order the set by
Returns:
the previous, current, and next user group role
Throws:
NoSuchUserGroupRoleException - if a user group role with the primary key could not be found
SystemException - if a system exception occurred

findAll

List<UserGroupRole> findAll()
                            throws SystemException
Finds all the user group roles.

Returns:
the user group roles
Throws:
SystemException - if a system exception occurred

findAll

List<UserGroupRole> findAll(int start,
                            int end)
                            throws SystemException
Finds a range of all the user group roles.

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 user group roles to return
end - the upper bound of the range of user group roles to return (not inclusive)
Returns:
the range of user group roles
Throws:
SystemException - if a system exception occurred

findAll

List<UserGroupRole> findAll(int start,
                            int end,
                            OrderByComparator orderByComparator)
                            throws SystemException
Finds an ordered range of all the user group roles.

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 user group roles to return
end - the upper bound of the range of user group roles to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of user group roles
Throws:
SystemException - if a system exception occurred

removeByUserId

void removeByUserId(long userId)
                    throws SystemException
Removes all the user group roles where userId = ? from the database.

Parameters:
userId - the user id to search with
Throws:
SystemException - if a system exception occurred

removeByGroupId

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

Parameters:
groupId - the group id to search with
Throws:
SystemException - if a system exception occurred

removeByRoleId

void removeByRoleId(long roleId)
                    throws SystemException
Removes all the user group roles where roleId = ? from the database.

Parameters:
roleId - the role id to search with
Throws:
SystemException - if a system exception occurred

removeByU_G

void removeByU_G(long userId,
                 long groupId)
                 throws SystemException
Removes all the user group roles where userId = ? and groupId = ? from the database.

Parameters:
userId - the user id to search with
groupId - the group id to search with
Throws:
SystemException - if a system exception occurred

removeByG_R

void removeByG_R(long groupId,
                 long roleId)
                 throws SystemException
Removes all the user group roles where groupId = ? and roleId = ? from the database.

Parameters:
groupId - the group id to search with
roleId - the role id to search with
Throws:
SystemException - if a system exception occurred

removeAll

void removeAll()
               throws SystemException
Removes all the user group roles from the database.

Throws:
SystemException - if a system exception occurred

countByUserId

int countByUserId(long userId)
                  throws SystemException
Counts all the user group roles where userId = ?.

Parameters:
userId - the user id to search with
Returns:
the number of matching user group roles
Throws:
SystemException - if a system exception occurred

countByGroupId

int countByGroupId(long groupId)
                   throws SystemException
Counts all the user group roles where groupId = ?.

Parameters:
groupId - the group id to search with
Returns:
the number of matching user group roles
Throws:
SystemException - if a system exception occurred

countByRoleId

int countByRoleId(long roleId)
                  throws SystemException
Counts all the user group roles where roleId = ?.

Parameters:
roleId - the role id to search with
Returns:
the number of matching user group roles
Throws:
SystemException - if a system exception occurred

countByU_G

int countByU_G(long userId,
               long groupId)
               throws SystemException
Counts all the user group roles where userId = ? and groupId = ?.

Parameters:
userId - the user id to search with
groupId - the group id to search with
Returns:
the number of matching user group roles
Throws:
SystemException - if a system exception occurred

countByG_R

int countByG_R(long groupId,
               long roleId)
               throws SystemException
Counts all the user group roles where groupId = ? and roleId = ?.

Parameters:
groupId - the group id to search with
roleId - the role id to search with
Returns:
the number of matching user group roles
Throws:
SystemException - if a system exception occurred

countAll

int countAll()
             throws SystemException
Counts all the user group roles.

Returns:
the number of user group roles
Throws:
SystemException - if a system exception occurred

Liferay 6.0.5