@NoRepositoryBean
public interface JpaRepository<T,ID>
extends org.springframework.data.repository.PagingAndSortingRepository<T,ID>, org.springframework.data.repository.query.QueryByExampleExecutor<T>
Repository
.Modifier and Type | Method and Description |
---|---|
void |
deleteAllInBatch()
Deletes all entities in a batch call.
|
void |
deleteInBatch(Iterable<T> entities)
Deletes the given entities in a batch which means it will create a single
Query . |
List<T> |
findAll() |
<S extends T> |
findAll(org.springframework.data.domain.Example<S> example) |
<S extends T> |
findAll(org.springframework.data.domain.Example<S> example,
org.springframework.data.domain.Sort sort) |
List<T> |
findAll(org.springframework.data.domain.Sort sort) |
List<T> |
findAllById(Iterable<ID> ids) |
void |
flush()
Flushes all pending changes to the database.
|
T |
getOne(ID id)
Returns a reference to the entity with the given identifier.
|
<S extends T> |
saveAll(Iterable<S> entities) |
<S extends T> |
saveAndFlush(S entity)
Saves an entity and flushes changes instantly.
|
findAll
void flush()
<S extends T> S saveAndFlush(S entity)
entity
- void deleteInBatch(Iterable<T> entities)
Query
. Assume that we will clear
the EntityManager
after the call.entities
- void deleteAllInBatch()
T getOne(ID id)
id
- must not be null.javax.persistence.EntityNotFoundException
- if no entity exists for given id
.EntityManager.getReference(Class, Object)
<S extends T> List<S> findAll(org.springframework.data.domain.Example<S> example)
findAll
in interface org.springframework.data.repository.query.QueryByExampleExecutor<T>
Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.