Package com.deusto.coffeestack.service
Class LoteServiceImpl
java.lang.Object
com.deusto.coffeestack.service.LoteServiceImpl
- All Implemented Interfaces:
LoteService
-
Constructor Summary
ConstructorsConstructorDescriptionLoteServiceImpl(LoteRepository loteRepository, InsumoRepository insumoRepository, ProveedorRepository proveedorRepository) -
Method Summary
Modifier and TypeMethodDescriptionlistarPorInsumo(Long insumoId) Lists all batches for a given insumo, ordered by expiry date ascending (nulls last).obtenerPorId(Long id) Retrieves a single batch by its ID.recibirLote(LoteCreateRequest request) Registers the reception of a new batch.
-
Constructor Details
-
LoteServiceImpl
public LoteServiceImpl(LoteRepository loteRepository, InsumoRepository insumoRepository, ProveedorRepository proveedorRepository)
-
-
Method Details
-
recibirLote
Description copied from interface:LoteServiceRegisters the reception of a new batch. Returns the persisted batch response.- Specified by:
recibirLotein interfaceLoteService
-
listarPorInsumo
Description copied from interface:LoteServiceLists all batches for a given insumo, ordered by expiry date ascending (nulls last).- Specified by:
listarPorInsumoin interfaceLoteService
-
obtenerPorId
Description copied from interface:LoteServiceRetrieves a single batch by its ID. Throws NotFoundException if not found.- Specified by:
obtenerPorIdin interfaceLoteService
-