Package de.dlr.proseo.model.dao
Interface ProductRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<Product,,Long> org.springframework.data.jpa.repository.JpaRepository<Product,,Long> org.springframework.data.repository.ListCrudRepository<Product,,Long> org.springframework.data.repository.ListPagingAndSortingRepository<Product,,Long> org.springframework.data.repository.PagingAndSortingRepository<Product,,Long> org.springframework.data.repository.query.QueryByExampleExecutor<Product>,org.springframework.data.repository.Repository<Product,Long>
public interface ProductRepository
extends org.springframework.data.jpa.repository.JpaRepository<Product,Long>
Data Access Object for the Product class
- Author:
- Dr. Thomas Bassler
-
Method Summary
Modifier and TypeMethodDescriptionGet a list of products with eviction times in the pastfindByEvictionTimeLessThan(Instant evictionTime) Get a list of products with eviction times older than evictionTimefindByJobStep(JobStep jobStep) Get the product which is produced by a job stepfindByMissionCodeAndProductionTypeAndGeneratedAndGenerationTimeBetween(String missionCode, ProductionType productionType, Instant generationTimeFrom, Instant generationTimeTo) Get all products of a given mission and class with their publication times in the given time intervalfindByMissionCodeAndProductionTypeAndPublicatedAndPublicationTimeBetween(String missionCode, ProductionType productionType, Instant publicationTimeFrom, Instant publicationTimeTo) Get all products of a given mission and class with their publication times in the given time intervalfindByMissionCodeAndProductTypeAndOrbitNumberBetween(String missionCode, String productType, Integer orbitNumberFrom, Integer orbitNumberTo) Get all products of a given mission and class with their orbit numbers in the given rangefindByMissionCodeAndProductTypeAndRequestedStartTimeBetween(String missionCode, String productType, Instant requestedStartTimeFrom, Instant requestedStartTimeTo) Get all products of a given mission and class with their requested start times in the given time intervalfindByMissionCodeAndProductTypeAndRequestedStartTimeLessAndRequestedStopTimeGreater(String missionCode, String productType, Instant latestRequestedStartTime, Instant earliestRequestedStopTime) Get all products of a given mission and class with their sensing start time before the end of a time interval and the sensing stop time after the beginning of that interval (including border values); this results in a check for intersection with the time interval, if latestSensingStartTime after earliestSensingStopTime, and a check for coverage of the time interval, if latestSensingStartTime before earliestSensingStopTimefindByMissionCodeAndProductTypeAndSensingStartTimeBetween(String missionCode, String productType, Instant sensingStartTimeFrom, Instant sensingStartTimeTo) Get all products of a given mission and class with their sensing start times in the given time intervalfindByMissionCodeAndProductTypeAndSensingStartTimeLessAndSensingStopTimeGreater(String missionCode, String productType, Instant latestSensingStartTime, Instant earliestSensingStop) Get all products of a given mission and class with their sensing start time before the end of a time interval and the sensing stop time after the beginning of that interval (including border values); this results in a check for intersection with the time interval, if latestSensingStartTime after earliestSensingStopTime, and a check for coverage of the time interval, if latestSensingStartTime before earliestSensingStopTimefindByProductClassAndConfiguredProcessorAndSensingStartTimeAndSensingStopTime(long productClassId, long configuredProcessorId, Instant sensingStartTime, Instant sensingStopTime) Get a list of products of a given product class, configured process and sensing timesfindByUuid(UUID uuid) Get the product with the given universally unique product identifierMethods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, saveMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlushMethods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAllMethods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Method Details
-
findByMissionCodeAndProductTypeAndOrbitNumberBetween
@Query("select p from Product p where p.productClass.mission.code = ?1 and p.productClass.productType = ?2 and p.orbit.orbitNumber between ?3 and ?4") List<Product> findByMissionCodeAndProductTypeAndOrbitNumberBetween(String missionCode, String productType, Integer orbitNumberFrom, Integer orbitNumberTo) Get all products of a given mission and class with their orbit numbers in the given range- Parameters:
missionCode- the mission codeproductType- the prosEO product typeorbitNumberFrom- the first orbit number to includeorbitNumberTo- the last orbit number to include- Returns:
- a list of products satisfying the search criteria
-
findByMissionCodeAndProductTypeAndRequestedStartTimeBetween
@Query("select p from Product p where p.productClass.mission.code = ?1 and p.productClass.productType = ?2 and p.requestedStartTime between ?3 and ?4") List<Product> findByMissionCodeAndProductTypeAndRequestedStartTimeBetween(String missionCode, String productType, Instant requestedStartTimeFrom, Instant requestedStartTimeTo) Get all products of a given mission and class with their requested start times in the given time interval- Parameters:
missionCode- the mission codeproductType- the prosEO product typerequestedStartTimeFrom- the earliest planned/requested start timerequestedStartTimeTo- the latest planned/requested start time- Returns:
- a list of products satisfying the search criteria
-
findByMissionCodeAndProductTypeAndSensingStartTimeBetween
@Query("select p from Product p where p.productClass.mission.code = ?1 and p.productClass.productType = ?2 and p.sensingStartTime between ?3 and ?4") List<Product> findByMissionCodeAndProductTypeAndSensingStartTimeBetween(String missionCode, String productType, Instant sensingStartTimeFrom, Instant sensingStartTimeTo) Get all products of a given mission and class with their sensing start times in the given time interval- Parameters:
missionCode- the mission codeproductType- the prosEO product typesensingStartTimeFrom- the earliest sensing start timesensingStartTimeTo- the latest sensing start time- Returns:
- a list of products satisfying the search criteria
-
findByMissionCodeAndProductionTypeAndPublicatedAndPublicationTimeBetween
@Query("select p from Product p where p.productClass.mission.code = ?1 and p.productionType = ?2 and p.publicationTime is not null and p.publicationTime between ?3 and ?4 and p.productClass.processingLevel is not null") List<Product> findByMissionCodeAndProductionTypeAndPublicatedAndPublicationTimeBetween(String missionCode, ProductionType productionType, Instant publicationTimeFrom, Instant publicationTimeTo) Get all products of a given mission and class with their publication times in the given time interval- Parameters:
missionCode- the mission codeproductionType- the prosEO production typepublicationTimeFrom- the earliest publication timepublicationTimeTo- the latest publication time- Returns:
- a list of products satisfying the search criteria
-
findByMissionCodeAndProductionTypeAndGeneratedAndGenerationTimeBetween
@Query("select p from Product p where p.productClass.mission.code = ?1 and p.productionType = ?2 and p.generationTime is not null and p.generationTime between ?3 and ?4") List<Product> findByMissionCodeAndProductionTypeAndGeneratedAndGenerationTimeBetween(String missionCode, ProductionType productionType, Instant generationTimeFrom, Instant generationTimeTo) Get all products of a given mission and class with their publication times in the given time interval- Parameters:
missionCode- the mission codeproductionType- the prosEO production typegenerationTimeFrom- the earliest generation timegenerationTimeTo- the latest generation time- Returns:
- a list of products satisfying the search criteria
-
findByMissionCodeAndProductTypeAndRequestedStartTimeLessAndRequestedStopTimeGreater
@Query("select p from Product p where p.productClass.mission.code = ?1 and p.productClass.productType = ?2 and p.requestedStartTime <= ?3 and p.requestedStopTime >= ?4") List<Product> findByMissionCodeAndProductTypeAndRequestedStartTimeLessAndRequestedStopTimeGreater(String missionCode, String productType, Instant latestRequestedStartTime, Instant earliestRequestedStopTime) Get all products of a given mission and class with their sensing start time before the end of a time interval and the sensing stop time after the beginning of that interval (including border values); this results in a check for intersection with the time interval, if latestSensingStartTime after earliestSensingStopTime, and a check for coverage of the time interval, if latestSensingStartTime before earliestSensingStopTime- Parameters:
missionCode- the mission codeproductType- the prosEO product typelatestRequestedStartTime- the latest planned/requested start timeearliestRequestedStopTime- the earliest planned/requested stop time- Returns:
- a list of products satisfying the search criteria
-
findByMissionCodeAndProductTypeAndSensingStartTimeLessAndSensingStopTimeGreater
@Query("select p from Product p where p.productClass.mission.code = ?1 and p.productClass.productType = ?2 and p.sensingStartTime <= ?3 and p.sensingStopTime >= ?4") List<Product> findByMissionCodeAndProductTypeAndSensingStartTimeLessAndSensingStopTimeGreater(String missionCode, String productType, Instant latestSensingStartTime, Instant earliestSensingStop) Get all products of a given mission and class with their sensing start time before the end of a time interval and the sensing stop time after the beginning of that interval (including border values); this results in a check for intersection with the time interval, if latestSensingStartTime after earliestSensingStopTime, and a check for coverage of the time interval, if latestSensingStartTime before earliestSensingStopTime- Parameters:
missionCode- the mission codeproductType- the prosEO product typelatestSensingStartTime- the latest sensing start timeearliestSensingStop- the earliest sensing stop time- Returns:
- a list of products satisfying the search criteria
-
findByJobStep
Get the product which is produced by a job step- Parameters:
jobStep- the job step- Returns:
- the product produced by job step
-
findByUuid
Get the product with the given universally unique product identifier- Parameters:
uuid- the product UUID- Returns:
- the requested product
-
findByProductClassAndConfiguredProcessorAndSensingStartTimeAndSensingStopTime
@Query("select p from Product p where p.productClass.id = ?1 and p.configuredProcessor.id = ?2 and p.sensingStartTime = ?3 and p.sensingStopTime = ?4") List<Product> findByProductClassAndConfiguredProcessorAndSensingStartTimeAndSensingStopTime(long productClassId, long configuredProcessorId, Instant sensingStartTime, Instant sensingStopTime) Get a list of products of a given product class, configured process and sensing times- Parameters:
productClassId- the ID of the product classconfiguredProcessorId- the ID of the configured processorsensingStartTime- the sensing start timesensingStopTime- the sensing stop time- Returns:
- a list of products satisfying the search criteria
-
findByEvictionTimeBeforeNow
@Query("select p from Product p where p.evictionTime is not null and p.evictionTime < current_timestamp") List<Product> findByEvictionTimeBeforeNow()Get a list of products with eviction times in the past- Returns:
- a list of products satisfying the search criteria
-
findByEvictionTimeLessThan
@Query("select p from Product p where p.evictionTime is not null and p.evictionTime < ?1 and p.productFile is not empty") List<Product> findByEvictionTimeLessThan(Instant evictionTime) Get a list of products with eviction times older than evictionTime- Parameters:
evictionTime- the time to compare- Returns:
- a list of products satisfying the search criteria
-