package vn.azteam.tpf.service;

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

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

import java.util.Optional;

/**
 * Service Interface for managing TBProductUnit.
 */
public interface TBProductUnitService {

    /**
     * Save a tBProductUnit.
     *
     * @param tBProductUnitDTO the entity to save
     * @return the persisted entity
     */
    TBProductUnitDTO save(TBProductUnitDTO tBProductUnitDTO);

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


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

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

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