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.ListCrudRepository<T,K>, org.springframework.data.repository.ListPagingAndSortingRepository<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 for VersionedJpaRepository
  • Constructor Summary

    Constructors
    Constructor
    Description
    VersionedJpaRepositoryImpl(Class<T> versionedClass, Class<V> versionClass, jakarta.persistence.EntityManager entityManager)
    Creates a new SimpleJpaRepository to manage objects of the given domain type.
  • Method Summary

    Modifier and Type
    Method
    Description
    <S extends T>
    S
    save(S versionedEntity)
    Add a new version before any save.

    Methods inherited from class org.springframework.data.jpa.repository.support.SimpleJpaRepository

    count, count, count, delete, delete, deleteAll, deleteAll, deleteAllById, deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteById, exists, exists, existsById, findAll, findAll, findAll, findAll, findAll, findAll, findAll, findAll, findAll, findAllById, findBy, findBy, findById, findOne, findOne, flush, getById, getCountQuery, getCountQuery, getDomainClass, getOne, getQuery, getQuery, getQuery, getQuery, getQueryHints, getQueryHintsForCount, getReferenceById, 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, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush

    Methods inherited from interface org.springframework.data.repository.ListCrudRepository

    findAll, findAllById, saveAll

    Methods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

    count, exists, findAll, findBy, findOne
  • Constructor Details

    • VersionedJpaRepositoryImpl

      public VersionedJpaRepositoryImpl(Class<T> versionedClass, Class<V> versionClass, jakarta.persistence.EntityManager entityManager)
      Creates a new SimpleJpaRepository to 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 Details

    • save

      @Transactional public <S extends T> S save(S versionedEntity)
      Add a new version before any save.
      Specified by:
      save in interface org.springframework.data.repository.CrudRepository<T extends VersionedEntity,K extends Serializable>
      Overrides:
      save in class org.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