Interface ConfigValueRepository

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

@Repository public interface ConfigValueRepository extends org.springframework.data.jpa.repository.JpaRepository<ConfigurationValues,Long>
Repository for queries for Configuration Values.
  • Method Summary

    Modifier and Type
    Method
    Description
    Find all configuration values by company identifier.
    Find all configuration values by product type.
    Find all configuration values by product type.

    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, findAll, findAll, findAllById, flush, getById, getOne, getReferenceById, saveAll, saveAllAndFlush, saveAndFlush

    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

    • findAllByProductAndConfigurable

      List<ConfigurationValues> findAllByProductAndConfigurable(String product, Boolean configurable)
      Find all configuration values by product type.
      Parameters:
      product - product type
      configurable - configurable flag
      Returns:
      All configuration values
    • findAllByCompanyId

      @Query("SELECT NEW es.kukenan.smartfi.microservice.backoffice.repository.entity.ConfigurationValues( cv.id, cv.name, cv.description, CAST(CASE WHEN ccv.value IS NULL THEN cv.value ELSE ccv.value END as float ),cv.configurable, cv.type, cv.product, cv.insertDate, cv.insertUser, cv.updateDate, cv.updateUser ) FROM ConfigurationValues cv LEFT JOIN CompanyConfigurationValues ccv ON cv.id = ccv.configurationValue.id AND ccv.companyId = :companyId") List<ConfigurationValues> findAllByCompanyId(@Param("companyId") Integer companyId)
      Find all configuration values by company identifier.
      Parameters:
      companyId - company identifier
      Returns:
      All configuration values
    • findAllByProductAndConfigurableAndCompanyId

      @Query("SELECT NEW es.kukenan.smartfi.microservice.backoffice.repository.entity.ConfigurationValues( cv.id, cv.name, cv.description, CAST(CASE WHEN ccv.value IS NULL THEN cv.value ELSE ccv.value END as float),cv.configurable, cv.type, cv.product, cv.insertDate, cv.insertUser, cv.updateDate, cv.updateUser) FROM ConfigurationValues cv LEFT JOIN CompanyConfigurationValues ccv ON cv.id = ccv.configurationValue.id AND ccv.companyId = :companyId WHERE cv.product = :product AND cv.configurable = :configurable") List<ConfigurationValues> findAllByProductAndConfigurableAndCompanyId(@Param("product") String product, @Param("configurable") Boolean configurable, @Param("companyId") Integer companyId)
      Find all configuration values by product type.
      Parameters:
      product - product type
      configurable - configurable flag
      companyId - company identifier
      Returns:
      All configuration values