package vn.azteam.tpf.service;

import org.springframework.transaction.annotation.Transactional;
import vn.azteam.tpf.domain.TBFunction;
import vn.azteam.tpf.service.dto.TBFunctionDTO;

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

import java.util.List;
import java.util.Optional;

/**
 * Service Interface for managing TBFunction.
 */
public interface TBFunctionService {

    /**
     * Save a tBFunction.
     *
     * @param tBFunctionDTO the entity to save
     * @return the persisted entity
     */
    TBFunctionDTO save(TBFunctionDTO tBFunctionDTO);

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


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

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

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

    List<TBFunction> findByFunctionGroupId(Long functionGroupId);
}
