package io.gmss.fiscad.interfaces.infocad.metier;

import io.gmss.fiscad.entities.infocad.metier.Piece;
import io.gmss.fiscad.exceptions.BadRequestException;
import io.gmss.fiscad.exceptions.NotFoundException;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Optional;

public interface PieceService {

    Piece createPiece(Piece piece) throws BadRequestException;

    Piece updatePiece(Long id, Piece piece) throws NotFoundException;

    void deletePiece(Long id) throws NotFoundException;

    Page<Piece> getPieceList(Pageable pageable);

    List<Piece> getPieceList();

    Optional<Piece> getPieceById(Long id);
}
