Package org.openwms.tms.impl
Interface TransportOrderJpaRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<TransportOrder,
,Long> org.springframework.data.jpa.repository.JpaRepository<TransportOrder,
,Long> org.springframework.data.repository.ListCrudRepository<TransportOrder,
,Long> org.springframework.data.repository.ListPagingAndSortingRepository<TransportOrder,
,Long> org.springframework.data.repository.PagingAndSortingRepository<TransportOrder,
,Long> org.springframework.data.repository.query.QueryByExampleExecutor<TransportOrder>
,org.springframework.data.repository.Repository<TransportOrder,
,Long> TransportOrderRepository<TransportOrder,
Long>
interface TransportOrderJpaRepository
extends TransportOrderRepository<TransportOrder,Long>, org.springframework.data.jpa.repository.JpaRepository<TransportOrder,Long>
A TransportOrderRepository is an extension of Spring Data's
JpaRepository
that provides additional queries regarding
TransportOrder
entities.- Author:
- Heiko Scherrer
-
Method Summary
Modifier and TypeMethodDescriptionfindBypKey
(String pKey) findBypKeys
(List<String> pKeys) findByTargetLocation
(String targetLocation) findByTransportUnitBKAndStates
(String transportUnitBK, TransportOrderState... states) int
numberOfTransportOrders
(String transportUnitBK, TransportOrderState state) Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save
Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush
Methods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAll
Methods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository
findAll
Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAll
Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
Methods inherited from interface org.openwms.tms.impl.TransportOrderRepository
findById, save, saveAndFlush
-
Method Details
-
findBypKey
@Query("select to\n from TransportOrder to\n where to.pKey = ?1\n") Optional<TransportOrder> findBypKey(String pKey) - Specified by:
findBypKey
in interfaceTransportOrderRepository<TransportOrder,
Long>
-
findBypKeys
@Query("select to\n from TransportOrder to\n where to.pKey in ?1\n") List<TransportOrder> findBypKeys(List<String> pKeys) - Specified by:
findBypKeys
in interfaceTransportOrderRepository<TransportOrder,
Long>
-
findByTargetLocation
- Specified by:
findByTargetLocation
in interfaceTransportOrderRepository<TransportOrder,
Long>
-
findByTransportUnitBKAndStates
@Query(" select to\n from TransportOrder to\n where to.transportUnitBK = ?1\n and to.state in ?2\n order by to.priority desc, to.startDate, to.createDt\n") List<TransportOrder> findByTransportUnitBKAndStates(String transportUnitBK, TransportOrderState... states) - Specified by:
findByTransportUnitBKAndStates
in interfaceTransportOrderRepository<TransportOrder,
Long>
-
numberOfTransportOrders
@Query("select count(to)\n from TransportOrder to\n where to.transportUnitBK = :transportUnitBK\n and to.state = :state\n") int numberOfTransportOrders(@Param("transportUnitBK") String transportUnitBK, @Param("state") TransportOrderState state) - Specified by:
numberOfTransportOrders
in interfaceTransportOrderRepository<TransportOrder,
Long>
-