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>

interface LocationRepository extends org.springframework.data.jpa.repository.JpaRepository<Location,Long>
A LocationRepository.
Author:
Heiko Scherrer
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    boolean
     
     
     
    findByForeignPKeyAndDeleted(String foreignPKey, boolean markForDeletion)
     
     
     

    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("from Location l where l.pKey = :pKey and l.markForDeletion = false") Optional<Location> findBypKey(String pKey)
    • findByErpCode

      @Query("from Location l where l.erpCode = :erpCode and l.markForDeletion = false") Optional<Location> findByErpCode(String erpCode)
    • findByForeignPKey

      @Query("from Location l where l.foreignPKey = :foreignPKey and l.markForDeletion = false") Optional<Location> findByForeignPKey(String foreignPKey)
    • findByForeignPKeyAndDeleted

      @Query("from Location l where l.foreignPKey = :foreignPKey and l.markForDeletion = :markForDeletion") Optional<Location> findByForeignPKeyAndDeleted(String foreignPKey, boolean markForDeletion)
    • findByLocationId

      @Query("from Location l where l.locationId = :locationId and l.markForDeletion = false") Optional<Location> findByLocationId(LocationPK locationId)
    • doesPUonLocationExists

      @Query(" select count(pu)>0\n from PackagingUnit pu\n where pu.actualLocation.pk = :pk\n and pu.actualLocation.markForDeletion = false\n") boolean doesPUonLocationExists(Long pk)
    • doesTUonLocationExists

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