package vn.azteam.tpf.service;

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

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

import java.util.Optional;

/**
 * Service Interface for managing TBEntity.
 */
public interface TBEntityService {

    /**
     * Save a tBEntity.
     *
     * @param tBEntityDTO the entity to save
     * @return the persisted entity
     */
    TBEntityDTO save(TBEntityDTO tBEntityDTO);

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


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

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

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