Package de.dlr.proseo.model.dao
Interface ProductClassRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<ProductClass,,Long> org.springframework.data.jpa.repository.JpaRepository<ProductClass,,Long> org.springframework.data.repository.ListCrudRepository<ProductClass,,Long> org.springframework.data.repository.ListPagingAndSortingRepository<ProductClass,,Long> org.springframework.data.repository.PagingAndSortingRepository<ProductClass,,Long> org.springframework.data.repository.query.QueryByExampleExecutor<ProductClass>,org.springframework.data.repository.Repository<ProductClass,Long>
public interface ProductClassRepository
extends org.springframework.data.jpa.repository.JpaRepository<ProductClass,Long>
Data Access Object for the ProductClassRepository class
- Author:
- Dr. Thomas Bassler
-
Method Summary
Modifier and TypeMethodDescriptionfindByMissionCode(String missionCode) Find all product classes for a given mission codefindByMissionCodeAndProductType(String missionCode, String productType) Find a product class by mission code and product typefindByProductType(String productType) Find all product classes for a given product type (at most one per mission)Methods 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
-
findByMissionCode
@Query("select pc from ProductClass pc where pc.mission.code = ?1") List<ProductClass> findByMissionCode(String missionCode) Find all product classes for a given mission code- Parameters:
missionCode- the code of the mission- Returns:
- a list of product classes
-
findByProductType
Find all product classes for a given product type (at most one per mission)- Parameters:
productType- the (prosEO-internal) product type- Returns:
- a list of product classes
-
findByMissionCodeAndProductType
@Query("select pc from ProductClass pc where pc.mission.code = ?1 and pc.productType = ?2") ProductClass findByMissionCodeAndProductType(String missionCode, String productType) Find a product class by mission code and product type- Parameters:
missionCode- the code of the missionproductType- the (prosEO-internal) product type- Returns:
- the unique product class identified by the mission code and product type
-