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 Summary
Modifier and TypeMethodDescriptionbooleanexistsByParentRoleIdAndArchivedFalse(String parentRoleId) Returns whether or not there exists at least oneUserRolewhich is notUserRole.archivedwho has aUserRole.parentRoleIdvalue equal to the given value.Finds and returns all entities whoseUserRole.accountRoleflag is true and are notUserRole.archived.org.springframework.data.domain.Page<D>findAllByAccountRoleTrueAndArchivedFalse(org.springframework.data.domain.Pageable page) Finds and returns all entities whoseUserRole.accountRoleflag is true and are notUserRole.archived.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) Deprecated.org.springframework.data.domain.Page<D>findAllByNameContainingIgnoreCaseAndArchivedFalseAndAccountRoleEquals(String name, boolean accountRole, org.springframework.data.domain.Pageable page) Finds and returns all entities that are notUserRole.archivedwhose name contains the given value and whose accountRole flag is true or false.Finds and returns a stream of entities that are notUserRole.archivedand whose id matches one of the given values.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, deleteAllById, deleteById, existsById, findAll, findAllById, findById, save, saveAllMethods inherited from interface com.broadleafcommerce.auth.security.repository.CustomizedRoleRepository
createOnlyIfDoesNotExist, replaceOnlyIfLastUpdatedBeforeMethods inherited from interface com.broadleafcommerce.common.extension.DomainTypeAware
getDomainType
-
Method Details
-
findByIdAndArchivedFalse
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
@Deprecated org.springframework.data.domain.Page<D> findAllByNameContainingIgnoreCaseAndArchivedFalse(String name, org.springframework.data.domain.Pageable page) Deprecated.Finds and returns all entities that are notUserRole.archivedwhose name contains the given value. This method is deprecated.- 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
-
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 notUserRole.archivedwhose name contains the given value and whose accountRole flag is true or false. SeeUserRole.accountRole- Parameters:
name- the name value to match withpage- information about which page of results to return from the databaseaccountRole- Find entities- Returns:
- all entities that are not archived whose name matches the given value
-
findAllStreamByIdInAndArchivedFalse
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
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
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
-
findAllByAccountRoleTrueAndArchivedFalse
org.springframework.data.domain.Page<D> findAllByAccountRoleTrueAndArchivedFalse(org.springframework.data.domain.Pageable page) Finds and returns all entities whoseUserRole.accountRoleflag is true and are notUserRole.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
Finds and returns all entities whoseUserRole.accountRoleflag is true and are notUserRole.archived.- Returns:
- all entities with accountRole is true and are not archived.
-
findAllByNameContainingIgnoreCaseAndArchivedFalseAndAccountRoleEquals(String, boolean, Pageable)