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

import io.gmss.fiscad.entities.infocad.metier.Tpe;
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 TpeService {

    Tpe createTpe(Tpe tpe) throws BadRequestException;

    Tpe updateTpe(Long id, Tpe tpe) throws NotFoundException;
    Tpe majTpe(Long id, Tpe tpe) throws NotFoundException;

    void deleteTpe(Long id) throws NotFoundException;

    Page<Tpe> getTpeList(Pageable pageable);

    List<Tpe> getTpeList();

    Optional<Tpe> getTpeById(Long id);

    Optional<Tpe> getTepByIdentifier(String identifier);

    List<Tpe> getTpeListByModel(String model);

    List<Tpe> getTpeListByUserId(Long userId);

    Tpe reCreateExistTpe(Tpe tpe) throws BadRequestException;
}
