package com.ejie.ab61.service.expedientes;

import java.util.List;

import com.ejie.ab61.clientesWS.X43ExpedienteElectronico.TFolderList;
import com.ejie.ab61.model.expedientes.RelExpTer;
import com.ejie.ab61.model.terceros.VistaDatosExpediente;
import com.ejie.ab61.model.usuario.Usuario;
import com.ejie.x38.dto.JQGridRequestDto;
import com.ejie.x38.dto.JQGridResponseDto;
import com.ejie.x38.dto.JerarquiaDto;
import com.ejie.x38.dto.TableRowDto;

/**
 * RelExpTerService  
 * 
 *  
 */

public interface RelExpTerService {

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

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

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

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

	/**
	 * Finds a list of rows in the RelExpTer table.
	 *
	 * @param relExpTer
	 *            RelExpTer
	 * @param jqGridRequestDto
	 *            JQGridRequestDto
	 * @return List<RelExpTer>
	 */
	List<RelExpTer> findAll(RelExpTer relExpTer, JQGridRequestDto jqGridRequestDto);

	/**
	 * Finds rows in the RelExpTer table using like.
	 *
	 * @param relExpTer
	 *            RelExpTer
	 * @param jqGridRequestDto
	 *            JQGridRequestDto
	 * @param startsWith
	 *            Boolean
	 * @return List<RelExpTer>
	 */
	List<RelExpTer> findAllLike(RelExpTer relExpTer, JQGridRequestDto jqGridRequestDto, Boolean startsWith);

	/**
	 * Obtener lista de participantes de la participacion
	 *
	 * @param resultado
	 *            TFolderList
	 * @param idExpediente
	 *            Integer
	 * @param usuario
	 *            Usuario
	 */
	void actulizarListParticipantesPorParticipacion(TFolderList resultado, Integer idExpediente, Usuario usuario);

	/**
	 * Obtener lista de participaciones
	 *
	 * 
	 * 
	 * @param idExpediente
	 *            Integer
	 * 
	 * @return List<VistaTerceros>
	 * 
	 */
	List<VistaDatosExpediente> findParticipaciones(Integer idExpediente);

	/*
	 * OPERACIONES RUP_TABLE
	 */

	/**
	 * Removes rows from the RelExpTer table.
	 *
	 * @param filterRelExpTer
	 *            RelExpTer
	 * @param jqGridRequestDto
	 *            JQGridRequestDto
	 * @param startsWith
	 *            Boolean
	 */
	void removeMultiple(RelExpTer filterRelExpTer, JQGridRequestDto jqGridRequestDto, Boolean startsWith);

	/**
	 * Filter method in the RelExpTer table.
	 *
	 * @param filterRelExpTer
	 *            RelExpTer
	 * @param jqGridRequestDto
	 *            JQGridRequestDto
	 * @param startsWith
	 *            Boolean
	 * @return JQGridResponseDto<RelExpTer>
	 */
	JQGridResponseDto<RelExpTer> filter(RelExpTer filterRelExpTer, JQGridRequestDto jqGridRequestDto,
			Boolean startsWith);

	/**
	 * Searches rows in the RelExpTer table.
	 *
	 * @param filterRelExpTer
	 *            RelExpTer
	 * @param searchRelExpTer
	 *            RelExpTer
	 * @param jqGridRequestDto
	 *            JQGridRequestDto
	 * @param startsWith
	 *            Boolean
	 * @return List<TableRowDto<RelExpTer>>
	 */
	List<TableRowDto<RelExpTer>> search(RelExpTer filterRelExpTer, RelExpTer searchRelExpTer,
			JQGridRequestDto jqGridRequestDto, Boolean startsWith);

	/**
	 * Reorder the selection made in RelExpTer table.
	 *
	 * @param filterRelExpTer
	 *            RelExpTer
	 * @param jqGridRequestDto
	 *            JQGridRequestDto
	 * @param startsWith
	 *            Boolean
	 * @return Object
	 */
	Object reorderSelection(RelExpTer filterRelExpTer, JQGridRequestDto jqGridRequestDto, Boolean startsWith);

	/*
	 * OPERACIONES RUP_TABLE JERARQUIA
	 */

	/**
	 * Finder method for siblings rows in the hierarchical the RelExpTer table.
	 *
	 * @param filterRelExpTer
	 *            RelExpTer
	 * @param jqGridRequestDto
	 *            JQGridRequestDto
	 * @return JQGridResponseDto<JerarquiaDto<RelExpTer>>
	 */
	JQGridResponseDto<JerarquiaDto<RelExpTer>> jerarquiaChildren(RelExpTer filterRelExpTer,
			JQGridRequestDto jqGridRequestDto);

}
