package com.ejie.ab61.service.expedientes;

import java.util.List;

import com.ejie.ab61.exceptions.PifException;
import com.ejie.ab61.model.expedientes.RelExpPla;
import com.ejie.x38.dto.JQGridRequestDto;
import com.ejie.x38.dto.JQGridResponseDto;
import com.ejie.x38.dto.JerarquiaDto;
import com.ejie.x38.dto.TableRowDto;

/**
 * RelExpPlaService  
 * 
 *  
 */

public interface RelExpPlaService {

	/**
	 * Trear la ruta de la plantilla para abrriela con el webDav
	 *
	 * @param idRelExpPla
	 *            RelExpPla
	 * @return ruta String
	 */
	String getRutaNegocio(RelExpPla relExpPla) throws PifException;

	/**
	 * Trear la ruta de la plantilla para abrriela con el webDav
	 *
	 * @param idRelExpPla
	 *            RelExpPla
	 * @return ruta String
	 */
	String getRuta(RelExpPla relExpPla) throws PifException;

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

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

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

	/**
	 * obtener la ruta del archivo para poder modificar o aportar a tramitagune
	 *
	 * @param relexppla
	 *            RelExpPla
	 * @return RelExpPla
	 */

	RelExpPla obtenerDatosAportarDocumento(RelExpPla relexppla);

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

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

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

	/*
	 * OPERACIONES RUP_TABLE
	 */

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

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

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

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

	/*
	 * OPERACIONES RUP_TABLE JERARQUIA
	 */

	/**
	 * Finder method in the hierarchical the RelExpPla table.
	 *
	 * @param filterRelExpPla
	 *            RelExpPla
	 * @param jqGridRequestDto
	 *            JQGridRequestDto
	 * @param startsWith
	 *            Boolean
	 * @return JQGridResponseDto<JerarquiaDto<RelExpPla>>
	 */
	JQGridResponseDto<JerarquiaDto<RelExpPla>> jerarquia(RelExpPla filterRelExpPla, JQGridRequestDto jqGridRequestDto,
			Boolean startsWith);

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

}
