package vn.azteam.tpf.service;

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

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

import java.util.Optional;

/**
 * Service Interface for managing TBRole.
 */
public interface TBRoleService {

    /**
     * Save a tBRole.
     *
     * @param tBRoleDTO the entity to save
     * @return the persisted entity
     */
    TBRoleDTO save(TBRoleDTO tBRoleDTO);

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


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

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

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