@Transactional(readOnly=true) public class SimpleJdbcRepository<T,ID> extends Object implements PagingAndSortingRepository<T,ID>
CrudRepository
interface.Constructor and Description |
---|
SimpleJdbcRepository(@NonNull JdbcAggregateOperations entityOperations,
@NonNull PersistentEntity<T,?> entity) |
Modifier and Type | Method and Description |
---|---|
long |
count() |
void |
delete(T instance) |
void |
deleteAll() |
void |
deleteAll(Iterable<? extends T> entities) |
void |
deleteById(ID id) |
boolean |
existsById(ID id) |
Iterable<T> |
findAll() |
Page<T> |
findAll(Pageable pageable) |
Iterable<T> |
findAll(Sort sort) |
Iterable<T> |
findAllById(Iterable<ID> ids) |
Optional<T> |
findById(ID id) |
<S extends T> |
save(S instance) |
<S extends T> |
saveAll(Iterable<S> entities) |
public SimpleJdbcRepository(@NonNull @NonNull JdbcAggregateOperations entityOperations, @NonNull @NonNull PersistentEntity<T,?> entity)
@Transactional public <S extends T> S save(S instance)
save
in interface CrudRepository<T,ID>
@Transactional public <S extends T> Iterable<S> saveAll(Iterable<S> entities)
saveAll
in interface CrudRepository<T,ID>
public Optional<T> findById(ID id)
findById
in interface CrudRepository<T,ID>
public boolean existsById(ID id)
existsById
in interface CrudRepository<T,ID>
public Iterable<T> findAllById(Iterable<ID> ids)
findAllById
in interface CrudRepository<T,ID>
public long count()
count
in interface CrudRepository<T,ID>
@Transactional public void deleteById(ID id)
deleteById
in interface CrudRepository<T,ID>
@Transactional public void delete(T instance)
delete
in interface CrudRepository<T,ID>
@Transactional public void deleteAll(Iterable<? extends T> entities)
deleteAll
in interface CrudRepository<T,ID>
@Transactional public void deleteAll()
deleteAll
in interface CrudRepository<T,ID>
public Iterable<T> findAll(Sort sort)
findAll
in interface PagingAndSortingRepository<T,ID>
Copyright © 2017–2020 Pivotal Software, Inc.. All rights reserved.