package vn.azteam.tpf.service;

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

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

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

/**
 * Service Interface for managing TBActivityType.
 */
public interface TBActivityTypeService {

    /**
     * Save a tBActivityType.
     *
     * @param tBActivityTypeDTO the entity to save
     * @return the persisted entity
     */
    TBActivityTypeDTO save(TBActivityTypeDTO tBActivityTypeDTO);

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


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

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

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


    Optional<TBActivityTypeDTO> findOneByName(String name);
}
