@NoRepositoryBean
public interface ReadOnlyRepository<T,ID>
extends org.springframework.data.repository.Repository<T,ID>
| Modifier and Type | Method and Description |
|---|---|
long |
count()
Returns the number of entities available.
|
boolean |
existsById(ID id)
Returns whether an entity with the given id exists.
|
Iterable<T> |
findAll()
Returns all instances of the type.
|
Iterable<T> |
findAllById(Iterable<ID> ids)
Returns all instances of the type with the given IDs.
|
Optional<T> |
findById(ID id)
Retrieves an entity by its id.
|
Optional<T> findById(ID id)
id - must not be null.IllegalArgumentException - if id is null.boolean existsById(ID id)
id - must not be null.IllegalArgumentException - if id is null.Iterable<T> findAllById(Iterable<ID> ids)
ids - entity idslong count()
Copyright © 2019. All rights reserved.