Interface RoleRepository<D>

  • All Superinterfaces:
    org.springframework.data.repository.CrudRepository<D,​String>, CustomizedRoleRepository<D>, com.broadleafcommerce.common.extension.DomainTypeAware, org.springframework.data.repository.Repository<D,​String>
    All Known Subinterfaces:
    JpaRoleRepository<D>

    @NoRepositoryBean
    public interface RoleRepository<D>
    extends org.springframework.data.repository.CrudRepository<D,​String>, CustomizedRoleRepository<D>
    Repository for persisted counterparts of UserRole.
    • Method Detail

      • findAllByNameContainingIgnoreCaseAndArchivedFalse

        org.springframework.data.domain.Page<D> findAllByNameContainingIgnoreCaseAndArchivedFalse​(String name,
                                                                                                  org.springframework.data.domain.Pageable page)
        Finds and returns all entities that are not UserRole.archived whose name contains the given value.
        Parameters:
        name - the name value to match with
        page - information about which page of results to return from the database
        Returns:
        all entities that are not archived whose name matches the given value
      • findAllStreamByIdInAndArchivedFalse

        Stream<D> findAllStreamByIdInAndArchivedFalse​(Collection<String> ids)
        Finds and returns a stream of entities that are not UserRole.archived and whose id matches one of the given values.
        Parameters:
        ids - the ids of the entities to find
        Returns:
        a stream of the entities that were found
      • findAllByIdInAndArchivedFalse

        List<D> findAllByIdInAndArchivedFalse​(Collection<String> ids)
        Finds and returns a list of entities that are not UserRole.archived and whose id matches one of the given values.
        Parameters:
        ids - the ids of the entities to find
        Returns:
        a list of the entities that were found
      • existsByParentRoleIdAndArchivedFalse

        boolean existsByParentRoleIdAndArchivedFalse​(String parentRoleId)
        Returns whether or not there exists at least one UserRole which is not UserRole.archived who has a UserRole.parentRoleId value equal to the given value.

        In other words, checks if the role with the given id has any non-archived children in the data store.

        Parameters:
        parentRoleId - the value to match against UserRole.parentRoleId
        Returns:
        true if a record matching the criteria was found, false otherwise