E
- The entity typeID
- The ID typepublic interface JpaRepository<E,ID> extends CrudRepository<E,ID>, PageableRepository<E,ID>
CrudRepository
and PageableRepository
.Modifier and Type | Method and Description |
---|---|
java.util.List<E> |
findAll()
Returns all instances of the type.
|
java.util.List<E> |
findAll(Sort sort)
Find all results for the given sort order.
|
void |
flush()
Adds a flush method.
|
<S extends E> |
load(@NotNull java.io.Serializable id)
Adds a load method.
|
<S extends E> |
saveAll(@Valid @NotNull java.lang.Iterable<S> entities)
Saves all given entities, possibly returning new instances representing the saved state.
|
<S extends E> |
saveAndFlush(S entity)
Save and perform a flush() of any pending operations.
|
findAll
count, delete, deleteAll, deleteAll, deleteById, existsById, findById, save, update, updateAll
@NonNull <S extends E> java.util.List<S> saveAll(@NonNull @Valid @NotNull @Valid @NotNull java.lang.Iterable<S> entities)
CrudRepository
saveAll
in interface CrudRepository<E,ID>
S
- The generic typeentities
- The entities to saved. Must not be null.@NonNull java.util.List<E> findAll()
CrudRepository
findAll
in interface CrudRepository<E,ID>
@NonNull java.util.List<E> findAll(@NonNull Sort sort)
PageableRepository
findAll
in interface PageableRepository<E,ID>
sort
- The sort@QueryHint(name="javax.persistence.FlushModeType", value="AUTO") <S extends E> S saveAndFlush(@NonNull @Valid @NotNull S entity)
S
- The entity generic typeentity
- The entityvoid flush()
<S extends E> S load(@NonNull @NotNull @NotNull java.io.Serializable id)
S
- the entity typeid
- the entity ID