Interface TransportOrderRepository

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>

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 Summary

    Modifier and Type
    Method
    Description
     
     
    findByTargetLocation(String targetLocation)
     
     
    int
     

    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
  • 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)