Class ProductQueryService

java.lang.Object
com.dmasone.identity.catalog.application.ProductQueryService

@Service public class ProductQueryService extends Object
Query-side facade for catalog read operations. The service returns immutable projections and uses Redis through Spring Cache when the application is run with the provided infrastructure.
  • Constructor Details

  • Method Details

    • findAll

      @Transactional(readOnly=true) @Cacheable(cacheNames="catalogProducts", key="\'all\'") public List<ProductView> findAll()
    • findById

      @Transactional(readOnly=true) @Cacheable(cacheNames="catalogProduct", key="#productId") public ProductView findById(Long productId)