Class VersionedJpaRepositoryImpl<T extends VersionedEntity,K extends Serializable,V extends VersionEntity>
- java.lang.Object
-
- org.springframework.data.jpa.repository.support.SimpleJpaRepository<T,K>
-
- org.activiti.cloud.services.modeling.jpa.version.VersionedJpaRepositoryImpl<T,K,V>
-
- All Implemented Interfaces:
VersionedJpaRepository<T,K,V>,org.springframework.data.jpa.repository.JpaRepository<T,K>,org.springframework.data.jpa.repository.JpaSpecificationExecutor<T>,org.springframework.data.jpa.repository.support.JpaRepositoryImplementation<T,K>,org.springframework.data.repository.CrudRepository<T,K>,org.springframework.data.repository.PagingAndSortingRepository<T,K>,org.springframework.data.repository.query.QueryByExampleExecutor<T>,org.springframework.data.repository.Repository<T,K>
public class VersionedJpaRepositoryImpl<T extends VersionedEntity,K extends Serializable,V extends VersionEntity> extends org.springframework.data.jpa.repository.support.SimpleJpaRepository<T,K> implements VersionedJpaRepository<T,K,V>
Implementation forVersionedJpaRepository
-
-
Constructor Summary
Constructors Constructor Description VersionedJpaRepositoryImpl(Class<T> versionedClass, Class<V> versionClass, javax.persistence.EntityManager entityManager)Creates a newSimpleJpaRepositoryto manage objects of the given domain type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <S extends T>
Ssave(S versionedEntity)Add a new version before any save.-
Methods inherited from class org.springframework.data.jpa.repository.support.SimpleJpaRepository
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, saveAll, saveAllAndFlush, saveAndFlush, setEscapeCharacter, setRepositoryMethodMetadata
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById
-
Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getById, getOne, saveAll, saveAllAndFlush, saveAndFlush
-
-
-
-
Constructor Detail
-
VersionedJpaRepositoryImpl
public VersionedJpaRepositoryImpl(Class<T> versionedClass, Class<V> versionClass, javax.persistence.EntityManager entityManager)
Creates a newSimpleJpaRepositoryto manage objects of the given domain type.- Parameters:
versionedClass- the class of the version entity.versionClass- the class of the version entity.entityManager- must not be null.
-
-
Method Detail
-
save
@Transactional public <S extends T> S save(S versionedEntity)
Add a new version before any save.- Specified by:
savein interfaceorg.springframework.data.repository.CrudRepository<T extends VersionedEntity,K extends Serializable>- Overrides:
savein classorg.springframework.data.jpa.repository.support.SimpleJpaRepository<T extends VersionedEntity,K extends Serializable>- Type Parameters:
S- the versionedEntity type- Parameters:
versionedEntity- the entity to save- Returns:
- the saved entity
-
-