Class RoleLocalServiceBaseImpl

Object
com.liferay.portal.kernel.service.BaseLocalServiceImpl
com.liferay.portal.service.base.RoleLocalServiceBaseImpl
All Implemented Interfaces:
com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService, com.liferay.portal.kernel.service.BaseLocalService, com.liferay.portal.kernel.service.change.tracking.CTService<com.liferay.portal.kernel.model.Role>, com.liferay.portal.kernel.service.PersistedModelLocalService, com.liferay.portal.kernel.service.RoleLocalService
Direct Known Subclasses:
RoleLocalServiceImpl

public abstract class RoleLocalServiceBaseImpl extends com.liferay.portal.kernel.service.BaseLocalServiceImpl implements com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService, com.liferay.portal.kernel.service.RoleLocalService
Provides the base implementation for the role local service.

This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in RoleLocalServiceImpl.

Author:
Brian Wing Shun Chan
See Also:
{$generated.description}
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected com.liferay.counter.kernel.service.CounterLocalService
     
    protected com.liferay.portal.kernel.service.persistence.GroupPersistence
     
    protected com.liferay.portal.kernel.service.persistence.RoleFinder
     
    protected com.liferay.portal.kernel.service.RoleLocalService
     
    protected com.liferay.portal.kernel.service.persistence.RolePersistence
     
    protected com.liferay.portal.kernel.service.persistence.UserPersistence
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    addGroupRole(long groupId, long roleId)
     
    boolean
    addGroupRole(long groupId, com.liferay.portal.kernel.model.Role role)
     
    boolean
    addGroupRoles(long groupId, long[] roleIds)
     
    boolean
    addGroupRoles(long groupId, List<com.liferay.portal.kernel.model.Role> roles)
     
    com.liferay.portal.kernel.model.Role
    addRole(com.liferay.portal.kernel.model.Role role)
    Adds the role to the database.
    boolean
    addUserRole(long userId, long roleId)
     
    boolean
    addUserRole(long userId, com.liferay.portal.kernel.model.Role role)
     
    boolean
    addUserRoles(long userId, long[] roleIds)
     
    boolean
    addUserRoles(long userId, List<com.liferay.portal.kernel.model.Role> roles)
     
    void
     
    void
    clearGroupRoles(long groupId)
     
    void
    clearUserRoles(long userId)
     
    com.liferay.portal.kernel.model.PersistedModel
     
    com.liferay.portal.kernel.model.Role
    createRole(long roleId)
    Creates a new role with the primary key.
    void
    deleteGroupRole(long groupId, long roleId)
     
    void
    deleteGroupRole(long groupId, com.liferay.portal.kernel.model.Role role)
     
    void
    deleteGroupRoles(long groupId, long[] roleIds)
     
    void
    deleteGroupRoles(long groupId, List<com.liferay.portal.kernel.model.Role> roles)
     
    com.liferay.portal.kernel.model.PersistedModel
    deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel)
     
    com.liferay.portal.kernel.model.Role
    deleteRole(long roleId)
    Deletes the role with the primary key from the database.
    com.liferay.portal.kernel.model.Role
    deleteRole(com.liferay.portal.kernel.model.Role role)
    Deletes the role from the database.
    void
    deleteUserRole(long userId, long roleId)
     
    void
    deleteUserRole(long userId, com.liferay.portal.kernel.model.Role role)
     
    void
    deleteUserRoles(long userId, long[] roleIds)
     
    void
    deleteUserRoles(long userId, List<com.liferay.portal.kernel.model.Role> roles)
     
    void
     
    <T> T
    dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
     
    int
    dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
     
    com.liferay.portal.kernel.dao.orm.DynamicQuery
     
    <T> List<T>
    dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
    Performs a dynamic query on the database and returns the matching rows.
    <T> List<T>
    dynamicQuery(com.liferay.portal.kernel.dao.orm.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(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator)
    Performs a dynamic query on the database and returns an ordered range of the matching rows.
    long
    dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
    Returns the number of rows matching the dynamic query.
    long
    dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, com.liferay.portal.kernel.dao.orm.Projection projection)
    Returns the number of rows matching the dynamic query.
    com.liferay.portal.kernel.model.Role
    fetchRole(long roleId)
     
    com.liferay.portal.kernel.model.Role
    fetchRoleByExternalReferenceCode(String externalReferenceCode, long companyId)
     
    com.liferay.portal.kernel.model.Role
    fetchRoleByUuidAndCompanyId(String uuid, long companyId)
    Returns the role with the matching UUID and company.
    com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery
     
    com.liferay.portal.kernel.service.persistence.BasePersistence<com.liferay.portal.kernel.model.Role>
     
    com.liferay.counter.kernel.service.CounterLocalService
    Returns the counter local service.
    com.liferay.portal.kernel.service.persistence.change.tracking.CTPersistence<com.liferay.portal.kernel.model.Role>
     
    com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery
    getExportActionableDynamicQuery(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext)
     
    long[]
    getGroupPrimaryKeys(long roleId)
    Returns the groupIds of the groups associated with the role.
    List<com.liferay.portal.kernel.model.Role>
    getGroupRoles(long groupId)
     
    List<com.liferay.portal.kernel.model.Role>
    getGroupRoles(long groupId, int start, int end)
     
    List<com.liferay.portal.kernel.model.Role>
    getGroupRoles(long groupId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Role> orderByComparator)
     
    int
    getGroupRolesCount(long groupId)
     
    com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery
     
    Class<com.liferay.portal.kernel.model.Role>
     
    protected String
     
    Returns the OSGi service identifier.
    com.liferay.portal.kernel.model.PersistedModel
     
    com.liferay.portal.kernel.model.Role
    getRole(long roleId)
    Returns the role with the primary key.
    com.liferay.portal.kernel.model.Role
    getRoleByExternalReferenceCode(String externalReferenceCode, long companyId)
     
    com.liferay.portal.kernel.model.Role
    getRoleByUuidAndCompanyId(String uuid, long companyId)
    Returns the role with the matching UUID and company.
    com.liferay.portal.kernel.service.persistence.RoleFinder
    Returns the role finder.
    com.liferay.portal.kernel.service.RoleLocalService
    Returns the role local service.
    com.liferay.portal.kernel.service.persistence.RolePersistence
    Returns the role persistence.
    List<com.liferay.portal.kernel.model.Role>
    getRoles(int start, int end)
    Returns a range of all the roles.
    int
    Returns the number of roles.
    long[]
    getUserPrimaryKeys(long roleId)
    Returns the userIds of the users associated with the role.
    List<com.liferay.portal.kernel.model.Role>
    getUserRoles(long userId)
     
    List<com.liferay.portal.kernel.model.Role>
    getUserRoles(long userId, int start, int end)
     
    List<com.liferay.portal.kernel.model.Role>
    getUserRoles(long userId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Role> orderByComparator)
     
    int
    getUserRolesCount(long userId)
     
    boolean
    hasGroupRole(long groupId, long roleId)
     
    boolean
    hasGroupRoles(long groupId)
     
    boolean
    hasUserRole(long userId, long roleId)
     
    boolean
    hasUserRoles(long userId)
     
    protected void
    initActionableDynamicQuery(com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery actionableDynamicQuery)
     
    protected void
    Performs a SQL query.
    void
    setCounterLocalService(com.liferay.counter.kernel.service.CounterLocalService counterLocalService)
    Sets the counter local service.
    void
    setGroupRoles(long groupId, long[] roleIds)
     
    void
    setRoleFinder(com.liferay.portal.kernel.service.persistence.RoleFinder roleFinder)
    Sets the role finder.
    void
    setRoleLocalService(com.liferay.portal.kernel.service.RoleLocalService roleLocalService)
    Sets the role local service.
    void
    setRolePersistence(com.liferay.portal.kernel.service.persistence.RolePersistence rolePersistence)
    Sets the role persistence.
    void
    setUserRoles(long userId, long[] roleIds)
     
    com.liferay.portal.kernel.model.Role
    updateRole(com.liferay.portal.kernel.model.Role role)
    Updates the role in the database or adds it if it does not yet exist.
    <R, E extends Throwable>
    R
    updateWithUnsafeFunction(com.liferay.petra.function.UnsafeFunction<com.liferay.portal.kernel.service.persistence.change.tracking.CTPersistence<com.liferay.portal.kernel.model.Role>,R,E> updateUnsafeFunction)
     

    Methods inherited from class com.liferay.portal.kernel.service.BaseLocalServiceImpl

    getClassLoader, getLocalizationMap

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.liferay.portal.kernel.service.PersistedModelLocalService

    fetchPersistedModel

    Methods inherited from interface com.liferay.portal.kernel.service.RoleLocalService

    addRole, checkSystemRoles, checkSystemRoles, fetchRole, getAssigneesTotal, getDefaultGroupRole, getGroupRelatedRoles, getGroupRolesAndTeamRoles, getGroupRolesAndTeamRolesCount, getResourceRoles, getResourceRoles, getRole, getRoles, getRoles, getRoles, getRoles, getRoles, getSubtypeRoles, getSubtypeRolesCount, getTeamRole, getTeamRoleMap, getTeamRoles, getTeamRoles, getTeamsRoles, getTypeRoles, getTypeRoles, getTypeRolesCount, getUserGroupGroupRoles, getUserGroupGroupRoles, getUserGroupGroupRolesCount, getUserGroupRoles, getUserRelatedRoles, getUserRelatedRoles, getUserRelatedRoles, getUserTeamRoles, hasUserRole, hasUserRoles, search, search, search, search, searchCount, searchCount, searchCount, searchCount, unsetUserRoles, updateExternalReferenceCode, updateExternalReferenceCode, updateRole, validateName
  • Field Details

    • roleLocalService

      @BeanReference(type=com.liferay.portal.kernel.service.RoleLocalService.class) protected com.liferay.portal.kernel.service.RoleLocalService roleLocalService
    • rolePersistence

      @BeanReference(type=com.liferay.portal.kernel.service.persistence.RolePersistence.class) protected com.liferay.portal.kernel.service.persistence.RolePersistence rolePersistence
    • roleFinder

      @BeanReference(type=com.liferay.portal.kernel.service.persistence.RoleFinder.class) protected com.liferay.portal.kernel.service.persistence.RoleFinder roleFinder
    • counterLocalService

      @BeanReference(type=com.liferay.counter.kernel.service.CounterLocalService.class) protected com.liferay.counter.kernel.service.CounterLocalService counterLocalService
    • groupPersistence

      @BeanReference(type=com.liferay.portal.kernel.service.persistence.GroupPersistence.class) protected com.liferay.portal.kernel.service.persistence.GroupPersistence groupPersistence
    • userPersistence

      @BeanReference(type=com.liferay.portal.kernel.service.persistence.UserPersistence.class) protected com.liferay.portal.kernel.service.persistence.UserPersistence userPersistence
  • Constructor Details

    • RoleLocalServiceBaseImpl

      public RoleLocalServiceBaseImpl()
  • Method Details

    • addRole

      @Indexable(type=REINDEX) public com.liferay.portal.kernel.model.Role addRole(com.liferay.portal.kernel.model.Role role)
      Adds the role to the database. Also notifies the appropriate model listeners.

      Important: Inspect RoleLocalServiceImpl 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.

      Specified by:
      addRole in interface com.liferay.portal.kernel.service.RoleLocalService
      Parameters:
      role - the role
      Returns:
      the role that was added
    • createRole

      @Transactional(enabled=false) public com.liferay.portal.kernel.model.Role createRole(long roleId)
      Creates a new role with the primary key. Does not add the role to the database.
      Specified by:
      createRole in interface com.liferay.portal.kernel.service.RoleLocalService
      Parameters:
      roleId - the primary key for the new role
      Returns:
      the new role
    • deleteRole

      @Indexable(type=DELETE) public com.liferay.portal.kernel.model.Role deleteRole(long roleId) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the role with the primary key from the database. Also notifies the appropriate model listeners.

      Important: Inspect RoleLocalServiceImpl 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.

      Specified by:
      deleteRole in interface com.liferay.portal.kernel.service.RoleLocalService
      Parameters:
      roleId - the primary key of the role
      Returns:
      the role that was removed
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a role with the primary key could not be found
    • deleteRole

      @Indexable(type=DELETE) public com.liferay.portal.kernel.model.Role deleteRole(com.liferay.portal.kernel.model.Role role) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the role from the database. Also notifies the appropriate model listeners.

      Important: Inspect RoleLocalServiceImpl 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.

      Specified by:
      deleteRole in interface com.liferay.portal.kernel.service.RoleLocalService
      Parameters:
      role - the role
      Returns:
      the role that was removed
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • dslQuery

      public <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
      Specified by:
      dslQuery in interface com.liferay.portal.kernel.service.PersistedModelLocalService
      Specified by:
      dslQuery in interface com.liferay.portal.kernel.service.RoleLocalService
    • dslQueryCount

      public int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
      Specified by:
      dslQueryCount in interface com.liferay.portal.kernel.service.PersistedModelLocalService
      Specified by:
      dslQueryCount in interface com.liferay.portal.kernel.service.RoleLocalService
    • dynamicQuery

      public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery()
      Specified by:
      dynamicQuery in interface com.liferay.portal.kernel.service.RoleLocalService
    • dynamicQuery

      public <T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
      Performs a dynamic query on the database and returns the matching rows.
      Specified by:
      dynamicQuery in interface com.liferay.portal.kernel.service.RoleLocalService
      Parameters:
      dynamicQuery - the dynamic query
      Returns:
      the matching rows
    • dynamicQuery

      public <T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.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 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.RoleModelImpl.

      Specified by:
      dynamicQuery in interface com.liferay.portal.kernel.service.RoleLocalService
      Parameters:
      dynamicQuery - the dynamic query
      start - the lower bound of the range of model instances
      end - the upper bound of the range of model instances (not inclusive)
      Returns:
      the range of matching rows
    • dynamicQuery

      public <T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.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 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.RoleModelImpl.

      Specified by:
      dynamicQuery in interface com.liferay.portal.kernel.service.RoleLocalService
      Parameters:
      dynamicQuery - the dynamic query
      start - the lower bound of the range of model instances
      end - the upper bound of the range of model instances (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the ordered range of matching rows
    • dynamicQueryCount

      public long dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
      Returns the number of rows matching the dynamic query.
      Specified by:
      dynamicQueryCount in interface com.liferay.portal.kernel.service.RoleLocalService
      Parameters:
      dynamicQuery - the dynamic query
      Returns:
      the number of rows matching the dynamic query
    • dynamicQueryCount

      public long dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, com.liferay.portal.kernel.dao.orm.Projection projection)
      Returns the number of rows matching the dynamic query.
      Specified by:
      dynamicQueryCount in interface com.liferay.portal.kernel.service.RoleLocalService
      Parameters:
      dynamicQuery - the dynamic query
      projection - the projection to apply to the query
      Returns:
      the number of rows matching the dynamic query
    • fetchRole

      public com.liferay.portal.kernel.model.Role fetchRole(long roleId)
      Specified by:
      fetchRole in interface com.liferay.portal.kernel.service.RoleLocalService
    • fetchRoleByUuidAndCompanyId

      public com.liferay.portal.kernel.model.Role fetchRoleByUuidAndCompanyId(String uuid, long companyId)
      Returns the role with the matching UUID and company.
      Specified by:
      fetchRoleByUuidAndCompanyId in interface com.liferay.portal.kernel.service.RoleLocalService
      Parameters:
      uuid - the role's UUID
      companyId - the primary key of the company
      Returns:
      the matching role, or null if a matching role could not be found
    • fetchRoleByExternalReferenceCode

      public com.liferay.portal.kernel.model.Role fetchRoleByExternalReferenceCode(String externalReferenceCode, long companyId)
      Specified by:
      fetchRoleByExternalReferenceCode in interface com.liferay.portal.kernel.service.RoleLocalService
    • getRoleByExternalReferenceCode

      public com.liferay.portal.kernel.model.Role getRoleByExternalReferenceCode(String externalReferenceCode, long companyId) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getRoleByExternalReferenceCode in interface com.liferay.portal.kernel.service.RoleLocalService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getRole

      public com.liferay.portal.kernel.model.Role getRole(long roleId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the role with the primary key.
      Specified by:
      getRole in interface com.liferay.portal.kernel.service.RoleLocalService
      Parameters:
      roleId - the primary key of the role
      Returns:
      the role
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a role with the primary key could not be found
    • getActionableDynamicQuery

      public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery()
      Specified by:
      getActionableDynamicQuery in interface com.liferay.portal.kernel.service.RoleLocalService
    • getIndexableActionableDynamicQuery

      public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
      Specified by:
      getIndexableActionableDynamicQuery in interface com.liferay.portal.kernel.service.RoleLocalService
    • initActionableDynamicQuery

      protected void initActionableDynamicQuery(com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery actionableDynamicQuery)
    • getExportActionableDynamicQuery

      public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext)
      Specified by:
      getExportActionableDynamicQuery in interface com.liferay.portal.kernel.service.RoleLocalService
    • createPersistedModel

      public com.liferay.portal.kernel.model.PersistedModel createPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      createPersistedModel in interface com.liferay.portal.kernel.service.PersistedModelLocalService
      Specified by:
      createPersistedModel in interface com.liferay.portal.kernel.service.RoleLocalService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deletePersistedModel

      public com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      deletePersistedModel in interface com.liferay.portal.kernel.service.PersistedModelLocalService
      Specified by:
      deletePersistedModel in interface com.liferay.portal.kernel.service.RoleLocalService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getBasePersistence

      public com.liferay.portal.kernel.service.persistence.BasePersistence<com.liferay.portal.kernel.model.Role> getBasePersistence()
      Specified by:
      getBasePersistence in interface com.liferay.portal.kernel.service.PersistedModelLocalService
    • getPersistedModel

      public com.liferay.portal.kernel.model.PersistedModel getPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getPersistedModel in interface com.liferay.portal.kernel.service.PersistedModelLocalService
      Specified by:
      getPersistedModel in interface com.liferay.portal.kernel.service.RoleLocalService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getRoleByUuidAndCompanyId

      public com.liferay.portal.kernel.model.Role getRoleByUuidAndCompanyId(String uuid, long companyId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the role with the matching UUID and company.
      Specified by:
      getRoleByUuidAndCompanyId in interface com.liferay.portal.kernel.service.RoleLocalService
      Parameters:
      uuid - the role's UUID
      companyId - the primary key of the company
      Returns:
      the matching role
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a matching role could not be found
    • getRoles

      public List<com.liferay.portal.kernel.model.Role> getRoles(int start, int end)
      Returns a range of all the 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 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.RoleModelImpl.

      Specified by:
      getRoles in interface com.liferay.portal.kernel.service.RoleLocalService
      Parameters:
      start - the lower bound of the range of roles
      end - the upper bound of the range of roles (not inclusive)
      Returns:
      the range of roles
    • getRolesCount

      public int getRolesCount()
      Returns the number of roles.
      Specified by:
      getRolesCount in interface com.liferay.portal.kernel.service.RoleLocalService
      Returns:
      the number of roles
    • updateRole

      @Indexable(type=REINDEX) public com.liferay.portal.kernel.model.Role updateRole(com.liferay.portal.kernel.model.Role role)
      Updates the role in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

      Important: Inspect RoleLocalServiceImpl 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.

      Specified by:
      updateRole in interface com.liferay.portal.kernel.service.RoleLocalService
      Parameters:
      role - the role
      Returns:
      the role that was updated
    • addGroupRole

      public boolean addGroupRole(long groupId, long roleId)
      Specified by:
      addGroupRole in interface com.liferay.portal.kernel.service.RoleLocalService
    • addGroupRole

      public boolean addGroupRole(long groupId, com.liferay.portal.kernel.model.Role role)
      Specified by:
      addGroupRole in interface com.liferay.portal.kernel.service.RoleLocalService
    • addGroupRoles

      public boolean addGroupRoles(long groupId, long[] roleIds)
      Specified by:
      addGroupRoles in interface com.liferay.portal.kernel.service.RoleLocalService
    • addGroupRoles

      public boolean addGroupRoles(long groupId, List<com.liferay.portal.kernel.model.Role> roles)
      Specified by:
      addGroupRoles in interface com.liferay.portal.kernel.service.RoleLocalService
    • clearGroupRoles

      public void clearGroupRoles(long groupId)
      Specified by:
      clearGroupRoles in interface com.liferay.portal.kernel.service.RoleLocalService
    • deleteGroupRole

      public void deleteGroupRole(long groupId, long roleId)
      Specified by:
      deleteGroupRole in interface com.liferay.portal.kernel.service.RoleLocalService
    • deleteGroupRole

      public void deleteGroupRole(long groupId, com.liferay.portal.kernel.model.Role role)
      Specified by:
      deleteGroupRole in interface com.liferay.portal.kernel.service.RoleLocalService
    • deleteGroupRoles

      public void deleteGroupRoles(long groupId, long[] roleIds)
      Specified by:
      deleteGroupRoles in interface com.liferay.portal.kernel.service.RoleLocalService
    • deleteGroupRoles

      public void deleteGroupRoles(long groupId, List<com.liferay.portal.kernel.model.Role> roles)
      Specified by:
      deleteGroupRoles in interface com.liferay.portal.kernel.service.RoleLocalService
    • getGroupPrimaryKeys

      public long[] getGroupPrimaryKeys(long roleId)
      Returns the groupIds of the groups associated with the role.
      Specified by:
      getGroupPrimaryKeys in interface com.liferay.portal.kernel.service.RoleLocalService
      Parameters:
      roleId - the roleId of the role
      Returns:
      long[] the groupIds of groups associated with the role
    • getGroupRoles

      public List<com.liferay.portal.kernel.model.Role> getGroupRoles(long groupId)
      Specified by:
      getGroupRoles in interface com.liferay.portal.kernel.service.RoleLocalService
    • getGroupRoles

      public List<com.liferay.portal.kernel.model.Role> getGroupRoles(long groupId, int start, int end)
      Specified by:
      getGroupRoles in interface com.liferay.portal.kernel.service.RoleLocalService
    • getGroupRoles

      public List<com.liferay.portal.kernel.model.Role> getGroupRoles(long groupId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Role> orderByComparator)
      Specified by:
      getGroupRoles in interface com.liferay.portal.kernel.service.RoleLocalService
    • getGroupRolesCount

      public int getGroupRolesCount(long groupId)
      Specified by:
      getGroupRolesCount in interface com.liferay.portal.kernel.service.RoleLocalService
    • hasGroupRole

      public boolean hasGroupRole(long groupId, long roleId)
      Specified by:
      hasGroupRole in interface com.liferay.portal.kernel.service.RoleLocalService
    • hasGroupRoles

      public boolean hasGroupRoles(long groupId)
      Specified by:
      hasGroupRoles in interface com.liferay.portal.kernel.service.RoleLocalService
    • setGroupRoles

      public void setGroupRoles(long groupId, long[] roleIds)
      Specified by:
      setGroupRoles in interface com.liferay.portal.kernel.service.RoleLocalService
    • addUserRole

      public boolean addUserRole(long userId, long roleId) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      addUserRole in interface com.liferay.portal.kernel.service.RoleLocalService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addUserRole

      public boolean addUserRole(long userId, com.liferay.portal.kernel.model.Role role) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      addUserRole in interface com.liferay.portal.kernel.service.RoleLocalService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addUserRoles

      public boolean addUserRoles(long userId, long[] roleIds) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      addUserRoles in interface com.liferay.portal.kernel.service.RoleLocalService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addUserRoles

      public boolean addUserRoles(long userId, List<com.liferay.portal.kernel.model.Role> roles) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      addUserRoles in interface com.liferay.portal.kernel.service.RoleLocalService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • clearUserRoles

      public void clearUserRoles(long userId) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      clearUserRoles in interface com.liferay.portal.kernel.service.RoleLocalService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteUserRole

      public void deleteUserRole(long userId, long roleId) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      deleteUserRole in interface com.liferay.portal.kernel.service.RoleLocalService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteUserRole

      public void deleteUserRole(long userId, com.liferay.portal.kernel.model.Role role) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      deleteUserRole in interface com.liferay.portal.kernel.service.RoleLocalService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteUserRoles

      public void deleteUserRoles(long userId, long[] roleIds) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      deleteUserRoles in interface com.liferay.portal.kernel.service.RoleLocalService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteUserRoles

      public void deleteUserRoles(long userId, List<com.liferay.portal.kernel.model.Role> roles) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      deleteUserRoles in interface com.liferay.portal.kernel.service.RoleLocalService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getUserPrimaryKeys

      public long[] getUserPrimaryKeys(long roleId)
      Returns the userIds of the users associated with the role.
      Specified by:
      getUserPrimaryKeys in interface com.liferay.portal.kernel.service.RoleLocalService
      Parameters:
      roleId - the roleId of the role
      Returns:
      long[] the userIds of users associated with the role
    • getUserRoles

      public List<com.liferay.portal.kernel.model.Role> getUserRoles(long userId)
      Specified by:
      getUserRoles in interface com.liferay.portal.kernel.service.RoleLocalService
    • getUserRoles

      public List<com.liferay.portal.kernel.model.Role> getUserRoles(long userId, int start, int end)
      Specified by:
      getUserRoles in interface com.liferay.portal.kernel.service.RoleLocalService
    • getUserRoles

      public List<com.liferay.portal.kernel.model.Role> getUserRoles(long userId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Role> orderByComparator)
      Specified by:
      getUserRoles in interface com.liferay.portal.kernel.service.RoleLocalService
    • getUserRolesCount

      public int getUserRolesCount(long userId)
      Specified by:
      getUserRolesCount in interface com.liferay.portal.kernel.service.RoleLocalService
    • hasUserRole

      public boolean hasUserRole(long userId, long roleId)
      Specified by:
      hasUserRole in interface com.liferay.portal.kernel.service.RoleLocalService
    • hasUserRoles

      public boolean hasUserRoles(long userId)
      Specified by:
      hasUserRoles in interface com.liferay.portal.kernel.service.RoleLocalService
    • setUserRoles

      public void setUserRoles(long userId, long[] roleIds) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      setUserRoles in interface com.liferay.portal.kernel.service.RoleLocalService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getRoleLocalService

      public com.liferay.portal.kernel.service.RoleLocalService getRoleLocalService()
      Returns the role local service.
      Returns:
      the role local service
    • setRoleLocalService

      public void setRoleLocalService(com.liferay.portal.kernel.service.RoleLocalService roleLocalService)
      Sets the role local service.
      Parameters:
      roleLocalService - the role local service
    • getRolePersistence

      public com.liferay.portal.kernel.service.persistence.RolePersistence getRolePersistence()
      Returns the role persistence.
      Returns:
      the role persistence
    • setRolePersistence

      public void setRolePersistence(com.liferay.portal.kernel.service.persistence.RolePersistence rolePersistence)
      Sets the role persistence.
      Parameters:
      rolePersistence - the role persistence
    • getRoleFinder

      public com.liferay.portal.kernel.service.persistence.RoleFinder getRoleFinder()
      Returns the role finder.
      Returns:
      the role finder
    • setRoleFinder

      public void setRoleFinder(com.liferay.portal.kernel.service.persistence.RoleFinder roleFinder)
      Sets the role finder.
      Parameters:
      roleFinder - the role finder
    • getCounterLocalService

      public com.liferay.counter.kernel.service.CounterLocalService getCounterLocalService()
      Returns the counter local service.
      Returns:
      the counter local service
    • setCounterLocalService

      public void setCounterLocalService(com.liferay.counter.kernel.service.CounterLocalService counterLocalService)
      Sets the counter local service.
      Parameters:
      counterLocalService - the counter local service
    • afterPropertiesSet

      public void afterPropertiesSet()
    • destroy

      public void destroy()
    • getOSGiServiceIdentifier

      public String getOSGiServiceIdentifier()
      Returns the OSGi service identifier.
      Specified by:
      getOSGiServiceIdentifier in interface com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService
      Specified by:
      getOSGiServiceIdentifier in interface com.liferay.portal.kernel.service.RoleLocalService
      Returns:
      the OSGi service identifier
    • getCTPersistence

      public com.liferay.portal.kernel.service.persistence.change.tracking.CTPersistence<com.liferay.portal.kernel.model.Role> getCTPersistence()
      Specified by:
      getCTPersistence in interface com.liferay.portal.kernel.service.change.tracking.CTService<com.liferay.portal.kernel.model.Role>
      Specified by:
      getCTPersistence in interface com.liferay.portal.kernel.service.RoleLocalService
    • getModelClass

      public Class<com.liferay.portal.kernel.model.Role> getModelClass()
      Specified by:
      getModelClass in interface com.liferay.portal.kernel.service.change.tracking.CTService<com.liferay.portal.kernel.model.Role>
      Specified by:
      getModelClass in interface com.liferay.portal.kernel.service.RoleLocalService
    • updateWithUnsafeFunction

      public <R, E extends Throwable> R updateWithUnsafeFunction(com.liferay.petra.function.UnsafeFunction<com.liferay.portal.kernel.service.persistence.change.tracking.CTPersistence<com.liferay.portal.kernel.model.Role>,R,E> updateUnsafeFunction) throws E
      Specified by:
      updateWithUnsafeFunction in interface com.liferay.portal.kernel.service.change.tracking.CTService<com.liferay.portal.kernel.model.Role>
      Specified by:
      updateWithUnsafeFunction in interface com.liferay.portal.kernel.service.RoleLocalService
      Throws:
      E extends Throwable
    • getModelClassName

      protected String getModelClassName()
    • runSQL

      protected void runSQL(String sql)
      Performs a SQL query.
      Parameters:
      sql - the sql query