package vn.azteam.tpf.service;

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

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

import java.util.Optional;

/**
 * Service Interface for managing TBPermission.
 */
public interface TBPermissionService {

    /**
     * Save a tBPermission.
     *
     * @param tBPermissionDTO the entity to save
     * @return the persisted entity
     */
    TBPermissionDTO save(TBPermissionDTO tBPermissionDTO);

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


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

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

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