package com.ejie.ad74a.service;

import java.text.ParseException;
import java.util.HashMap;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.ejie.ad74a.model.DocumentosTarea;
import com.ejie.ad74a.model.Expedientes;
import com.ejie.ad74a.model.TareasTramite;
import com.ejie.ad74a.model.TramitesExpediente;
import com.ejie.x38.dto.JerarquiaDto;
import com.ejie.x38.dto.TableRequestDto;
import com.ejie.x38.dto.TableResponseDto;
import com.ejie.x38.dto.TableRowDto;

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

public interface TramitesExpedienteService {

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

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

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

	/**
	 * Deletes a single row in the TramitesExpediente table.
	 *
	 * @param tramitesExpediente TramitesExpediente
	 */
	void remove(TramitesExpediente tramitesExpediente);

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

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

	/*
	 * OPERACIONES RUP_TABLE
	 */

	/**
	 * Removes rows from the TramitesExpediente table.
	 *
	 * @param tableRequestDto TableRequestDto
	 */
	void removeMultiple(TableRequestDto tableRequestDto);

	/**
	 * Filter method in the TramitesExpediente table.
	 *
	 * @param filterTramitesExpediente TramitesExpediente
	 * @param tableRequestDto          TableRequestDto
	 * @param startsWith               Boolean
	 * @return TableResponseDto<TramitesExpediente>
	 */
	TableResponseDto<TramitesExpediente> filter(TramitesExpediente filterTramitesExpediente,
			TableRequestDto tableRequestDto, Boolean startsWith);

	/**
	 * Searches rows in the TramitesExpediente table.
	 *
	 * @param filterTramitesExpediente TramitesExpediente
	 * @param searchTramitesExpediente TramitesExpediente
	 * @param tableRequestDto          TableRequestDto
	 * @param startsWith               Boolean
	 * @return List<TableRowDto<TramitesExpediente>>
	 */
	List<TableRowDto<TramitesExpediente>> search(TramitesExpediente filterTramitesExpediente,
			TramitesExpediente searchTramitesExpediente, TableRequestDto tableRequestDto, Boolean startsWith);

	/**
	 * Reorder the selection made in TramitesExpediente table.
	 *
	 * @param filterTramitesExpediente TramitesExpediente
	 * @param tableRequestDto          TableRequestDto
	 * @param startsWith               Boolean
	 * @return Object
	 */
	Object reorderSelection(TramitesExpediente filterTramitesExpediente, TableRequestDto tableRequestDto,
			Boolean startsWith);

	/*
	 * OPERACIONES RUP_TABLE JERARQUIA
	 */

	/**
	 * Finder method in the hierarchical the TramitesExpediente table.
	 *
	 * @param filterTramitesExpediente TramitesExpediente
	 * @param tableRequestDto          TableRequestDto
	 * @param startsWith               Boolean
	 * @return TableResponseDto<JerarquiaDto<TramitesExpediente>>
	 */
	TableResponseDto<JerarquiaDto<TramitesExpediente>> jerarquia(TramitesExpediente filterTramitesExpediente,
			TableRequestDto tableRequestDto, Boolean startsWith);

	/**
	 * Finder method for siblings rows in the hierarchical the TramitesExpediente
	 * table.
	 *
	 * @param filterTramitesExpediente TramitesExpediente
	 * @param tableRequestDto          TableRequestDto
	 * @return TableResponseDto<JerarquiaDto<TramitesExpediente>>
	 */
	TableResponseDto<JerarquiaDto<TramitesExpediente>> jerarquiaChildren(TramitesExpediente filterTramitesExpediente,
			TableRequestDto tableRequestDto);

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

	/**
	 * Exporta Datos en su formato
	 *
	 */
	void generateReport(TramitesExpediente filterTramitesExpediente, String[] columns, String[] columnsName,
			String fileName, String sheetTitle, TableRequestDto tableRequestDto, HttpServletRequest request,
			HttpServletResponse response);

	HashMap<String, List<DocumentosTarea>> getDocumentListToStudyTask(Expedientes expediente,
			TareasTramite tareasTramite, String estadoTarea) throws ParseException;

	public TramitesExpediente findTramiteByTaskGUID(TramitesExpediente tramitesExpediente);
}
