package com.ejie.ad74a.service;

import java.util.List;

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

import org.springframework.web.multipart.MultipartFile;

import com.ejie.ad74a.model.Expedientes;
import com.ejie.ad74a.model.InformeSocial;
import com.ejie.ad74a.model.Informes;
import com.ejie.x38.dto.JerarquiaDto;
import com.ejie.x38.dto.TableRequestDto;
import com.ejie.x38.dto.TableResponseDto;
import com.ejie.x38.dto.TableRowDto;

/**
 * InformesService generated by UDA, 19-abr-2023 16:38:34.
 * 
 * @author UDA
 */

public interface InformesService {

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

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

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

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

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

	/**
	 * 
	 * @param informes
	 * @param tableRequestDto
	 * @return
	 */
	List<Informes> findAllTodosEstados(Informes informes, TableRequestDto tableRequestDto);

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

	List<Informes> findAllLikePorUsuario(Informes filterInformes, TableRequestDto tableRequestDto, Boolean startsWith,
			Integer usuario);

	/*
	 * OPERACIONES RUP_TABLE
	 */

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

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

	TableResponseDto<Informes> filterPorUsuario(Informes filterInformes, TableRequestDto tableRequestDto,
			Boolean startsWith, Integer usuario);

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

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

	/*
	 * OPERACIONES RUP_TABLE JERARQUIA
	 */

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

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

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

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

	List<Informes> informesComplete(Informes filterInformes, TableRequestDto tableRequestDto);

	InformeSocial updateInformeSocial(Informes informes);

	Informes insertInformeSocial(Informes informes);

	Informes aportar(Informes informes, MultipartFile documento);

	/**
	 * Busca si existe un informe social asociado al dni del solicitante y que no
	 * tenga expediente asociado
	 * 
	 * @param nif
	 * @param match
	 * @return Informes
	 */
	Informes getInformeSocialSinMatchByNIF(String nif, Boolean match);

	List<Informes> informesCompleteNoInfSoc(Informes informess);

	Informes ocultar(Informes informes);

	Informes mostrar(Informes informes);

	Informes obtenerInforme(Informes informes);

	Informes updateDocInforme(Informes informes);

	Informes eliminar(Informes informes);

	Informes enviarDSS(Informes informes, HttpServletRequest request);

	Informes updateEstado(Informes informes);

	Informes updateEnvioAdmon(Informes informes);

	Informes borrarDocumento(Informes informes);

	Informes relacionInformePorMatch(Informes informes, Expedientes expediente);

	public Informes addDesdeAvisos(Informes informes);
}
