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 ofUserRole.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanexistsByParentRoleIdAndArchivedFalse(String parentRoleId)Returns whether or not there exists at least oneUserRolewhich is notUserRole.archivedwho has aUserRole.parentRoleIdvalue equal to the given value.List<D>findAllByIdInAndArchivedFalse(Collection<String> ids)Finds and returns a list of entities that are notUserRole.archivedand whose id matches one of the given values.org.springframework.data.domain.Page<D>findAllByNameContainingIgnoreCaseAndArchivedFalse(String name, org.springframework.data.domain.Pageable page)Finds and returns all entities that are notUserRole.archivedwhose name contains the given value.Stream<D>findAllStreamByIdInAndArchivedFalse(Collection<String> ids)Finds and returns a stream of entities that are notUserRole.archivedand whose id matches one of the given values.Optional<D>findByIdAndArchivedFalse(String id)Finds and returns the entity with the given ID if notUserRole.archived.-
Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteById, existsById, findAll, findAllById, findById, save, saveAll
-
Methods inherited from interface com.broadleafcommerce.auth.security.repository.CustomizedRoleRepository
createOnlyIfDoesNotExist, replaceOnlyIfLastUpdatedBefore
-
-
-
-
Method Detail
-
findByIdAndArchivedFalse
Optional<D> findByIdAndArchivedFalse(String id)
Finds and returns the entity with the given ID if notUserRole.archived.- Parameters:
id- the id of the entity to find- Returns:
- an
Optionalcontaining the entity if found,Optional.empty()otherwise
-
findAllByNameContainingIgnoreCaseAndArchivedFalse
org.springframework.data.domain.Page<D> findAllByNameContainingIgnoreCaseAndArchivedFalse(String name, org.springframework.data.domain.Pageable page)
Finds and returns all entities that are notUserRole.archivedwhose name contains the given value.- Parameters:
name- the name value to match withpage- 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 notUserRole.archivedand 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 notUserRole.archivedand 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 oneUserRolewhich is notUserRole.archivedwho has aUserRole.parentRoleIdvalue 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 againstUserRole.parentRoleId- Returns:
trueif a record matching the criteria was found,falseotherwise
-
-