Uses of Class
com.example.springrest.models.Product
Packages that use Product
Package
Description
Provides MapStruct-based mappers for converting between
domain entities and Data Transfer Objects (DTOs).
This package contains the repository interfaces for the application.
This package contains the service layer of the application.
-
Uses of Product in com.example.springrest.mappers
Methods in com.example.springrest.mappers that return ProductModifier and TypeMethodDescriptionProductMapper.toEntity
(ProductRequest dto) Creates a newProduct
from an incoming request.Methods in com.example.springrest.mappers with parameters of type ProductModifier and TypeMethodDescriptionProductMapper.toResponse
(Product entity) Creates aProductResponse
DTO suitable for API responses.void
ProductMapper.updateEntity
(Product target, ProductRequest source) Updates an existingProduct
in-place from aProductRequest
. -
Uses of Product in com.example.springrest.repositories
Methods in com.example.springrest.repositories that return types with arguments of type ProductModifier and TypeMethodDescriptionorg.springframework.data.domain.Page
<Product> ProductRepo.findByNameContainingIgnoreCase
(String name, org.springframework.data.domain.Pageable pageable) Finds products whosename
contains the given keyword, ignoring case sensitivity; paged. -
Uses of Product in com.example.springrest.services
Methods in com.example.springrest.services that return ProductModifier and TypeMethodDescriptionCreates/Persists a new productProductService.getOrThrow
(Long id) Retrieves a Product by its ID or throws an exception if not found.Applies a mutation function to an existing product and persists the change.Methods in com.example.springrest.services that return types with arguments of type ProductModifier and TypeMethodDescriptionorg.springframework.data.domain.Page
<Product> ProductService.list
(org.springframework.data.domain.Pageable pageable) Returns a paginated/sorted view of all products.org.springframework.data.domain.Page
<Product> ProductService.searchByName
(String q, org.springframework.data.domain.Pageable pageable) Searches for products by name (case-insensitive), paged.Methods in com.example.springrest.services with parameters of type ProductModifier and TypeMethodDescriptionCreates/Persists a new productMethod parameters in com.example.springrest.services with type arguments of type Product