Interface StockLocationRepository

  • All Superinterfaces:
    org.springframework.data.repository.CrudRepository<org.openwms.common.location.Location,​Long>, org.springframework.data.jpa.repository.JpaRepository<org.openwms.common.location.Location,​Long>, org.springframework.data.repository.PagingAndSortingRepository<org.openwms.common.location.Location,​Long>, org.springframework.data.repository.query.QueryByExampleExecutor<org.openwms.common.location.Location>, org.springframework.data.repository.Repository<org.openwms.common.location.Location,​Long>

    interface StockLocationRepository
    extends org.springframework.data.jpa.repository.JpaRepository<org.openwms.common.location.Location,​Long>
    A StockLocationRepository.
    Author:
    Heiko Scherrer
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int findAvailableLocationsFor​(List<String> locationGroupNames)  
      List<org.openwms.common.location.Location> findBy​(org.springframework.data.domain.Pageable pageable, List<String> locationGroupNames, org.openwms.common.location.api.LocationGroupState groupStateIn, org.openwms.common.location.api.LocationGroupState groupStateOut, List<org.openwms.common.location.LocationType> locationTypes)  
      • Methods inherited from interface org.springframework.data.repository.CrudRepository

        count, delete, deleteAll, deleteAll, deleteById, existsById, findById, save
      • Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

        deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getOne, saveAll, saveAndFlush
      • Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

        findAll
      • Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

        count, exists, findAll, findOne
    • Method Detail

      • findAvailableLocationsFor

        @Query("select count(l) from Location l where l.locationGroup.name in :locationGroupNames and l.locationGroup.groupStateIn = org.openwms.common.location.api.LocationGroupState.AVAILABLE and l.locationGroup.groupStateOut = org.openwms.common.location.api.LocationGroupState.AVAILABLE and l.plcState = 0 and l not in (  select t.actualLocation   from TransportUnit t   where t.actualLocation.locationGroup.name in :locationGroupNames )")
        int findAvailableLocationsFor​(@Param("locationGroupNames")
                                      List<String> locationGroupNames)
      • findBy

        @Query("select l from Location l where l.locationGroup.name in :locationGroupNames and l.plcState = 0 and ((l.locationGroup.groupStateIn = :groupStateIn and l.incomingActive = true) or :groupStateIn is null) and ((l.locationGroup.groupStateOut = :groupStateOut and l.outgoingActive = true) or :groupStateOut is null) and l.locationType in :locationTypes and l not in (select distinct t.actualLocation from TransportUnit t) and l not in (select distinct t.targetLocation from TransportUnit t) order by l.locationType, l.locationId.area, l.locationId.aisle, l.locationId.x, l.locationId.y, l.locationId.z DESC")
        List<org.openwms.common.location.Location> findBy​(org.springframework.data.domain.Pageable pageable,
                                                          @Param("locationGroupNames")
                                                          List<String> locationGroupNames,
                                                          @Param("groupStateIn")
                                                          org.openwms.common.location.api.LocationGroupState groupStateIn,
                                                          @Param("groupStateOut")
                                                          org.openwms.common.location.api.LocationGroupState groupStateOut,
                                                          @Param("locationTypes")
                                                          List<org.openwms.common.location.LocationType> locationTypes)