package vn.azteam.tpf.service;

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

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

import java.util.Optional;

/**
 * Service Interface for managing TBDistrict.
 */
public interface TBDistrictService {

    /**
     * Save a tBDistrict.
     *
     * @param tBDistrictDTO the entity to save
     * @return the persisted entity
     */
    TBDistrictDTO save(TBDistrictDTO tBDistrictDTO);

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


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

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

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