@NoRepositoryBean public interface RoleRepository<D> extends org.springframework.data.repository.CrudRepository<D,String>, CustomizedRoleRepository<D>
UserRole
.Modifier and Type | Method and Description |
---|---|
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. |
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. |
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. |
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. |
Optional<D> |
findByIdAndArchivedFalse(String id)
Finds and returns the entity with the given ID if not
UserRole.archived . |
count, delete, deleteAll, deleteAll, deleteById, existsById, findAll, findAllById, findById, save, saveAll
createOnlyIfDoesNotExist, replaceOnlyIfLastUpdatedBefore
Optional<D> findByIdAndArchivedFalse(String id)
UserRole.archived
.id
- the id of the entity to findOptional
containing the entity if found, Optional.empty()
otherwiseorg.springframework.data.domain.Page<D> findAllByNameContainingIgnoreCaseAndArchivedFalse(String name, org.springframework.data.domain.Pageable page)
UserRole.archived
whose name contains the
given value.name
- the name value to match withpage
- information about which page of results to return from the databaseStream<D> findAllStreamByIdInAndArchivedFalse(Collection<String> ids)
UserRole.archived
and whose id
matches one of the given values.ids
- the ids of the entities to findList<D> findAllByIdInAndArchivedFalse(Collection<String> ids)
UserRole.archived
and whose id
matches one of the given values.ids
- the ids of the entities to findboolean existsByParentRoleIdAndArchivedFalse(String parentRoleId)
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.
parentRoleId
- the value to match against UserRole.parentRoleId
true
if a record matching the criteria was found, false
otherwiseCopyright © 2021. All rights reserved.