package vn.azteam.tpf.service;

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

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

import java.util.Optional;

/**
 * Service Interface for managing TBSupplies.
 */
public interface TBSuppliesService {

    /**
     * Save a tBSupplies.
     *
     * @param tBSuppliesDTO the entity to save
     * @return the persisted entity
     */
    TBSuppliesDTO save(TBSuppliesDTO tBSuppliesDTO);

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

    /**
     * Get all the TBSupplies with eager load of many-to-many relationships.
     *
     * @return the list of entities
     */
    Page<TBSuppliesDTO> findAllWithEagerRelationships(Pageable pageable);
    
    /**
     * Get the "id" tBSupplies.
     *
     * @param id the id of the entity
     * @return the entity
     */
    Optional<TBSuppliesDTO> findOne(Long id);

    /**
     * Get ttBSupplies by "sku" or "name"
     * @param sku
     * @param name
     * @return
     */
    Optional<TBSuppliesDTO> findFirstBySkuOrName(String sku, String name);

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

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