Package de.dlr.proseo.model.dao
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 TypeMethodDescriptionfindByFileName(String fileName) Get all product files for a given file namefindByProcessingFacilityId(long facilityId) Get all product files for a given processing facility idfindByProductId(long productId) Get all product files for a given product idMethods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, saveMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlushMethods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAllMethods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAllMethods 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
-