Interface LocationRepository

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

public interface LocationRepository extends org.springframework.data.jpa.repository.JpaRepository<Location,Long>
A LocationRepository adds particular functionality regarding Location entity classes.
Author:
Heiko Scherrer
  • Method Details

    • findBypKey

      Optional<Location> findBypKey(String persistentKey)
    • findByLocationId

      Optional<Location> findByLocationId(LocationPK locationId)
    • findByLocationGroup_Name

      @Query("select l from Location l where l.locationGroup.name in :locationGroupNames") List<Location> findByLocationGroup_Name(@Param("locationGroupNames") List<String> locationGroupNames)
    • findByLocationGroup_Name

      @Query("select l from Location l where l.locationGroup.name like :locationGroupName") List<Location> findByLocationGroup_Name(@Param("locationGroupName") String locationGroupName)
    • findByPlcCode

      Optional<Location> findByPlcCode(String plcCode)
    • findByErpCode

      Optional<Location> findByErpCode(String erpCode)
    • doesTUonLocationExists

      @Query(" select count(tu)>0\n from TransportUnit tu\n where tu.actualLocation.pk = :pk\n") boolean doesTUonLocationExists(Long pk)
    • doesTUonLocationExists

      @Query(" select count(tu)>0\n from TransportUnit tu\n where tu.actualLocation.pKey in (:pKeys)\n") boolean doesTUonLocationExists(@Param("pKeys") Collection<String> pKeys)
    • findByLocationIdContaining

      @Query("select l from Location l where l.locationId.area like :#{#locationPK.area} and l.locationId.aisle like :#{#locationPK.aisle} and l.locationId.x like :#{#locationPK.x} and l.locationId.y like :#{#locationPK.y} and l.locationId.z like :#{#locationPK.z} ") List<Location> findByLocationIdContaining(@Param("locationPK") LocationPK locationPK)