Class JpaBackupFinder
java.lang.Object
it.tidalwave.util.spi.HierarchicFinderSupport<M,F>
it.tidalwave.util.spring.jpa.JpaSpecificationFinder<Backup,BackupEntity,DataManager.BackupFinder,BackupEntityJpaRepository>
it.tidalwave.datamanager.dao.impl.jpa.JpaBackupFinder
- All Implemented Interfaces:
DataManager.BackupFinder
,it.tidalwave.util.Finder<Backup>
,it.tidalwave.util.spi.ExtendedFinderSupport<Backup,
,DataManager.BackupFinder> Serializable
,Cloneable
public class JpaBackupFinder
extends JpaSpecificationFinder<Backup,BackupEntity,DataManager.BackupFinder,BackupEntityJpaRepository>
implements DataManager.BackupFinder
A specialised
Finder
for ManagedFileEntity
.- Author:
- Fabrizio Giudici
- See Also:
- Stereotype:
- Finder
-
Nested Class Summary
Nested classes/interfaces inherited from class it.tidalwave.util.spring.jpa.JpaSpecificationFinder
JpaSpecificationFinder.JpaSorter
Nested classes/interfaces inherited from interface it.tidalwave.datamanager.model.DataManager.BackupFinder
DataManager.BackupFinder.SortingKeys
Nested classes/interfaces inherited from interface it.tidalwave.util.Finder
it.tidalwave.util.Finder.InMemorySortCriterion<U extends Object>, it.tidalwave.util.Finder.SortCriterion, it.tidalwave.util.Finder.SortDirection
-
Field Summary
Fields inherited from class it.tidalwave.util.spring.jpa.JpaSpecificationFinder
entityToModel, repository, sorters
Fields inherited from class it.tidalwave.util.spi.HierarchicFinderSupport
firstResult, maxResults
-
Constructor Summary
ConstructorDescriptionJpaBackupFinder
(BackupEntityJpaRepository repository, Function<BackupEntity, Backup> transformer) JpaBackupFinder
(BackupEntityJpaRepository repository, Function<BackupEntity, Backup> transformer, Optional<String> label, Optional<String> volumeId, Optional<String> fileId) JpaBackupFinder
(JpaBackupFinder other, Object override) The copy constructor required byHierarchicFinderSupport
. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
composeSpecification
(jakarta.persistence.criteria.Root<BackupEntity> root, jakarta.persistence.criteria.CriteriaBuilder criteriaBuilder, List<? super jakarta.persistence.criteria.Predicate> predicates) withFileId
(Optional<String> fileId) withVolumeId
(Optional<String> volumeId) Methods inherited from class it.tidalwave.util.spring.jpa.JpaSpecificationFinder
by, computeNeededResults, getSpecification, sort
Methods inherited from class it.tidalwave.util.spi.HierarchicFinderSupport
clone, clone, clonedWith, computeResults, count, from, getContexts, getSource, max, ofType, results, sort, toString, withContext
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface it.tidalwave.util.spi.ExtendedFinderSupport
from, max, sort, sort, withContext
Methods inherited from interface it.tidalwave.util.Finder
count, firstResult, forEach, from, from, iterator, max, max, ofType, optionalFirstResult, optionalResult, result, results, stream
-
Constructor Details
-
JpaBackupFinder
public JpaBackupFinder(@Nonnull BackupEntityJpaRepository repository, @Nonnull Function<BackupEntity, Backup> transformer) -
JpaBackupFinder
public JpaBackupFinder(@Nonnull BackupEntityJpaRepository repository, @Nonnull Function<BackupEntity, Backup> transformer, @Nonnull Optional<String> label, @Nonnull Optional<String> volumeId, @Nonnull Optional<String> fileId) -
JpaBackupFinder
The copy constructor required byHierarchicFinderSupport
.
-
-
Method Details
-
withLabel
- Specified by:
withLabel
in interfaceDataManager.BackupFinder
-
withVolumeId
- Specified by:
withVolumeId
in interfaceDataManager.BackupFinder
-
withFileId
- Specified by:
withFileId
in interfaceDataManager.BackupFinder
-
composeSpecification
protected void composeSpecification(@Nonnull jakarta.persistence.criteria.Root<BackupEntity> root, @Nonnull jakarta.persistence.criteria.CriteriaBuilder criteriaBuilder, @Nonnull List<? super jakarta.persistence.criteria.Predicate> predicates)
-