org.springframework.data.jdbc.repository.support

## 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>, Repository<T,ID>

    @Transactional(readOnly=true)
    public class SimpleJdbcRepository<T,ID>
    extends Object
    implements PagingAndSortingRepository<T,ID>

Default implementation of the `CrudRepository` interface.

Author:
  Jens Schauder, Oliver Gierke, Milan Milanov

### Constructor Summary

Constructors
Constructor and Description
`SimpleJdbcRepository(JdbcAggregateOperations entityOperations, PersistentEntity<T,?> entity)`

### Method Summary

All Methods Instance Methods Concrete Methods
`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> S` `save(S instance)`
`<S extends T> Iterable<S>` `saveAll(Iterable<S> entities)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### SimpleJdbcRepository

    public SimpleJdbcRepository(JdbcAggregateOperations entityOperations,
                                PersistentEntity<T,?> entity)

### Method Detail

#### save

    @Transactional
    public <S extends T> S save(S instance)

Specified by:
  `save` in interface `CrudRepository<T,ID>`

#### saveAll

    @Transactional
    public <S extends T> Iterable<S> saveAll(Iterable<S> entities)

Specified by:
  `saveAll` in interface `CrudRepository<T,ID>`

#### findById

    public Optional<T> findById(ID id)

Specified by:
  `findById` in interface `CrudRepository<T,ID>`

#### existsById

    public boolean existsById(ID id)

Specified by:
  `existsById` in interface `CrudRepository<T,ID>`

#### findAll

    public Iterable<T> findAll()

Specified by:
  `findAll` in interface `CrudRepository<T,ID>`

#### findAllById

    public Iterable<T> findAllById(Iterable<ID> ids)

Specified by:
  `findAllById` in interface `CrudRepository<T,ID>`

#### count

    public long count()

Specified by:
  `count` in interface `CrudRepository<T,ID>`

#### deleteById

    @Transactional
    public void deleteById(ID id)

Specified by:
  `deleteById` in interface `CrudRepository<T,ID>`

#### delete

    @Transactional
    public void delete(T instance)

Specified by:
  `delete` in interface `CrudRepository<T,ID>`

#### deleteAll

    @Transactional
    public void deleteAll(Iterable<? extends T> entities)

Specified by:
  `deleteAll` in interface `CrudRepository<T,ID>`

#### deleteAll

    @Transactional
    public void deleteAll()

Specified by:
  `deleteAll` in interface `CrudRepository<T,ID>`

#### findAll

    public Iterable<T> findAll(Sort sort)

Specified by:
  `findAll` in interface `PagingAndSortingRepository<T,ID>`

#### findAll

    public Page<T> findAll(Pageable pageable)

Specified by:
  `findAll` in interface `PagingAndSortingRepository<T,ID>`