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 key
of 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 E
find(ID id, Number revision)
com.devonfw.module.basic.common.api.RevisionMetadata
getLastRevisionHistoryMetadata(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:
find
in interfaceGenericRevisionedRepository<E,ID extends Serializable>
- Parameters:
id
- theprimary key
.revision
- therevision
of the requested entity.- Returns:
- the entity with the given
id
andrevision
. - 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:
getRevisionHistoryMetadata
in interfaceGenericRevisionedRepository<E,ID extends Serializable>
- Parameters:
id
- theprimary key
.lazy
- -true
to load theRevisionMetadata
lazily,false
otherwise (eager loading).- Returns:
- the
List
ofRevisionMetadata
for the historicrevisions
of the entity with the givenid
. In case no such history exists, anempty
List
is returned.
-
getLastRevisionHistoryMetadata
public com.devonfw.module.basic.common.api.RevisionMetadata getLastRevisionHistoryMetadata(ID id)
- Specified by:
getLastRevisionHistoryMetadata
in interfaceGenericRevisionedRepository<E,ID extends Serializable>
- Parameters:
id
- theprimary key
.- Returns:
- the
RevisionMetadata
of the last historicrevision
of the entity with the givenid
. Will benull
if no such history exists.
-
-