package com.ejie.ab61.dao.expedientes;

import com.ejie.ab61.model.expedientes.RelExpTer;
import com.ejie.x38.dto.JQGridRequestDto;

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

/**
 * RelExpTerDao  
 * 
 *  
 */

public interface RelExpTerDao {

	/**
	 * 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);

	/**
	 * Update tipo de una relacion
	 *
	 * @param relexpter
	 *            RelExpTer
	 * @return RelExpTer
	 */
	RelExpTer updateByParticipantId(RelExpTer relexpter);

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

	/**
	 * Finds lista de participantes de la tabla RelExpTer
	 *
	 * @param relexpter
	 *            RelExpTer
	 * @return RelExpTer
	 */
	List<RelExpTer> findParticipantes(Integer idExpediente);

	/**
	 * Finds lista de participaciones de la tabla RelExpTer
	 *
	 * @param relexpter
	 *            RelExpTer
	 * @return RelExpTer
	 */
	List<RelExpTer> findParticipaciones(Integer idExpediente);

	/**
	 * Finds lista de parcicipaciones de la tabla RelExpTer
	 *
	 * @param relexpter
	 *            RelExpTer
	 * @return RelExpTer
	 */
	List<RelExpTer> findParticipantId(Integer idExpediente);

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

	/**
	 * Remove a single row in the RelExpTer dado un idTercero
	 *
	 * @param relexpter
	 *            RelExpTer
	 * @return
	 */
	void removeidTercero(Integer idTercero);

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

	/**
	 * Busca los id terceros en la tabla de Rel_Exp_Ter
	 *
	 * @param idExpediente
	 *            Integer
	 * @param partipant_id
	 *            String
	 * @param participantRole
	 *            TParticipantType
	 * 
	 * @return List
	 */

	List<RelExpTer> findIdTerceros(Integer idExpediente, String partipant_id);

	/**
	 * Busca los id terceros en la tabla de Rel_Exp_Ter
	 *
	 * @param idExpediente
	 *            Integer
	 * @return List
	 */

	List<RelExpTer> findIdTerceros(Integer idExpediente);

	/**
	 * buscar valor de participaciones
	 *
	 * @param relexpter
	 *            RelExpTer
	 * @return RelExpTer
	 */

	List<RelExpTer> findValorParticipant(Integer idExpediente);

	/**
	 * Update valor de participacionid
	 *
	 * @param relexpter
	 *            RelExpTer
	 * @return RelExpTer
	 */
	RelExpTer updateByParticipantValue(RelExpTer relexpter);

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

	/*
	 * OPERACIONES RUP_TABLE
	 */

	/**
	 * Filter in the RelExpTer table.
	 *
	 * @param filterRelExpTer
	 *            RelExpTer
	 * @param jqGridRequestDto
	 *            JQGridRequestDto
	 * @param startsWith
	 *            Boolean
	 */
	void removeMultiple(RelExpTer filterRelExpTer, JQGridRequestDto jqGridRequestDto, Boolean startsWith);

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

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

	/**
	 * Reorder selection.
	 *
	 * @param filterRelExpTer
	 *            RelExpTer
	 * @param jqGridRequestDto
	 *            JQGridRequestDto
	 * @param startsWith
	 *            Boolean
	 * @return List<TableRowDto<RelExpTer>>
	 */
	List<TableRowDto<RelExpTer>> reorderSelection(RelExpTer filterRelExpTer, JQGridRequestDto jqGridRequestDto,
			Boolean startsWith);

	/**
	 * Searches in the Usuario 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);

	/*
	 * OPERACIONES RUP_TABLE JERARQUIA
	 */

	/**
	 * 
	 * 
	 * /** Find dependent hierarchical rows
	 *
	 * @param filterRelExpTer
	 *            RelExpTer
	 * @param jqGridRequestDto
	 *            JQGridRequestDto
	 * @return List<TableRowDto<RelExpTer>>
	 */
	List<TableRowDto<RelExpTer>> findAllChild(RelExpTer filterRelExpTer, JQGridRequestDto jqGridRequestDto);

}
