Class SimpleJdbcRepository<T,ID>
java.lang.Object
org.springframework.data.jdbc.repository.support.SimpleJdbcRepository<T,ID>
- All Implemented Interfaces:
CrudRepository<T,
,ID> PagingAndSortingRepository<T,
,ID> QueryByExampleExecutor<T>
,Repository<T,
ID>
@Transactional(readOnly=true)
public class SimpleJdbcRepository<T,ID>
extends Object
implements CrudRepository<T,ID>, PagingAndSortingRepository<T,ID>, QueryByExampleExecutor<T>
Default implementation of the
CrudRepository
interface.- Author:
- Jens Schauder, Oliver Gierke, Milan Milanov, Chirag Tailor, Diego Krupitza, Dmitriy Kovalenko
-
Constructor Summary
ConstructorDescriptionSimpleJdbcRepository
(JdbcAggregateOperations entityOperations, PersistentEntity<T, ?> entity, JdbcConverter converter) -
Method Summary
Modifier and TypeMethodDescriptionlong
count()
<S extends T>
longvoid
void
void
void
deleteAllById
(Iterable<? extends ID> ids) void
deleteById
(ID id) <S extends T>
booleanboolean
existsById
(ID id) findAll()
findAllById
(Iterable<ID> ids) <S extends T,
R>
RfindBy
(Example<S> example, Function<FluentQuery.FetchableFluentQuery<S>, R> queryFunction) <S extends T>
Ssave
(S instance)
-
Constructor Details
-
SimpleJdbcRepository
public SimpleJdbcRepository(JdbcAggregateOperations entityOperations, PersistentEntity<T, ?> entity, JdbcConverter converter)
-
-
Method Details
-
save
- Specified by:
save
in interfaceCrudRepository<T,
ID>
-
saveAll
- Specified by:
saveAll
in interfaceCrudRepository<T,
ID>
-
findById
- Specified by:
findById
in interfaceCrudRepository<T,
ID>
-
existsById
- Specified by:
existsById
in interfaceCrudRepository<T,
ID>
-
findAll
- Specified by:
findAll
in interfaceCrudRepository<T,
ID>
-
findAllById
- Specified by:
findAllById
in interfaceCrudRepository<T,
ID>
-
count
public long count()- Specified by:
count
in interfaceCrudRepository<T,
ID>
-
deleteById
- Specified by:
deleteById
in interfaceCrudRepository<T,
ID>
-
delete
- Specified by:
delete
in interfaceCrudRepository<T,
ID>
-
deleteAllById
- Specified by:
deleteAllById
in interfaceCrudRepository<T,
ID>
-
deleteAll
- Specified by:
deleteAll
in interfaceCrudRepository<T,
ID>
-
deleteAll
- Specified by:
deleteAll
in interfaceCrudRepository<T,
ID>
-
findAll
- Specified by:
findAll
in interfacePagingAndSortingRepository<T,
ID>
-
findAll
- Specified by:
findAll
in interfacePagingAndSortingRepository<T,
ID>
-
findOne
- Specified by:
findOne
in interfaceQueryByExampleExecutor<T>
-
findAll
- Specified by:
findAll
in interfaceQueryByExampleExecutor<T>
-
findAll
- Specified by:
findAll
in interfaceQueryByExampleExecutor<T>
-
findAll
- Specified by:
findAll
in interfaceQueryByExampleExecutor<T>
-
count
- Specified by:
count
in interfaceQueryByExampleExecutor<T>
-
exists
- Specified by:
exists
in interfaceQueryByExampleExecutor<T>
-
findBy
public <S extends T,R> R findBy(Example<S> example, Function<FluentQuery.FetchableFluentQuery<S>, R> queryFunction) - Specified by:
findBy
in interfaceQueryByExampleExecutor<T>
-