package com.ejie.aa21b.service;

import java.util.List;

import com.ejie.aa21b.model.Aa21b02s01;
import com.ejie.aa21b.model.Aa21b07s01;
import com.ejie.aa21b.model.Aa21b13s01;
import com.ejie.aa21b.model.Aa21b14s01;
import com.ejie.aa21b.model.Aa21b15s01;
import com.ejie.aa21b.model.Aa21b20s01;
import com.ejie.aa21b.model.Aa21b20s01Consultas;
import com.ejie.x38.dto.JQGridRequestDto;
import com.ejie.x38.dto.JQGridResponseDto;
import com.ejie.x38.dto.JerarquiaDto;
import com.ejie.x38.dto.TableRowDto;

/**
 * Aa21b20s01Service  
 * 
 *  
 */

public interface Aa21b20s01Service {

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

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

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

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

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

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

	/*
	 * OPERACIONES RUP_TABLE
	 */

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

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

	/**
	 * Filter method in the Aa21b20s01 table.
	 * 
	 * @param filterAa21b20s01
	 *            Aa21b20s01
	 * @param jqGridRequestDto
	 *            JQGridRequestDto
	 * @param startsWith
	 *            Boolean
	 * @return JQGridResponseDto<Aa21b20s01>
	 */
	JQGridResponseDto<Aa21b20s01> filterConFase(Aa21b20s01 filterAa21b20s01,
			JQGridRequestDto jqGridRequestDto, Boolean startsWith);

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

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

	/*
	 * OPERACIONES RUP_TABLE JERARQUIA
	 */

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

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

	/**
	 * 
	 * @param idExpe
	 *            String
	 * @return boolean
	 */
	boolean bloquear(String idExpe);

	/**
	 * 
	 * @param idExpe
	 *            String
	 * @return boolean
	 */
	boolean desbloquear(String idExpe);

	/**
	 * 
	 * @param aa21b20s01
	 *            Aa21b20s01
	 * @return Aa21b20s01
	 */
	Aa21b20s01 updateBloqueos(Aa21b20s01 aa21b20s01);

	/**
	 * 
	 * @param grupo
	 *            String
	 * @return List<String>
	 */
	List<Aa21b20s01> findExpAsociados(String grupo);

	/**
	 * 
	 * @param filterAa21b20s01
	 * @param jqGridRequestDto
	 * @param listaServicios
	 * @param listaTiposExpedientes
	 * @param listaResponsables
	 * @param listaArchivos
	 * @param listaEstados
	 * @return
	 */
	List<Aa21b20s01Consultas> findAllLikeConsultas(
			Aa21b20s01Consultas filterAa21b20s01,
			JQGridRequestDto jqGridRequestDto, List<Aa21b13s01> listaServicios,
			List<Aa21b02s01> listaTiposExpedientes,
			List<Aa21b15s01> listaResponsables, List<Aa21b14s01> listaArchivos,
			List<Aa21b07s01> listaEstados, Boolean startsWith);

	/**
	 * 
	 * @param expAsociado
	 *            Aa21b20s01
	 * @return Aa21b20s01
	 */
	Aa21b20s01 findPorReferencia(Aa21b20s01 expAsociado);

	JQGridResponseDto<Aa21b20s01> filterConsultas(Aa21b20s01 filterAa21b20s01,
			List<Aa21b13s01> listaServicios,
			List<Aa21b02s01> listaTiposExpedientes,
			List<Aa21b15s01> listaResponsables, List<Aa21b14s01> listaArchivos,
			List<Aa21b07s01> listaEstados, JQGridRequestDto jqGridRequestDto,
			boolean b);

	public int updateTipoExpediente(Aa21b20s01 expediente, String nuevoCserv);

	String obtenerCorrelativoUbica();

	Aa21b20s01 updateModificacionEspecial(Aa21b20s01 expediente);

	/**
	 * Finds a single row in the Aa21b20s01 table.
	 * 
	 * @param aa21b20s01
	 *            Aa21b20s01
	 * @return Aa21b20s01
	 */
	Aa21b20s01 findConGrupoTipoExp(Aa21b20s01 aa21b20s01);

}
