Class GenericRevisionedRepositoryImpl<E,ID extends Serializable>
- java.lang.Object
-
- org.springframework.data.jpa.repository.support.SimpleJpaRepository<E,ID>
-
- com.devonfw.module.jpa.dataaccess.impl.data.GenericRepositoryImpl<E,ID>
-
- com.devonfw.module.jpa.dataaccess.impl.data.GenericRevisionedRepositoryImpl<E,ID>
-
- Type Parameters:
E- generic type of the managedentity.ID- generic type of theprimary keyof the entity.
- All Implemented Interfaces:
GenericRepository<E,ID>,GenericRevisionedRepository<E,ID>,QueryDslSupport<E>,FeatureForceIncrementModificationCounter<E>,org.springframework.data.jpa.repository.JpaRepository<E,ID>,org.springframework.data.jpa.repository.JpaSpecificationExecutor<E>,org.springframework.data.jpa.repository.support.JpaRepositoryImplementation<E,ID>,org.springframework.data.repository.CrudRepository<E,ID>,org.springframework.data.repository.PagingAndSortingRepository<E,ID>,org.springframework.data.repository.query.QueryByExampleExecutor<E>,org.springframework.data.repository.Repository<E,ID>
public class GenericRevisionedRepositoryImpl<E,ID extends Serializable> extends GenericRepositoryImpl<E,ID> implements GenericRevisionedRepository<E,ID>
Implementation ofGenericRevisionedRepository.- Since:
- 3.0.0
-
-
Field Summary
-
Fields inherited from class com.devonfw.module.jpa.dataaccess.impl.data.GenericRepositoryImpl
entityInformation, entityManager
-
-
Constructor Summary
Constructors Constructor Description GenericRevisionedRepositoryImpl(org.springframework.data.jpa.repository.support.JpaEntityInformation<E,ID> entityInformation, javax.persistence.EntityManager entityManager)The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Efind(ID id, Number revision)com.devonfw.module.basic.common.api.RevisionMetadatagetLastRevisionHistoryMetadata(ID id)List<com.devonfw.module.basic.common.api.RevisionMetadata>getRevisionHistoryMetadata(ID id, boolean lazy)-
Methods inherited from class com.devonfw.module.jpa.dataaccess.impl.data.GenericRepositoryImpl
forceIncrementModificationCounter, getEntityClass, newDslAlias, newDslDeleteClause, newDslDeleteClause, newDslQuery, newDslQuery
-
Methods inherited from class org.springframework.data.jpa.repository.support.SimpleJpaRepository
count, count, count, delete, deleteAll, deleteAll, deleteAllInBatch, deleteById, deleteInBatch, exists, existsById, findAll, findAll, findAll, findAll, findAll, findAll, findAll, findAll, findAll, findAllById, findById, findOne, findOne, flush, getCountQuery, getCountQuery, getDomainClass, getOne, getQuery, getQuery, getQuery, getQuery, getQueryHints, getRepositoryMethodMetadata, readPage, readPage, save, saveAll, 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, deleteById, existsById, findById, save
-
Methods inherited from interface com.devonfw.module.jpa.dataaccess.api.feature.FeatureForceIncrementModificationCounter
forceIncrementModificationCounter
-
Methods inherited from interface com.devonfw.module.jpa.dataaccess.api.data.GenericRepository
deleteByIds, find, getEntityClass
-
Methods inherited from interface com.devonfw.module.jpa.dataaccess.api.data.GenericRevisionedRepository
getRevisionHistoryMetadata
-
Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getOne, saveAll, saveAndFlush
-
Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAll
-
Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findOne
-
Methods inherited from interface com.devonfw.module.jpa.dataaccess.api.data.QueryDslSupport
newDslAlias, newDslDeleteClause, newDslDeleteClause, newDslQuery, newDslQuery
-
-
-
-
Constructor Detail
-
GenericRevisionedRepositoryImpl
public GenericRevisionedRepositoryImpl(org.springframework.data.jpa.repository.support.JpaEntityInformation<E,ID> entityInformation, javax.persistence.EntityManager entityManager)
The constructor.- Parameters:
entityInformation- theJpaEntityInformation.entityManager- the JPAEntityManager.
-
-
Method Detail
-
find
public E find(ID id, Number revision)
- Specified by:
findin interfaceGenericRevisionedRepository<E,ID extends Serializable>- Parameters:
id- theprimary key.revision- therevisionof the requested entity.- Returns:
- the entity with the given
idandrevision. - See Also:
GenericRepository.find(Serializable),GenericRevisionedRepository.getRevisionHistoryMetadata(Serializable, boolean),RevisionMetadata.getRevision(),RevisionedEntity.getRevision()
-
getRevisionHistoryMetadata
public List<com.devonfw.module.basic.common.api.RevisionMetadata> getRevisionHistoryMetadata(ID id, boolean lazy)
- Specified by:
getRevisionHistoryMetadatain interfaceGenericRevisionedRepository<E,ID extends Serializable>- Parameters:
id- theprimary key.lazy- -trueto load theRevisionMetadatalazily,falseotherwise (eager loading).- Returns:
- the
ListofRevisionMetadatafor the historicrevisionsof the entity with the givenid. In case no such history exists, anemptyListis returned.
-
getLastRevisionHistoryMetadata
public com.devonfw.module.basic.common.api.RevisionMetadata getLastRevisionHistoryMetadata(ID id)
- Specified by:
getLastRevisionHistoryMetadatain interfaceGenericRevisionedRepository<E,ID extends Serializable>- Parameters:
id- theprimary key.- Returns:
- the
RevisionMetadataof the last historicrevisionof the entity with the givenid. Will benullif no such history exists.
-
-