Liferay 6.2-ce-ga5

com.liferay.portal.service.persistence
Class UserGroupRoleUtil

java.lang.Object
  extended by com.liferay.portal.service.persistence.UserGroupRoleUtil

@ProviderType
public class UserGroupRoleUtil
extends Object

The persistence utility for the user group role service. This utility wraps UserGroupRolePersistenceImpl 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.

Caching information and settings can be found in portal.properties

See Also:
UserGroupRolePersistence, UserGroupRolePersistenceImpl

Constructor Summary
UserGroupRoleUtil()
           
 
Method Summary
static void cacheResult(List<UserGroupRole> userGroupRoles)
          Caches the user group roles in the entity cache if it is enabled.
static void cacheResult(UserGroupRole userGroupRole)
          Caches the user group role in the entity cache if it is enabled.
static void clearCache()
           
static void clearCache(UserGroupRole userGroupRole)
           
static int countAll()
          Returns the number of user group roles.
static int countByG_R(long groupId, long roleId)
          Returns the number of user group roles where groupId = ? and roleId = ?.
static int countByGroupId(long groupId)
          Returns the number of user group roles where groupId = ?.
static int countByRoleId(long roleId)
          Returns the number of user group roles where roleId = ?.
static int countByU_G(long userId, long groupId)
          Returns the number of user group roles where userId = ? and groupId = ?.
static int countByUserId(long userId)
          Returns the number of user group roles where userId = ?.
static long countWithDynamicQuery(DynamicQuery dynamicQuery)
           
static UserGroupRole create(UserGroupRolePK userGroupRolePK)
          Creates a new user group role with the primary key.
static UserGroupRole fetchByG_R_First(long groupId, long roleId, OrderByComparator orderByComparator)
          Returns the first user group role in the ordered set where groupId = ? and roleId = ?.
static UserGroupRole fetchByG_R_Last(long groupId, long roleId, OrderByComparator orderByComparator)
          Returns the last user group role in the ordered set where groupId = ? and roleId = ?.
static UserGroupRole fetchByGroupId_First(long groupId, OrderByComparator orderByComparator)
          Returns the first user group role in the ordered set where groupId = ?.
static UserGroupRole fetchByGroupId_Last(long groupId, OrderByComparator orderByComparator)
          Returns the last user group role in the ordered set where groupId = ?.
static UserGroupRole fetchByPrimaryKey(UserGroupRolePK userGroupRolePK)
          Returns the user group role with the primary key or returns null if it could not be found.
static UserGroupRole fetchByRoleId_First(long roleId, OrderByComparator orderByComparator)
          Returns the first user group role in the ordered set where roleId = ?.
static UserGroupRole fetchByRoleId_Last(long roleId, OrderByComparator orderByComparator)
          Returns the last user group role in the ordered set where roleId = ?.
static UserGroupRole fetchByU_G_First(long userId, long groupId, OrderByComparator orderByComparator)
          Returns the first user group role in the ordered set where userId = ? and groupId = ?.
static UserGroupRole fetchByU_G_Last(long userId, long groupId, OrderByComparator orderByComparator)
          Returns the last user group role in the ordered set where userId = ? and groupId = ?.
static UserGroupRole fetchByUserId_First(long userId, OrderByComparator orderByComparator)
          Returns the first user group role in the ordered set where userId = ?.
static UserGroupRole fetchByUserId_Last(long userId, OrderByComparator orderByComparator)
          Returns the last user group role in the ordered set where userId = ?.
static List<UserGroupRole> findAll()
          Returns all the user group roles.
static List<UserGroupRole> findAll(int start, int end)
          Returns a range of all the user group roles.
static List<UserGroupRole> findAll(int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the user group roles.
static UserGroupRole findByG_R_First(long groupId, long roleId, OrderByComparator orderByComparator)
          Returns the first user group role in the ordered set where groupId = ? and roleId = ?.
static UserGroupRole findByG_R_Last(long groupId, long roleId, OrderByComparator orderByComparator)
          Returns the last user group role in the ordered set where groupId = ? and roleId = ?.
static UserGroupRole[] findByG_R_PrevAndNext(UserGroupRolePK userGroupRolePK, long groupId, long roleId, OrderByComparator orderByComparator)
          Returns the user group roles before and after the current user group role in the ordered set where groupId = ? and roleId = ?.
static List<UserGroupRole> findByG_R(long groupId, long roleId)
          Returns all the user group roles where groupId = ? and roleId = ?.
static List<UserGroupRole> findByG_R(long groupId, long roleId, int start, int end)
          Returns a range of all the user group roles where groupId = ? and roleId = ?.
static List<UserGroupRole> findByG_R(long groupId, long roleId, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the user group roles where groupId = ? and roleId = ?.
static UserGroupRole findByGroupId_First(long groupId, OrderByComparator orderByComparator)
          Returns the first user group role in the ordered set where groupId = ?.
static UserGroupRole findByGroupId_Last(long groupId, OrderByComparator orderByComparator)
          Returns the last user group role in the ordered set where groupId = ?.
static UserGroupRole[] findByGroupId_PrevAndNext(UserGroupRolePK userGroupRolePK, long groupId, OrderByComparator orderByComparator)
          Returns the user group roles before and after the current user group role in the ordered set where groupId = ?.
static List<UserGroupRole> findByGroupId(long groupId)
          Returns all the user group roles where groupId = ?.
static List<UserGroupRole> findByGroupId(long groupId, int start, int end)
          Returns a range of all the user group roles where groupId = ?.
static List<UserGroupRole> findByGroupId(long groupId, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the user group roles where groupId = ?.
static UserGroupRole findByPrimaryKey(UserGroupRolePK userGroupRolePK)
          Returns the user group role with the primary key or throws a NoSuchUserGroupRoleException if it could not be found.
static UserGroupRole findByRoleId_First(long roleId, OrderByComparator orderByComparator)
          Returns the first user group role in the ordered set where roleId = ?.
static UserGroupRole findByRoleId_Last(long roleId, OrderByComparator orderByComparator)
          Returns the last user group role in the ordered set where roleId = ?.
static UserGroupRole[] findByRoleId_PrevAndNext(UserGroupRolePK userGroupRolePK, long roleId, OrderByComparator orderByComparator)
          Returns the user group roles before and after the current user group role in the ordered set where roleId = ?.
static List<UserGroupRole> findByRoleId(long roleId)
          Returns all the user group roles where roleId = ?.
static List<UserGroupRole> findByRoleId(long roleId, int start, int end)
          Returns a range of all the user group roles where roleId = ?.
static List<UserGroupRole> findByRoleId(long roleId, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the user group roles where roleId = ?.
static UserGroupRole findByU_G_First(long userId, long groupId, OrderByComparator orderByComparator)
          Returns the first user group role in the ordered set where userId = ? and groupId = ?.
static UserGroupRole findByU_G_Last(long userId, long groupId, OrderByComparator orderByComparator)
          Returns the last user group role in the ordered set where userId = ? and groupId = ?.
static UserGroupRole[] findByU_G_PrevAndNext(UserGroupRolePK userGroupRolePK, long userId, long groupId, OrderByComparator orderByComparator)
          Returns the user group roles before and after the current user group role in the ordered set where userId = ? and groupId = ?.
static List<UserGroupRole> findByU_G(long userId, long groupId)
          Returns all the user group roles where userId = ? and groupId = ?.
static List<UserGroupRole> findByU_G(long userId, long groupId, int start, int end)
          Returns a range of all the user group roles where userId = ? and groupId = ?.
static List<UserGroupRole> findByU_G(long userId, long groupId, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the user group roles where userId = ? and groupId = ?.
static UserGroupRole findByUserId_First(long userId, OrderByComparator orderByComparator)
          Returns the first user group role in the ordered set where userId = ?.
static UserGroupRole findByUserId_Last(long userId, OrderByComparator orderByComparator)
          Returns the last user group role in the ordered set where userId = ?.
static UserGroupRole[] findByUserId_PrevAndNext(UserGroupRolePK userGroupRolePK, long userId, OrderByComparator orderByComparator)
          Returns the user group roles before and after the current user group role in the ordered set where userId = ?.
static List<UserGroupRole> findByUserId(long userId)
          Returns all the user group roles where userId = ?.
static List<UserGroupRole> findByUserId(long userId, int start, int end)
          Returns a range of all the user group roles where userId = ?.
static List<UserGroupRole> findByUserId(long userId, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the user group roles where userId = ?.
static List<UserGroupRole> findWithDynamicQuery(DynamicQuery dynamicQuery)
           
static List<UserGroupRole> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
           
static List<UserGroupRole> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator)
           
static UserGroupRolePersistence getPersistence()
           
static UserGroupRole remove(UserGroupRolePK userGroupRolePK)
          Removes the user group role with the primary key from the database.
static void removeAll()
          Removes all the user group roles from the database.
static void removeByG_R(long groupId, long roleId)
          Removes all the user group roles where groupId = ? and roleId = ? from the database.
static void removeByGroupId(long groupId)
          Removes all the user group roles where groupId = ? from the database.
static void removeByRoleId(long roleId)
          Removes all the user group roles where roleId = ? from the database.
static void removeByU_G(long userId, long groupId)
          Removes all the user group roles where userId = ? and groupId = ? from the database.
static void removeByUserId(long userId)
          Removes all the user group roles where userId = ? from the database.
 void setPersistence(UserGroupRolePersistence persistence)
          Deprecated. As of 6.2.0
static UserGroupRole update(UserGroupRole userGroupRole)
           
static UserGroupRole update(UserGroupRole userGroupRole, ServiceContext serviceContext)
           
static UserGroupRole updateImpl(UserGroupRole userGroupRole)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserGroupRoleUtil

public UserGroupRoleUtil()
Method Detail

clearCache

public static void clearCache()
See Also:
BasePersistence.clearCache()

clearCache

public static void clearCache(UserGroupRole userGroupRole)
See Also:
BasePersistence.clearCache(com.liferay.portal.model.BaseModel)

countWithDynamicQuery

public static long countWithDynamicQuery(DynamicQuery dynamicQuery)
                                  throws SystemException
Throws:
SystemException
See Also:
BasePersistence.countWithDynamicQuery(DynamicQuery)

findWithDynamicQuery

public static List<UserGroupRole> findWithDynamicQuery(DynamicQuery dynamicQuery)
                                                throws SystemException
Throws:
SystemException
See Also:
BasePersistence.findWithDynamicQuery(DynamicQuery)

findWithDynamicQuery

public static List<UserGroupRole> findWithDynamicQuery(DynamicQuery dynamicQuery,
                                                       int start,
                                                       int end)
                                                throws SystemException
Throws:
SystemException
See Also:
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)

findWithDynamicQuery

public static List<UserGroupRole> findWithDynamicQuery(DynamicQuery dynamicQuery,
                                                       int start,
                                                       int end,
                                                       OrderByComparator orderByComparator)
                                                throws SystemException
Throws:
SystemException
See Also:
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)

update

public static UserGroupRole update(UserGroupRole userGroupRole)
                            throws SystemException
Throws:
SystemException
See Also:
BasePersistence.update(com.liferay.portal.model.BaseModel)

update

public static UserGroupRole update(UserGroupRole userGroupRole,
                                   ServiceContext serviceContext)
                            throws SystemException
Throws:
SystemException
See Also:
BasePersistence.update(com.liferay.portal.model.BaseModel, ServiceContext)

findByUserId

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

Parameters:
userId - the user ID
Returns:
the matching user group roles
Throws:
SystemException - if a system exception occurred

findByUserId

public static List<UserGroupRole> findByUserId(long userId,
                                               int start,
                                               int end)
                                        throws SystemException
Returns 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from UserGroupRoleModelImpl. If both orderByComparator 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.

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

findByUserId

public static List<UserGroupRole> findByUserId(long userId,
                                               int start,
                                               int end,
                                               OrderByComparator orderByComparator)
                                        throws SystemException
Returns 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from UserGroupRoleModelImpl. If both orderByComparator 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.

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

findByUserId_First

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

Parameters:
userId - the user ID
orderByComparator - the comparator to order the set by (optionally null)
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

fetchByUserId_First

public static UserGroupRole fetchByUserId_First(long userId,
                                                OrderByComparator orderByComparator)
                                         throws SystemException
Returns the first user group role in the ordered set where userId = ?.

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

findByUserId_Last

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

Parameters:
userId - the user ID
orderByComparator - the comparator to order the set by (optionally null)
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

fetchByUserId_Last

public static UserGroupRole fetchByUserId_Last(long userId,
                                               OrderByComparator orderByComparator)
                                        throws SystemException
Returns the last user group role in the ordered set where userId = ?.

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

findByUserId_PrevAndNext

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

Parameters:
userGroupRolePK - the primary key of the current user group role
userId - the user ID
orderByComparator - the comparator to order the set by (optionally null)
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

removeByUserId

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

Parameters:
userId - the user ID
Throws:
SystemException - if a system exception occurred

countByUserId

public static int countByUserId(long userId)
                         throws SystemException
Returns the number of user group roles where userId = ?.

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

findByGroupId

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

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

findByGroupId

public static List<UserGroupRole> findByGroupId(long groupId,
                                                int start,
                                                int end)
                                         throws SystemException
Returns 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from UserGroupRoleModelImpl. If both orderByComparator 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.

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

findByGroupId

public static List<UserGroupRole> findByGroupId(long groupId,
                                                int start,
                                                int end,
                                                OrderByComparator orderByComparator)
                                         throws SystemException
Returns 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from UserGroupRoleModelImpl. If both orderByComparator 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.

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

findByGroupId_First

public static UserGroupRole findByGroupId_First(long groupId,
                                                OrderByComparator orderByComparator)
                                         throws NoSuchUserGroupRoleException,
                                                SystemException
Returns the first user group role 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 user group role
Throws:
NoSuchUserGroupRoleException - if a matching user group role could not be found
SystemException - if a system exception occurred

fetchByGroupId_First

public static UserGroupRole fetchByGroupId_First(long groupId,
                                                 OrderByComparator orderByComparator)
                                          throws SystemException
Returns the first user group role 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 user group role, or null if a matching user group role could not be found
Throws:
SystemException - if a system exception occurred

findByGroupId_Last

public static UserGroupRole findByGroupId_Last(long groupId,
                                               OrderByComparator orderByComparator)
                                        throws NoSuchUserGroupRoleException,
                                               SystemException
Returns the last user group role 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 user group role
Throws:
NoSuchUserGroupRoleException - if a matching user group role could not be found
SystemException - if a system exception occurred

fetchByGroupId_Last

public static UserGroupRole fetchByGroupId_Last(long groupId,
                                                OrderByComparator orderByComparator)
                                         throws SystemException
Returns the last user group role 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 user group role, or null if a matching user group role could not be found
Throws:
SystemException - if a system exception occurred

findByGroupId_PrevAndNext

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

Parameters:
userGroupRolePK - the primary key of the current user group role
groupId - the group ID
orderByComparator - the comparator to order the set by (optionally null)
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

removeByGroupId

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

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

countByGroupId

public static int countByGroupId(long groupId)
                          throws SystemException
Returns the number of user group roles where groupId = ?.

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

findByRoleId

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

Parameters:
roleId - the role ID
Returns:
the matching user group roles
Throws:
SystemException - if a system exception occurred

findByRoleId

public static List<UserGroupRole> findByRoleId(long roleId,
                                               int start,
                                               int end)
                                        throws SystemException
Returns 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from UserGroupRoleModelImpl. If both orderByComparator 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.

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

findByRoleId

public static List<UserGroupRole> findByRoleId(long roleId,
                                               int start,
                                               int end,
                                               OrderByComparator orderByComparator)
                                        throws SystemException
Returns 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from UserGroupRoleModelImpl. If both orderByComparator 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.

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

findByRoleId_First

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

Parameters:
roleId - the role ID
orderByComparator - the comparator to order the set by (optionally null)
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

fetchByRoleId_First

public static UserGroupRole fetchByRoleId_First(long roleId,
                                                OrderByComparator orderByComparator)
                                         throws SystemException
Returns the first user group role in the ordered set where roleId = ?.

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

findByRoleId_Last

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

Parameters:
roleId - the role ID
orderByComparator - the comparator to order the set by (optionally null)
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

fetchByRoleId_Last

public static UserGroupRole fetchByRoleId_Last(long roleId,
                                               OrderByComparator orderByComparator)
                                        throws SystemException
Returns the last user group role in the ordered set where roleId = ?.

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

findByRoleId_PrevAndNext

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

Parameters:
userGroupRolePK - the primary key of the current user group role
roleId - the role ID
orderByComparator - the comparator to order the set by (optionally null)
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

removeByRoleId

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

Parameters:
roleId - the role ID
Throws:
SystemException - if a system exception occurred

countByRoleId

public static int countByRoleId(long roleId)
                         throws SystemException
Returns the number of user group roles where roleId = ?.

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

findByU_G

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

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

findByU_G

public static List<UserGroupRole> findByU_G(long userId,
                                            long groupId,
                                            int start,
                                            int end)
                                     throws SystemException
Returns 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from UserGroupRoleModelImpl. If both orderByComparator 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.

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

findByU_G

public static List<UserGroupRole> findByU_G(long userId,
                                            long groupId,
                                            int start,
                                            int end,
                                            OrderByComparator orderByComparator)
                                     throws SystemException
Returns 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from UserGroupRoleModelImpl. If both orderByComparator 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.

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

findByU_G_First

public static UserGroupRole findByU_G_First(long userId,
                                            long groupId,
                                            OrderByComparator orderByComparator)
                                     throws NoSuchUserGroupRoleException,
                                            SystemException
Returns the first user group role in the ordered set where userId = ? and groupId = ?.

Parameters:
userId - the user ID
groupId - the group ID
orderByComparator - the comparator to order the set by (optionally null)
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

fetchByU_G_First

public static UserGroupRole fetchByU_G_First(long userId,
                                             long groupId,
                                             OrderByComparator orderByComparator)
                                      throws SystemException
Returns the first user group role in the ordered set where userId = ? and groupId = ?.

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

findByU_G_Last

public static UserGroupRole findByU_G_Last(long userId,
                                           long groupId,
                                           OrderByComparator orderByComparator)
                                    throws NoSuchUserGroupRoleException,
                                           SystemException
Returns the last user group role in the ordered set where userId = ? and groupId = ?.

Parameters:
userId - the user ID
groupId - the group ID
orderByComparator - the comparator to order the set by (optionally null)
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

fetchByU_G_Last

public static UserGroupRole fetchByU_G_Last(long userId,
                                            long groupId,
                                            OrderByComparator orderByComparator)
                                     throws SystemException
Returns the last user group role in the ordered set where userId = ? and groupId = ?.

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

findByU_G_PrevAndNext

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

Parameters:
userGroupRolePK - the primary key of the current user group role
userId - the user ID
groupId - the group ID
orderByComparator - the comparator to order the set by (optionally null)
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

removeByU_G

public static 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
groupId - the group ID
Throws:
SystemException - if a system exception occurred

countByU_G

public static int countByU_G(long userId,
                             long groupId)
                      throws SystemException
Returns the number of user group roles where userId = ? and groupId = ?.

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

findByG_R

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

Parameters:
groupId - the group ID
roleId - the role ID
Returns:
the matching user group roles
Throws:
SystemException - if a system exception occurred

findByG_R

public static List<UserGroupRole> findByG_R(long groupId,
                                            long roleId,
                                            int start,
                                            int end)
                                     throws SystemException
Returns 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from UserGroupRoleModelImpl. If both orderByComparator 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.

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

findByG_R

public static List<UserGroupRole> findByG_R(long groupId,
                                            long roleId,
                                            int start,
                                            int end,
                                            OrderByComparator orderByComparator)
                                     throws SystemException
Returns 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from UserGroupRoleModelImpl. If both orderByComparator 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.

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

findByG_R_First

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

Parameters:
groupId - the group ID
roleId - the role ID
orderByComparator - the comparator to order the set by (optionally null)
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

fetchByG_R_First

public static UserGroupRole fetchByG_R_First(long groupId,
                                             long roleId,
                                             OrderByComparator orderByComparator)
                                      throws SystemException
Returns the first user group role in the ordered set where groupId = ? and roleId = ?.

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

findByG_R_Last

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

Parameters:
groupId - the group ID
roleId - the role ID
orderByComparator - the comparator to order the set by (optionally null)
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

fetchByG_R_Last

public static UserGroupRole fetchByG_R_Last(long groupId,
                                            long roleId,
                                            OrderByComparator orderByComparator)
                                     throws SystemException
Returns the last user group role in the ordered set where groupId = ? and roleId = ?.

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

findByG_R_PrevAndNext

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

Parameters:
userGroupRolePK - the primary key of the current user group role
groupId - the group ID
roleId - the role ID
orderByComparator - the comparator to order the set by (optionally null)
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

removeByG_R

public static 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
roleId - the role ID
Throws:
SystemException - if a system exception occurred

countByG_R

public static int countByG_R(long groupId,
                             long roleId)
                      throws SystemException
Returns the number of user group roles where groupId = ? and roleId = ?.

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

cacheResult

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

Parameters:
userGroupRole - the user group role

cacheResult

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

Parameters:
userGroupRoles - the user group roles

create

public static 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

public static 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
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

public static UserGroupRole updateImpl(UserGroupRole userGroupRole)
                                throws SystemException
Throws:
SystemException

findByPrimaryKey

public static UserGroupRole findByPrimaryKey(UserGroupRolePK userGroupRolePK)
                                      throws NoSuchUserGroupRoleException,
                                             SystemException
Returns 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
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

public static UserGroupRole fetchByPrimaryKey(UserGroupRolePK userGroupRolePK)
                                       throws SystemException
Returns 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
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

findAll

public static List<UserGroupRole> findAll()
                                   throws SystemException
Returns all the user group roles.

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

findAll

public static List<UserGroupRole> findAll(int start,
                                          int end)
                                   throws SystemException
Returns 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from UserGroupRoleModelImpl. If both orderByComparator 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.

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

findAll

public static List<UserGroupRole> findAll(int start,
                                          int end,
                                          OrderByComparator orderByComparator)
                                   throws SystemException
Returns 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from UserGroupRoleModelImpl. If both orderByComparator 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.

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

removeAll

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

Throws:
SystemException - if a system exception occurred

countAll

public static int countAll()
                    throws SystemException
Returns the number of user group roles.

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

getPersistence

public static UserGroupRolePersistence getPersistence()

setPersistence

public void setPersistence(UserGroupRolePersistence persistence)
Deprecated. As of 6.2.0


Liferay 6.2-ce-ga5