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 Details

    • findByIdAndArchivedFalse

      Optional<D> findByIdAndArchivedFalse(String id)
      Finds and returns the entity with the given ID if not UserRole.archived.
      Parameters:
      id - the id of the entity to find
      Returns:
      an Optional containing the entity if found, Optional.empty() otherwise
    • findAllByNameContainingIgnoreCaseAndArchivedFalse

      @Deprecated 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. This method is deprecated.
      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
    • findAllByNameContainingIgnoreCaseAndArchivedFalseAndAccountRoleEquals

      org.springframework.data.domain.Page<D> findAllByNameContainingIgnoreCaseAndArchivedFalseAndAccountRoleEquals(String name, boolean accountRole, org.springframework.data.domain.Pageable page)
      Finds and returns all entities that are not UserRole.archived whose name contains the given value and whose accountRole flag is true or false. See UserRole.accountRole
      Parameters:
      name - the name value to match with
      page - information about which page of results to return from the database
      accountRole - Find entities
      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
    • findAllByAccountRoleTrueAndArchivedFalse

      org.springframework.data.domain.Page<D> findAllByAccountRoleTrueAndArchivedFalse(org.springframework.data.domain.Pageable page)
      Finds and returns all entities whose UserRole.accountRole flag is true and are not UserRole.archived.
      Parameters:
      page - information about which page of results to return from the database
      Returns:
      all entities with accountRole is true and are not archived.
    • findAllByAccountRoleTrueAndArchivedFalse

      List<D> findAllByAccountRoleTrueAndArchivedFalse()
      Finds and returns all entities whose UserRole.accountRole flag is true and are not UserRole.archived.
      Returns:
      all entities with accountRole is true and are not archived.