Interface UserGroupRoleLocalService
- All Superinterfaces:
BaseLocalService
,CTService<UserGroupRole>
,PersistedModelLocalService
- All Known Implementing Classes:
UserGroupRoleLocalServiceWrapper
- Author:
- Brian Wing Shun Chan
- See Also:
- {$generated.description}
-
Method Summary
Modifier and TypeMethodDescriptionaddUserGroupRole
(long userId, long groupId, long roleId) addUserGroupRole
(UserGroupRole userGroupRole) Adds the user group role to the database.addUserGroupRoles
(long[] userIds, long groupId, long roleId) addUserGroupRoles
(long userId, long groupId, long[] roleIds) createPersistedModel
(Serializable primaryKeyObj) createUserGroupRole
(long userGroupRoleId) Creates a new user group role with the primary key.deletePersistedModel
(PersistedModel persistedModel) deleteUserGroupRole
(long userGroupRoleId) Deletes the user group role with the primary key from the database.deleteUserGroupRole
(UserGroupRole userGroupRole) Deletes the user group role from the database.void
deleteUserGroupRoles
(long[] userIds, long groupId) void
deleteUserGroupRoles
(long[] userIds, long groupId, int roleType) void
deleteUserGroupRoles
(long[] userIds, long groupId, long roleId) void
deleteUserGroupRoles
(long groupId, int roleType) void
deleteUserGroupRoles
(long userId, long[] groupIds) void
deleteUserGroupRoles
(long userId, long groupId, long[] roleIds) void
deleteUserGroupRolesByGroupId
(long groupId) void
deleteUserGroupRolesByRoleId
(long roleId) void
deleteUserGroupRolesByUserId
(long userId) <T> T
dslQuery
(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) int
dslQueryCount
(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) <T> List<T>
dynamicQuery
(DynamicQuery dynamicQuery) Performs a dynamic query on the database and returns the matching rows.<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.<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.long
dynamicQueryCount
(DynamicQuery dynamicQuery) Returns the number of rows matching the dynamic query.long
dynamicQueryCount
(DynamicQuery dynamicQuery, Projection projection) Returns the number of rows matching the dynamic query.fetchUserGroupRole
(long userGroupRoleId) fetchUserGroupRole
(long userId, long groupId, long roleId) Returns the OSGi service identifier.getPersistedModel
(Serializable primaryKeyObj) getUserGroupRole
(long userGroupRoleId) Returns the user group role with the primary key.getUserGroupRoles
(int start, int end) Returns a range of all the user group roles.getUserGroupRoles
(long userId) getUserGroupRoles
(long userId, long groupId) getUserGroupRoles
(long userId, long groupId, int start, int end) getUserGroupRolesByGroup
(long groupId) getUserGroupRolesByGroupAndRole
(long groupId, long roleId) getUserGroupRolesByUserUserGroupAndGroup
(long userId, long groupId) int
Returns the number of user group roles.int
getUserGroupRolesCount
(long userId, long groupId) boolean
hasUserGroupRole
(long userId, long groupId, long roleId) boolean
hasUserGroupRole
(long userId, long groupId, long roleId, boolean inherit) boolean
hasUserGroupRole
(long userId, long groupId, String roleName) boolean
hasUserGroupRole
(long userId, long groupId, String roleName, boolean inherit) updateUserGroupRole
(UserGroupRole userGroupRole) Updates the user group role in the database or adds it if it does not yet exist.<R,
E extends Throwable>
RupdateWithUnsafeFunction
(com.liferay.petra.function.UnsafeFunction<CTPersistence<UserGroupRole>, R, E> updateUnsafeFunction) Methods inherited from interface com.liferay.portal.kernel.service.PersistedModelLocalService
fetchPersistedModel, getBasePersistence
-
Method Details
-
addUserGroupRole
-
addUserGroupRole
Adds the user group role to the database. Also notifies the appropriate model listeners.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.
- Parameters:
userGroupRole
- the user group role- Returns:
- the user group role that was added
-
addUserGroupRoles
-
addUserGroupRoles
-
createPersistedModel
- Specified by:
createPersistedModel
in interfacePersistedModelLocalService
- Throws:
PortalException
-
createUserGroupRole
Creates a new user group role with the primary key. Does not add the user group role to the database.- Parameters:
userGroupRoleId
- the primary key for the new user group role- Returns:
- the new user group role
-
deletePersistedModel
- Specified by:
deletePersistedModel
in interfacePersistedModelLocalService
- Throws:
PortalException
-
deleteUserGroupRole
@Indexable(type=DELETE) UserGroupRole deleteUserGroupRole(long userGroupRoleId) throws PortalException Deletes the user group role with the primary key from the database. Also notifies the appropriate model listeners.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.
- Parameters:
userGroupRoleId
- the primary key of the user group role- Returns:
- the user group role that was removed
- Throws:
PortalException
- if a user group role with the primary key could not be found
-
deleteUserGroupRole
Deletes the user group role from the database. Also notifies the appropriate model listeners.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.
- Parameters:
userGroupRole
- the user group role- Returns:
- the user group role that was removed
-
deleteUserGroupRoles
void deleteUserGroupRoles(long groupId, int roleType) -
deleteUserGroupRoles
void deleteUserGroupRoles(long userId, long groupId, long[] roleIds) -
deleteUserGroupRoles
void deleteUserGroupRoles(long userId, long[] groupIds) -
deleteUserGroupRoles
void deleteUserGroupRoles(long[] userIds, long groupId) -
deleteUserGroupRoles
void deleteUserGroupRoles(long[] userIds, long groupId, int roleType) -
deleteUserGroupRoles
void deleteUserGroupRoles(long[] userIds, long groupId, long roleId) -
deleteUserGroupRolesByGroupId
void deleteUserGroupRolesByGroupId(long groupId) -
deleteUserGroupRolesByRoleId
void deleteUserGroupRolesByRoleId(long roleId) -
deleteUserGroupRolesByUserId
void deleteUserGroupRolesByUserId(long userId) -
dslQuery
@Transactional(propagation=SUPPORTS, readOnly=true) <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) - Specified by:
dslQuery
in interfacePersistedModelLocalService
-
dslQueryCount
@Transactional(propagation=SUPPORTS, readOnly=true) int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) - Specified by:
dslQueryCount
in interfacePersistedModelLocalService
-
dynamicQuery
-
dynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) Performs a dynamic query on the database and returns the matching rows.- Parameters:
dynamicQuery
- the dynamic query- Returns:
- the matching rows
-
dynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) <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.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
tocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.UserGroupRoleModelImpl
.- Parameters:
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)- Returns:
- the range of matching rows
-
dynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) <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.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
tocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.UserGroupRoleModelImpl
.- Parameters:
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 (optionallynull
)- Returns:
- the ordered range of matching rows
-
dynamicQueryCount
@Transactional(propagation=SUPPORTS, readOnly=true) long dynamicQueryCount(DynamicQuery dynamicQuery) Returns the number of rows matching the dynamic query.- Parameters:
dynamicQuery
- the dynamic query- Returns:
- the number of rows matching the dynamic query
-
dynamicQueryCount
@Transactional(propagation=SUPPORTS, readOnly=true) long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection) Returns the number of rows matching the dynamic query.- Parameters:
dynamicQuery
- the dynamic queryprojection
- the projection to apply to the query- Returns:
- the number of rows matching the dynamic query
-
fetchUserGroupRole
@Transactional(propagation=SUPPORTS, readOnly=true) UserGroupRole fetchUserGroupRole(long userGroupRoleId) -
fetchUserGroupRole
@Transactional(propagation=SUPPORTS, readOnly=true) UserGroupRole fetchUserGroupRole(long userId, long groupId, long roleId) -
getActionableDynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) ActionableDynamicQuery getActionableDynamicQuery() -
getIndexableActionableDynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() -
getOSGiServiceIdentifier
String getOSGiServiceIdentifier()Returns the OSGi service identifier.- Returns:
- the OSGi service identifier
-
getPersistedModel
@Transactional(propagation=SUPPORTS, readOnly=true) PersistedModel getPersistedModel(Serializable primaryKeyObj) throws PortalException - Specified by:
getPersistedModel
in interfacePersistedModelLocalService
- Throws:
PortalException
-
getUserGroupRole
@Transactional(propagation=SUPPORTS, readOnly=true) UserGroupRole getUserGroupRole(long userGroupRoleId) throws PortalException Returns the user group role with the primary key.- Parameters:
userGroupRoleId
- the primary key of the user group role- Returns:
- the user group role
- Throws:
PortalException
- if a user group role with the primary key could not be found
-
getUserGroupRoles
@Transactional(propagation=SUPPORTS, readOnly=true) List<UserGroupRole> getUserGroupRoles(int start, int end) Returns a range of all the user group roles.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
tocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.UserGroupRoleModelImpl
.- Parameters:
start
- the lower bound of the range of user group rolesend
- the upper bound of the range of user group roles (not inclusive)- Returns:
- the range of user group roles
-
getUserGroupRoles
@Transactional(propagation=SUPPORTS, readOnly=true) List<UserGroupRole> getUserGroupRoles(long userId) -
getUserGroupRoles
@Transactional(propagation=SUPPORTS, readOnly=true) List<UserGroupRole> getUserGroupRoles(long userId, long groupId) -
getUserGroupRoles
@Transactional(propagation=SUPPORTS, readOnly=true) List<UserGroupRole> getUserGroupRoles(long userId, long groupId, int start, int end) -
getUserGroupRolesByGroup
@Transactional(propagation=SUPPORTS, readOnly=true) List<UserGroupRole> getUserGroupRolesByGroup(long groupId) -
getUserGroupRolesByGroupAndRole
@Transactional(propagation=SUPPORTS, readOnly=true) List<UserGroupRole> getUserGroupRolesByGroupAndRole(long groupId, long roleId) -
getUserGroupRolesByUserUserGroupAndGroup
@Transactional(propagation=SUPPORTS, readOnly=true) List<UserGroupRole> getUserGroupRolesByUserUserGroupAndGroup(long userId, long groupId) -
getUserGroupRolesCount
Returns the number of user group roles.- Returns:
- the number of user group roles
-
getUserGroupRolesCount
@Transactional(propagation=SUPPORTS, readOnly=true) int getUserGroupRolesCount(long userId, long groupId) -
hasUserGroupRole
@Transactional(propagation=SUPPORTS, readOnly=true) boolean hasUserGroupRole(long userId, long groupId, long roleId) -
hasUserGroupRole
@Transactional(propagation=SUPPORTS, readOnly=true) boolean hasUserGroupRole(long userId, long groupId, long roleId, boolean inherit) -
hasUserGroupRole
@Transactional(propagation=SUPPORTS, readOnly=true) boolean hasUserGroupRole(long userId, long groupId, String roleName) throws PortalException - Throws:
PortalException
-
hasUserGroupRole
@Transactional(propagation=SUPPORTS, readOnly=true) boolean hasUserGroupRole(long userId, long groupId, String roleName, boolean inherit) throws PortalException - Throws:
PortalException
-
updateUserGroupRole
Updates the user group role in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.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.
- Parameters:
userGroupRole
- the user group role- Returns:
- the user group role that was updated
-
getCTPersistence
- Specified by:
getCTPersistence
in interfaceCTService<UserGroupRole>
-
getModelClass
- Specified by:
getModelClass
in interfaceCTService<UserGroupRole>
-
updateWithUnsafeFunction
@Transactional(rollbackFor=java.lang.Throwable.class) <R,E extends Throwable> R updateWithUnsafeFunction(com.liferay.petra.function.UnsafeFunction<CTPersistence<UserGroupRole>, R, throws EE> updateUnsafeFunction) - Specified by:
updateWithUnsafeFunction
in interfaceCTService<UserGroupRole>
- Throws:
E extends Throwable
-