Interface ProductFileRepository

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

public interface ProductFileRepository extends org.springframework.data.jpa.repository.JpaRepository<ProductFile,Long>
Data Access Object for the ProductFile class
Author:
Dr. Thomas Bassler
  • Method Summary

    Modifier and Type
    Method
    Description
    Get all product files for a given file name
    findByProcessingFacilityId(long facilityId)
    Get all product files for a given processing facility id
    findByProductId(long productId)
    Get all product files for a given product id

    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

    • findByProductId

      @Query("select pf from ProductFile pf where pf.product.id = ?1") List<ProductFile> findByProductId(long productId)
      Get all product files for a given product id
      Parameters:
      productId - the database id of the product
      Returns:
      a (possibly empty) list of product files
    • findByProcessingFacilityId

      @Query("select pf from ProductFile pf where pf.processingFacility.id = ?1") List<ProductFile> findByProcessingFacilityId(long facilityId)
      Get all product files for a given processing facility id
      Parameters:
      facilityId - the database id of the processing facility
      Returns:
      a (possibly empty) list of product files
    • findByFileName

      @Query("select pf from ProductFile pf where pf.productFileName = ?1") List<ProductFile> findByFileName(String fileName)
      Get all product files for a given file name
      Parameters:
      fileName - the name of the product file
      Returns:
      a (possibly empty) list of product files