package com.ejie.ad74a.dao;

import com.ejie.x38.dto.JerarquiaDto;
import com.ejie.x38.dto.TableRequestDto;
import com.ejie.x38.dto.TableRowDto;
import java.util.List;

import com.ejie.ad74a.model.TareasTramite;
import com.ejie.ad74a.util.constantes.TramitesEnum;

/**
 * TareasTramiteDao generated by UDA, 22-mar-2023 17:10:15.
 * 
 * @author UDA
 */

public interface TareasTramiteDao {

	/**
	 * Inserts a single row in the TareasTramite table.
	 *
	 * @param tareastramite TareasTramite
	 * @return TareasTramite
	 */
	TareasTramite add(TareasTramite tareastramite);

	/**
	 * Updates a single row in the TareasTramite table.
	 *
	 * @param tareastramite TareasTramite
	 * @return TareasTramite
	 */
	TareasTramite update(TareasTramite tareastramite);

	/**
	 * Finds a single row in the TareasTramite table.
	 *
	 * @param tareastramite TareasTramite
	 * @return TareasTramite
	 */
	TareasTramite find(TareasTramite tareastramite);

	/**
	 * Removes a single row in the TareasTramite table.
	 *
	 * @param tareastramite TareasTramite
	 */
	void remove(TareasTramite tareastramite);

	/**
	 * Finds a List of rows in the TareasTramite table.
	 *
	 * @param tareastramite   TareasTramite
	 * @param tableRequestDto TableRequestDto
	 * @return List
	 */
	List<TareasTramite> findAll(TareasTramite tareastramite, TableRequestDto tableRequestDto);

	/**
	 * Finds rows in the TareasTramite table using like.
	 *
	 * @param tareastramite   TareasTramite
	 * @param tableRequestDto TableRequestDto
	 * @param startsWith      Boolean
	 * @return List
	 */
	List<TareasTramite> findAllLike(TareasTramite tareastramite, TableRequestDto tableRequestDto, Boolean startsWith);

	/*
	 * OPERACIONES RUP_TABLE
	 */

	/**
	 * Filter in the TareasTramite table.
	 *
	 * @param tableRequestDto TableRequestDto
	 */
	void removeMultiple(TableRequestDto tableRequestDto);

	/**
	 * Counts rows in the TareasTramite table using like.
	 *
	 * @param tareastramite TareasTramite
	 * @param startsWith    Boolean
	 * @return Long
	 */
	Long findAllLikeCount(TareasTramite tareastramite, Boolean startsWith);

	/**
	 * Counts rows in the TareasTramite table.
	 *
	 * @param tareastramite TareasTramite
	 * @return Long
	 */
	Long findAllCount(TareasTramite tareastramite);

	/**
	 * Reorder selection.
	 *
	 * @param filterTareasTramite TareasTramite
	 * @param tableRequestDto     TableRequestDto
	 * @param startsWith          Boolean
	 * @return List<TableRowDto<TareasTramite>>
	 */
	List<TableRowDto<TareasTramite>> reorderSelection(TareasTramite filterTareasTramite,
			TableRequestDto tableRequestDto, Boolean startsWith);

	/**
	 * Searches in the Usuario table.
	 *
	 * @param filterTareasTramite TareasTramite
	 * @param searchTareasTramite TareasTramite
	 * @param tableRequestDto     TableRequestDto
	 * @param startsWith          Boolean
	 * @return List<TableRowDto<TareasTramite>>
	 */
	List<TableRowDto<TareasTramite>> search(TareasTramite filterTareasTramite, TareasTramite searchTareasTramite,
			TableRequestDto tableRequestDto, Boolean startsWith);

	/*
	 * OPERACIONES RUP_TABLE JERARQUIA
	 */

	/**
	 * Filter in the hierarchical TareasTramite table.
	 *
	 * @param filterTareasTramite TareasTramite
	 * @param tableRequestDto     TableRequestDto
	 * @return List<JerarquiaDto<TareasTramite>>
	 */
	List<JerarquiaDto<TareasTramite>> findAllLikeJerarquia(TareasTramite filterTareasTramite,
			TableRequestDto tableRequestDto);

	/**
	 * Count rows in hierarchy
	 *
	 * @param filterTareasTramite TareasTramite
	 * @param tableRequestDto     TableRequestDto
	 * @return Long
	 */
	Long findAllLikeCountJerarquia(TareasTramite filterTareasTramite, TableRequestDto tableRequestDto);

	/**
	 * Find dependent hierarchical rows
	 *
	 * @param filterTareasTramite TareasTramite
	 * @param tableRequestDto     TableRequestDto
	 * @return List<TableRowDto<TareasTramite>>
	 */
	List<TableRowDto<TareasTramite>> findAllChild(TareasTramite filterTareasTramite, TableRequestDto tableRequestDto);

	/**
	 * Exporta Datos al clipBoard
	 *
	 */
	List<TareasTramite> getMultiple(TareasTramite filterTareasTramite, TableRequestDto tableRequestDto,
			Boolean startsWith);

	List<TareasTramite> getLastExecutedTask(Long idExpediente, TramitesEnum tramite);

	List<TareasTramite> getLastNotExecutedTask(Long idExpediente, TramitesEnum tramite);

	/**
	 * Finds a single row in the TareasTramite table.
	 *
	 * @param tareastramite TareasTramite
	 * @return TareasTramite
	 */
	TareasTramite findIdTareaByTaskguid11(TareasTramite tareastramite);

}
