public class UserGroupRoleLocalServiceUtil
extends Object
com.liferay.portal.service.impl.UserGroupRoleLocalServiceImpl
and
is an access point for service operations in application layer code running
on the local server. Methods of this service will not have security checks
based on the propagated JAAS credentials because this service can only be
accessed from within the same VM.UserGroupRoleLocalService
Constructor and Description |
---|
UserGroupRoleLocalServiceUtil() |
Modifier and Type | Method and Description |
---|---|
static UserGroupRole |
addUserGroupRole(long userId,
long groupId,
long roleId) |
static UserGroupRole |
addUserGroupRole(UserGroupRole userGroupRole)
Adds the user group role to the database.
|
static List<UserGroupRole> |
addUserGroupRoles(long[] userIds,
long groupId,
long roleId) |
static List<UserGroupRole> |
addUserGroupRoles(long userId,
long groupId,
long[] roleIds) |
static PersistedModel |
createPersistedModel(Serializable primaryKeyObj) |
static UserGroupRole |
createUserGroupRole(long userGroupRoleId)
Creates a new user group role with the primary key.
|
static PersistedModel |
deletePersistedModel(PersistedModel persistedModel) |
static UserGroupRole |
deleteUserGroupRole(long userGroupRoleId)
Deletes the user group role with the primary key from the database.
|
static UserGroupRole |
deleteUserGroupRole(UserGroupRole userGroupRole)
Deletes the user group role from the database.
|
static void |
deleteUserGroupRoles(long[] userIds,
long groupId) |
static void |
deleteUserGroupRoles(long[] userIds,
long groupId,
int roleType) |
static void |
deleteUserGroupRoles(long[] userIds,
long groupId,
long roleId) |
static void |
deleteUserGroupRoles(long groupId,
int roleType) |
static void |
deleteUserGroupRoles(long userId,
long[] groupIds) |
static void |
deleteUserGroupRoles(long userId,
long groupId,
long[] roleIds) |
static void |
deleteUserGroupRolesByGroupId(long groupId) |
static void |
deleteUserGroupRolesByRoleId(long roleId) |
static void |
deleteUserGroupRolesByUserId(long userId) |
static <T> T |
dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) |
static int |
dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) |
static DynamicQuery |
dynamicQuery() |
static <T> List<T> |
dynamicQuery(DynamicQuery dynamicQuery)
Performs a dynamic query on the database and returns the matching rows.
|
static <T> List<T> |
dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end)
Performs a dynamic query on the database and returns a range of the matching rows.
|
static <T> List<T> |
dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end,
OrderByComparator<T> orderByComparator)
Performs a dynamic query on the database and returns an ordered range of the matching rows.
|
static long |
dynamicQueryCount(DynamicQuery dynamicQuery)
Returns the number of rows matching the dynamic query.
|
static long |
dynamicQueryCount(DynamicQuery dynamicQuery,
Projection projection)
Returns the number of rows matching the dynamic query.
|
static UserGroupRole |
fetchUserGroupRole(long userGroupRoleId) |
static UserGroupRole |
fetchUserGroupRole(long userId,
long groupId,
long roleId) |
static ActionableDynamicQuery |
getActionableDynamicQuery() |
static IndexableActionableDynamicQuery |
getIndexableActionableDynamicQuery() |
static String |
getOSGiServiceIdentifier()
Returns the OSGi service identifier.
|
static PersistedModel |
getPersistedModel(Serializable primaryKeyObj) |
static UserGroupRoleLocalService |
getService() |
static UserGroupRole |
getUserGroupRole(long userGroupRoleId)
Returns the user group role with the primary key.
|
static List<UserGroupRole> |
getUserGroupRoles(int start,
int end)
Returns a range of all the user group roles.
|
static List<UserGroupRole> |
getUserGroupRoles(long userId) |
static List<UserGroupRole> |
getUserGroupRoles(long userId,
long groupId) |
static List<UserGroupRole> |
getUserGroupRoles(long userId,
long groupId,
int start,
int end) |
static List<UserGroupRole> |
getUserGroupRolesByGroup(long groupId) |
static List<UserGroupRole> |
getUserGroupRolesByGroupAndRole(long groupId,
long roleId) |
static List<UserGroupRole> |
getUserGroupRolesByUserUserGroupAndGroup(long userId,
long groupId) |
static int |
getUserGroupRolesCount()
Returns the number of user group roles.
|
static int |
getUserGroupRolesCount(long userId,
long groupId) |
static boolean |
hasUserGroupRole(long userId,
long groupId,
long roleId) |
static boolean |
hasUserGroupRole(long userId,
long groupId,
long roleId,
boolean inherit) |
static boolean |
hasUserGroupRole(long userId,
long groupId,
String roleName) |
static boolean |
hasUserGroupRole(long userId,
long groupId,
String roleName,
boolean inherit) |
static void |
setService(UserGroupRoleLocalService service) |
static UserGroupRole |
updateUserGroupRole(UserGroupRole userGroupRole)
Updates the user group role in the database or adds it if it does not yet exist.
|
public static UserGroupRole addUserGroupRole(long userId, long groupId, long roleId)
public static UserGroupRole addUserGroupRole(UserGroupRole userGroupRole)
Important: Inspect UserGroupRoleLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
userGroupRole
- the user group rolepublic static List<UserGroupRole> addUserGroupRoles(long userId, long groupId, long[] roleIds)
public static List<UserGroupRole> addUserGroupRoles(long[] userIds, long groupId, long roleId)
public static PersistedModel createPersistedModel(Serializable primaryKeyObj) throws PortalException
PortalException
public static UserGroupRole createUserGroupRole(long userGroupRoleId)
userGroupRoleId
- the primary key for the new user group rolepublic static PersistedModel deletePersistedModel(PersistedModel persistedModel) throws PortalException
PortalException
public static UserGroupRole deleteUserGroupRole(long userGroupRoleId) throws PortalException
Important: Inspect UserGroupRoleLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
userGroupRoleId
- the primary key of the user group rolePortalException
- if a user group role with the primary key could not be foundpublic static UserGroupRole deleteUserGroupRole(UserGroupRole userGroupRole)
Important: Inspect UserGroupRoleLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
userGroupRole
- the user group rolepublic static void deleteUserGroupRoles(long groupId, int roleType)
public static void deleteUserGroupRoles(long userId, long groupId, long[] roleIds)
public static void deleteUserGroupRoles(long userId, long[] groupIds)
public static void deleteUserGroupRoles(long[] userIds, long groupId)
public static void deleteUserGroupRoles(long[] userIds, long groupId, int roleType)
public static void deleteUserGroupRoles(long[] userIds, long groupId, long roleId)
public static void deleteUserGroupRolesByGroupId(long groupId)
public static void deleteUserGroupRolesByRoleId(long roleId)
public static void deleteUserGroupRolesByUserId(long userId)
public static <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
public static int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
public static DynamicQuery dynamicQuery()
public static <T> List<T> dynamicQuery(DynamicQuery dynamicQuery)
dynamicQuery
- the dynamic querypublic static <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
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 com.liferay.portal.kernel.dao.orm.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, then the query will include the default ORDER BY logic from com.liferay.portal.model.impl.UserGroupRoleModelImpl
.
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)public static <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> orderByComparator)
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 com.liferay.portal.kernel.dao.orm.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, then the query will include the default ORDER BY logic from com.liferay.portal.model.impl.UserGroupRoleModelImpl
.
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static long dynamicQueryCount(DynamicQuery dynamicQuery)
dynamicQuery
- the dynamic querypublic static long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection)
dynamicQuery
- the dynamic queryprojection
- the projection to apply to the querypublic static UserGroupRole fetchUserGroupRole(long userGroupRoleId)
public static UserGroupRole fetchUserGroupRole(long userId, long groupId, long roleId)
public static ActionableDynamicQuery getActionableDynamicQuery()
public static IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
public static String getOSGiServiceIdentifier()
public static PersistedModel getPersistedModel(Serializable primaryKeyObj) throws PortalException
PortalException
public static UserGroupRole getUserGroupRole(long userGroupRoleId) throws PortalException
userGroupRoleId
- the primary key of the user group rolePortalException
- if a user group role with the primary key could not be foundpublic static List<UserGroupRole> getUserGroupRoles(int start, int end)
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 com.liferay.portal.kernel.dao.orm.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, then the query will include the default ORDER BY logic from com.liferay.portal.model.impl.UserGroupRoleModelImpl
.
start
- the lower bound of the range of user group rolesend
- the upper bound of the range of user group roles (not inclusive)public static List<UserGroupRole> getUserGroupRoles(long userId)
public static List<UserGroupRole> getUserGroupRoles(long userId, long groupId)
public static List<UserGroupRole> getUserGroupRoles(long userId, long groupId, int start, int end)
public static List<UserGroupRole> getUserGroupRolesByGroup(long groupId)
public static List<UserGroupRole> getUserGroupRolesByGroupAndRole(long groupId, long roleId)
public static List<UserGroupRole> getUserGroupRolesByUserUserGroupAndGroup(long userId, long groupId)
public static int getUserGroupRolesCount()
public static int getUserGroupRolesCount(long userId, long groupId)
public static boolean hasUserGroupRole(long userId, long groupId, long roleId)
public static boolean hasUserGroupRole(long userId, long groupId, long roleId, boolean inherit)
public static boolean hasUserGroupRole(long userId, long groupId, String roleName) throws PortalException
PortalException
public static boolean hasUserGroupRole(long userId, long groupId, String roleName, boolean inherit) throws PortalException
PortalException
public static UserGroupRole updateUserGroupRole(UserGroupRole userGroupRole)
Important: Inspect UserGroupRoleLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
userGroupRole
- the user group rolepublic static UserGroupRoleLocalService getService()
public static void setService(UserGroupRoleLocalService service)