package vn.azteam.tpf.service;

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

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

import java.util.Optional;

/**
 * Service Interface for managing TBCropType.
 */
public interface TBCropTypeService {

    /**
     * Save a tBCropType.
     *
     * @param tBCropTypeDTO the entity to save
     * @return the persisted entity
     */
    TBCropTypeDTO save(TBCropTypeDTO tBCropTypeDTO);

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


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

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

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