Interface TransportOrderRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<TransportOrder,Long>, org.springframework.data.jpa.repository.JpaRepository<TransportOrder,Long>, org.springframework.data.repository.PagingAndSortingRepository<TransportOrder,Long>, org.springframework.data.repository.query.QueryByExampleExecutor<TransportOrder>, org.springframework.data.repository.Repository<TransportOrder,Long>

public interface TransportOrderRepository extends 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 Details

    • findBypKey

      @Query("select to\n from TransportOrder to\n where to.pKey = ?1\n") Optional<TransportOrder> findBypKey(String pKey)
    • findBypKeys

      @Query("select to\n from TransportOrder to\n where to.pKey in ?1\n") List<TransportOrder> findBypKeys(List<String> pKeys)
    • 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)
    • findByTargetLocation

      List<TransportOrder> findByTargetLocation(String targetLocation)
    • 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)