public class BaseJpaRepositoryImpl<T,ID> extends org.springframework.data.jpa.repository.support.SimpleJpaRepository<T,ID> implements BaseJpaRepository<T,ID>
Constructor and Description |
---|
BaseJpaRepositoryImpl(org.springframework.data.jpa.repository.support.JpaEntityInformation<T,?> entityInformation,
javax.persistence.EntityManager entityManager) |
Modifier and Type | Method and Description |
---|---|
protected <R> R |
executeBatch(Supplier<R> callback) |
protected Integer |
getBatchSize(org.hibernate.Session session) |
T |
getReferenceById(ID id) |
T |
lockById(ID id,
javax.persistence.LockModeType lockMode)
Lock the entity with the provided identifier.
|
<S extends T> |
merge(S entity)
The persist method allows you to pass the provided entity to the
merge method of the
underlying JPA EntityManager . |
<S extends T> |
mergeAll(Iterable<S> entities)
The mergeAll method allows you to pass the provided entities to the
merge method of the
underlying JPA EntityManager . |
<S extends T> |
mergeAllAndFlush(Iterable<S> entities)
The mergeAllAndFlush method allows you to pass the provided entities to the
merge method of the
underlying JPA EntityManager and call flush afterwards. |
<S extends T> |
mergeAndFlush(S entity)
The mergeAndFlush method allows you to pass the provided entity to the
merge method of the
underlying JPA EntityManager and call flush afterwards. |
<S extends T> |
persist(S entity)
The persist method allows you to pass the provided entity to the
persist method of the
underlying JPA EntityManager . |
<S extends T> |
persistAll(Iterable<S> entities)
The persistAll method allows you to pass the provided entities to the
persist method of the
underlying JPA EntityManager . |
<S extends T> |
persistAllAndFlush(Iterable<S> entities)
The persistAll method allows you to pass the provided entities to the
persist method of the
underlying JPA EntityManager and call flush afterwards. |
<S extends T> |
persistAndFlush(S entity)
The persistAndFlush method allows you to pass the provided entity to the
persist method of the
underlying JPA EntityManager and call flush afterwards. |
protected org.hibernate.Session |
session() |
<S extends T> |
update(S entity)
The update method allows you to pass the provided entity to the
update method of the
underlying JPA EntityManager . |
<S extends T> |
updateAll(Iterable<S> entities)
The updateAll method allows you to pass the provided entities to the
update method of the
underlying JPA EntityManager . |
<S extends T> |
updateAllAndFlush(Iterable<S> entities)
The updateAllAndFlush method allows you to pass the provided entities to the
update method of the
underlying JPA EntityManager and call flush afterwards. |
<S extends T> |
updateAndFlush(S entity)
The updateAndFlush method allows you to pass the provided entity to the
update method of the
underlying JPA EntityManager and call flush afterwards. |
count, count, count, delete, deleteAll, deleteAll, deleteAllById, deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteById, exists, existsById, findAll, findAll, findAll, findAll, findAll, findAll, findAll, findAll, findAll, findAllById, findBy, findById, findOne, findOne, flush, getById, getCountQuery, getCountQuery, getDomainClass, getOne, getQuery, getQuery, getQuery, getQuery, getQueryHints, getRepositoryMethodMetadata, readPage, readPage, save, saveAll, saveAllAndFlush, saveAndFlush, setEscapeCharacter, setRepositoryMethodMetadata
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
count, delete, deleteAllByIdInBatch, deleteAllInBatch, deleteById, existsById, findAllById, findById, flush
public BaseJpaRepositoryImpl(org.springframework.data.jpa.repository.support.JpaEntityInformation<T,?> entityInformation, javax.persistence.EntityManager entityManager)
@Transactional public <S extends T> S persist(S entity)
BaseJpaRepository
persist
method of the
underlying JPA EntityManager
.persist
in interface BaseJpaRepository<T,ID>
S
- entity typeentity
- entity to persist@Transactional public <S extends T> S persistAndFlush(S entity)
BaseJpaRepository
persist
method of the
underlying JPA EntityManager
and call flush
afterwards.persistAndFlush
in interface BaseJpaRepository<T,ID>
S
- entity typeentity
- entity to persist@Transactional public <S extends T> List<S> persistAll(Iterable<S> entities)
BaseJpaRepository
persist
method of the
underlying JPA EntityManager
.persistAll
in interface BaseJpaRepository<T,ID>
S
- entity typeentities
- entities to persist@Transactional public <S extends T> List<S> persistAllAndFlush(Iterable<S> entities)
BaseJpaRepository
persist
method of the
underlying JPA EntityManager
and call flush
afterwards.persistAllAndFlush
in interface BaseJpaRepository<T,ID>
S
- entity typeentities
- entities to persist@Transactional public <S extends T> S merge(S entity)
BaseJpaRepository
merge
method of the
underlying JPA EntityManager
.merge
in interface BaseJpaRepository<T,ID>
S
- entity typeentity
- entity to merge@Transactional public <S extends T> S mergeAndFlush(S entity)
BaseJpaRepository
merge
method of the
underlying JPA EntityManager
and call flush
afterwards.mergeAndFlush
in interface BaseJpaRepository<T,ID>
S
- entity typeentity
- entity to merge@Transactional public <S extends T> List<S> mergeAll(Iterable<S> entities)
BaseJpaRepository
merge
method of the
underlying JPA EntityManager
.mergeAll
in interface BaseJpaRepository<T,ID>
S
- entity typeentities
- entities to merge@Transactional public <S extends T> List<S> mergeAllAndFlush(Iterable<S> entities)
BaseJpaRepository
merge
method of the
underlying JPA EntityManager
and call flush
afterwards.mergeAllAndFlush
in interface BaseJpaRepository<T,ID>
S
- entity typeentities
- entities to persist@Transactional public <S extends T> S update(S entity)
BaseJpaRepository
update
method of the
underlying JPA EntityManager
.update
in interface BaseJpaRepository<T,ID>
S
- entity typeentity
- entity to update@Transactional public <S extends T> S updateAndFlush(S entity)
BaseJpaRepository
update
method of the
underlying JPA EntityManager
and call flush
afterwards.updateAndFlush
in interface BaseJpaRepository<T,ID>
S
- entity typeentity
- entity to update@Transactional public <S extends T> List<S> updateAll(Iterable<S> entities)
BaseJpaRepository
update
method of the
underlying JPA EntityManager
.updateAll
in interface BaseJpaRepository<T,ID>
S
- entity typeentities
- entities to update@Transactional public <S extends T> List<S> updateAllAndFlush(Iterable<S> entities)
BaseJpaRepository
update
method of the
underlying JPA EntityManager
and call flush
afterwards.updateAllAndFlush
in interface BaseJpaRepository<T,ID>
S
- entity typeentities
- entities to updatepublic T getReferenceById(ID id)
getReferenceById
in interface BaseJpaRepository<T,ID>
public T lockById(ID id, javax.persistence.LockModeType lockMode)
BaseJpaRepository
lockById
in interface BaseJpaRepository<T,ID>
id
- entity identifierlockMode
- entity lock modeprotected Integer getBatchSize(org.hibernate.Session session)
protected <R> R executeBatch(Supplier<R> callback)
protected org.hibernate.Session session()
Copyright © 2024. All rights reserved.