public interface HibernateRepository<T>
HibernateRepository
fixes the problems that the default Spring Data JpaRepository
suffers from.
For more details about how to use it, check out this article.
Modifier and Type | Method and Description |
---|---|
List<T> |
findAll()
Deprecated.
|
<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> |
peristAllAndFlush(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> |
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> |
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. |
<S extends T> |
save(S entity)
Deprecated.
|
<S extends T> |
saveAll(Iterable<S> entities)
Deprecated.
|
<S extends T> |
saveAllAndFlush(Iterable<S> entities)
Deprecated.
|
<S extends T> |
saveAndFlush(S entity)
Deprecated.
|
<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. |
@Deprecated List<T> findAll()
For more details about why you should not use the findAll
method by default,
check out this article.
@Deprecated <S extends T> S save(S entity)
For more details about how to use it, check out this article.
@Deprecated <S extends T> List<S> saveAll(Iterable<S> entities)
For more details about how to use it, check out this article.
@Deprecated <S extends T> S saveAndFlush(S entity)
For more details about how to use it, check out this article.
@Deprecated <S extends T> List<S> saveAllAndFlush(Iterable<S> entities)
For more details about how to use it, check out this article.
<S extends T> S persist(S entity)
persist
method of the
underlying JPA EntityManager
.S
- entity typeentity
- entity to persist<S extends T> S persistAndFlush(S entity)
persist
method of the
underlying JPA EntityManager
and call flush
afterwards.S
- entity typeentity
- entity to persist<S extends T> List<S> persistAll(Iterable<S> entities)
persist
method of the
underlying JPA EntityManager
.S
- entity typeentities
- entities to persist<S extends T> List<S> peristAllAndFlush(Iterable<S> entities)
persist
method of the
underlying JPA EntityManager
and call flush
afterwards.S
- entity typeentities
- entities to persist<S extends T> S merge(S entity)
merge
method of the
underlying JPA EntityManager
.S
- entity typeentity
- entity to merge<S extends T> S mergeAndFlush(S entity)
merge
method of the
underlying JPA EntityManager
and call flush
afterwards.S
- entity typeentity
- entity to merge<S extends T> List<S> mergeAll(Iterable<S> entities)
merge
method of the
underlying JPA EntityManager
.S
- entity typeentities
- entities to merge<S extends T> List<S> mergeAllAndFlush(Iterable<S> entities)
merge
method of the
underlying JPA EntityManager
and call flush
afterwards.S
- entity typeentities
- entities to persist<S extends T> S update(S entity)
update
method of the
underlying JPA EntityManager
.S
- entity typeentity
- entity to update<S extends T> S updateAndFlush(S entity)
update
method of the
underlying JPA EntityManager
and call flush
afterwards.S
- entity typeentity
- entity to update<S extends T> List<S> updateAll(Iterable<S> entities)
update
method of the
underlying JPA EntityManager
.S
- entity typeentities
- entities to update<S extends T> List<S> updateAllAndFlush(Iterable<S> entities)
update
method of the
underlying JPA EntityManager
and call flush
afterwards.S
- entity typeentities
- entities to updateCopyright © 2022. All rights reserved.