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 Type
    Method
    Description
    Find all product classes for a given mission code
    findByMissionCodeAndProductType(String missionCode, String productType)
    Find a product class by mission code and product type
    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, 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

    • 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

      List<ProductClass> findByProductType(String productType)
      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 mission
      productType - the (prosEO-internal) product type
      Returns:
      the unique product class identified by the mission code and product type