Package de.dlr.proseo.model.dao
Schnittstelle OrderRepository
- Alle Superschnittstellen:
org.springframework.data.repository.CrudRepository<ProcessingOrder,
,Long> org.springframework.data.jpa.repository.JpaRepository<ProcessingOrder,
,Long> org.springframework.data.repository.PagingAndSortingRepository<ProcessingOrder,
,Long> org.springframework.data.repository.query.QueryByExampleExecutor<ProcessingOrder>
,org.springframework.data.repository.Repository<ProcessingOrder,
Long>
@Transactional
@Repository
public interface OrderRepository
extends org.springframework.data.jpa.repository.JpaRepository<ProcessingOrder,Long>
Data Access Object for the ProcessingOrder class
- Autor:
- Dr. Thomas Bassler
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungfindByExecutionTimeBetween
(Instant executionTimeFrom, Instant executionTimeTo) Get all processing orders scheduled for execution within the given time rangefindByMissionCodeAndIdentifier
(String missionCode, String identifier) Get the processing order with the given mission code and identifierfindByMissionCodeAndIdentifierAndLatestExecutionTime
(String missionCode, String identifier) Get the latest execution time of processing orders with the given mission code and identifier patternfindByOrderState
(OrderState orderState) Get the processing order with the given order statefindByOrderStateAndEvictionTimeLessThan
(OrderState orderState, Instant evictionTime) Get all processing orders of state orderState and eviction time older (less) than evictionTimefindByUuid
(UUID uuid) Get the processing order with the given UUIDfindIdsByOrderStateAndEvictionTimeLessThan
(OrderState orderState, Instant evictionTime) Get the IDs of all processing orders of state orderState and eviction time older (less) than evictionTimeVon Schnittstelle geerbte Methoden org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteById, existsById, findById, save
Von Schnittstelle geerbte Methoden org.springframework.data.jpa.repository.JpaRepository
deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getOne, saveAll, saveAndFlush
Von Schnittstelle geerbte Methoden org.springframework.data.repository.PagingAndSortingRepository
findAll
Von Schnittstelle geerbte Methoden org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findOne
-
Methodendetails
-
findByMissionCodeAndIdentifierAndLatestExecutionTime
@Query("select distinct(po.executionTime) from ProcessingOrder po where po.mission.code = ?1 and po.identifier like ?2 and po.executionTime = (select distinct(max(po2.executionTime)) from ProcessingOrder po2 where po2.mission.code = ?1 and po2.identifier like ?2)") Date findByMissionCodeAndIdentifierAndLatestExecutionTime(String missionCode, String identifier) Get the latest execution time of processing orders with the given mission code and identifier pattern- Parameter:
missionCode
- the mission code of the processing orderidentifier
- the identifier of the processing order- Gibt zurück:
- the unique execution time of processing orders identified by the given identifier pattern
-
findByMissionCodeAndIdentifier
@Query("select po from ProcessingOrder po where po.mission.code = ?1 and po.identifier = ?2") ProcessingOrder findByMissionCodeAndIdentifier(String missionCode, String identifier) Get the processing order with the given mission code and identifier- Parameter:
missionCode
- the mission code of the processing orderidentifier
- the identifier of the processing order- Gibt zurück:
- the unique processing order identified by the given identifier
-
findByUuid
Get the processing order with the given UUID- Parameter:
uuid
- the UUID of the processing order- Gibt zurück:
- the unique processing order identified by the given UUID
-
findByExecutionTimeBetween
List<ProcessingOrder> findByExecutionTimeBetween(Instant executionTimeFrom, Instant executionTimeTo) Get all processing orders scheduled for execution within the given time range- Parameter:
executionTimeFrom
- the earliest execution timeexecutionTimeTo
- the latest execution time- Gibt zurück:
- a list of processing orders matching the selection criteria
-
findByOrderStateAndEvictionTimeLessThan
@Query("select p from ProcessingOrder p where p.orderState = ?1 and p.evictionTime is not null and p.evictionTime < ?2") List<ProcessingOrder> findByOrderStateAndEvictionTimeLessThan(OrderState orderState, Instant evictionTime) Get all processing orders of state orderState and eviction time older (less) than evictionTime- Parameter:
orderState
- the state of orderevictionTime
- the time to compare- Gibt zurück:
- a list of processing orders matching the selection criteria
-
findIdsByOrderStateAndEvictionTimeLessThan
@Query("select p.id from ProcessingOrder p where p.orderState = ?1 and p.evictionTime is not null and p.evictionTime < ?2") List<Long> findIdsByOrderStateAndEvictionTimeLessThan(OrderState orderState, Instant evictionTime) Get the IDs of all processing orders of state orderState and eviction time older (less) than evictionTime- Parameter:
orderState
- the state of orderevictionTime
- the time to compare- Gibt zurück:
- a list of database IDs for processing orders matching the selection criteria
-
findByOrderState
@Query("select po from ProcessingOrder po where po.orderState = ?1") List<ProcessingOrder> findByOrderState(OrderState orderState) Get the processing order with the given order state- Parameter:
orderState
- the state of order- Gibt zurück:
- the unique processing order identified by the given identifier
-