package vn.azteam.tpf.service;

import vn.azteam.tpf.service.dto.TBSuppliesTypeDTO;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.Optional;

/**
 * Service Interface for managing TBSuppliesType.
 */
public interface TBSuppliesTypeService {

    /**
     * Save a tBSuppliesType.
     *
     * @param tBSuppliesTypeDTO the entity to save
     * @return the persisted entity
     */
    TBSuppliesTypeDTO save(TBSuppliesTypeDTO tBSuppliesTypeDTO);

    /**
     * Get all the tBSuppliesTypes.
     *
     * @param pageable the pagination information
     * @return the list of entities
     */
    Page<TBSuppliesTypeDTO> findAll(Pageable pageable);


    /**
     * Get the "id" tBSuppliesType.
     *
     * @param id the id of the entity
     * @return the entity
     */
    Optional<TBSuppliesTypeDTO> findOne(Long id);

    /**
     *  Get the "name" tBSuppliesType.
     * @param name
     * @return
     */
    Optional<TBSuppliesTypeDTO> findFirstByName(String name);

    /**
     * Delete the "id" tBSuppliesType.
     *
     * @param id the id of the entity
     */
    void delete(Long id);

    /**
     * Search for the tBSuppliesType corresponding to the query.
     *
     * @param query the query of the search
     * 
     * @param pageable the pagination information
     * @return the list of entities
     */
    Page<TBSuppliesTypeDTO> search(String query, Pageable pageable);
}
