package com.ejie.ab79.service.protocolos;


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

import javax.servlet.http.HttpServletResponse;

import com.ejie.ab79.model.protocolos.Protocolos;

/**
 * ProtocolosService  
 *  
 */

public interface ProtocolosService {

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

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

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

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

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

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

	/*
	 * OPERACIONES RUP_TABLE
	 */

	/**
	 * Removes rows from the Protocolos table.
	 *
	 * @param filterProtocolos Protocolos
	 * @param tableRequestDto TableRequestDto
	 * @param startsWith Boolean
	 */	
	void removeMultiple(Protocolos filterProtocolos, TableRequestDto tableRequestDto,  Boolean startsWith);
   
    
	/**
	 * Filter method in the Protocolos table.
	 *
	 * @param filterProtocolos Protocolos
	 * @param tableRequestDto TableRequestDto
	 * @param startsWith Boolean
	 * @return TableResponseDto<Protocolos>
	 */	
	TableResponseDto<Protocolos> filter(Protocolos filterProtocolos, TableRequestDto tableRequestDto,  Boolean startsWith);
    
    /**
	 * Searches rows in the Protocolos table.
	 *
	 * @param filterProtocolos Protocolos
	 * @param searchProtocolos Protocolos
	 * @param tableRequestDto TableRequestDto
	 * @param startsWith Boolean
	 * @return List<TableRowDto<Protocolos>>
	 */	
    List<TableRowDto<Protocolos>> search(Protocolos filterProtocolos, Protocolos searchProtocolos, TableRequestDto tableRequestDto, Boolean startsWith);
    
    /**
	 * Reorder the selection made in Protocolos table.
	 *
	 * @param filterProtocolos Protocolos
	 * @param tableRequestDto TableRequestDto
	 * @param startsWith Boolean
	 * @return Object
	 */	
    Object reorderSelection(Protocolos filterProtocolos, TableRequestDto tableRequestDto, Boolean startsWith);
    
    /*
	 * OPERACIONES RUP_TABLE JERARQUIA
	 */
	 
	/**
	 * Finder method in the hierarchical the Protocolos table.
	 *
	 * @param filterProtocolos Protocolos
	 * @param tableRequestDto TableRequestDto
	 * @param startsWith Boolean
	 * @return TableResponseDto<JerarquiaDto<Protocolos>>
	 */	
	TableResponseDto<JerarquiaDto<Protocolos>> jerarquia(Protocolos filterProtocolos, TableRequestDto tableRequestDto, Boolean startsWith);
	
	/**
	 * Finder method for siblings rows in the hierarchical the Protocolos table.
	 *
	 * @param filterProtocolos Protocolos
	 * @param tableRequestDto TableRequestDto
	 * @return TableResponseDto<JerarquiaDto<Protocolos>>
	 */	
	TableResponseDto<JerarquiaDto<Protocolos>> jerarquiaChildren(Protocolos filterProtocolos, TableRequestDto tableRequestDto);
    
    /**
    * Exporta Datos al clipBoard
    *
    */
    List<Protocolos> getMultiple(Protocolos filterProtocolos, TableRequestDto tableRequestDto, Boolean startsWith);

	Protocolos findProtocolo(Protocolos protocolo);

	void getExcel(List<Protocolos> listaProtocolos, HttpServletResponse response);

	Integer calcularNumPreguntasProtocolo(Protocolos protocolo);

	Integer calcularNumeroRespuestasProtocolo(Protocolos protocolo);

	Protocolos validarInforme(Protocolos protocolo);

	Protocolos invalidarInforme(Protocolos protocolo);

	Integer calcularNumeroRespuestasValidar(Protocolos protocolo);

	List<Protocolos> findAllREST(Protocolos filterProtocolos);
    
}


