package com.ejie.ab63.dao;

import java.util.List;

import com.ejie.ab63.model.DispensaEstablecimiento;
import com.ejie.x38.dto.JQGridRequestDto;
import com.ejie.x38.dto.JerarquiaDto;
import com.ejie.x38.dto.TableRowDto;

/**
 * Ab6320s00Dao  
 * 
 *  
 */

public interface DispensaEstablecimientoDao {

	/**
	 * Inserts a single row in the Ab6320s00 table.
	 *
	 * @param ab6320s00
	 *            Ab6320s00
	 * @return Ab6320s00
	 */
	DispensaEstablecimiento add(DispensaEstablecimiento ab6320s00);

	/**
	 * Updates a single row in the Ab6320s00 table.
	 *
	 * @param ab6320s00
	 *            Ab6320s00
	 * @return Ab6320s00
	 */
	DispensaEstablecimiento update(DispensaEstablecimiento ab6320s00);

	/**
	 * Finds a single row in the Ab6320s00 table.
	 *
	 * @param ab6320s00
	 *            Ab6320s00
	 * @return Ab6320s00
	 */
	DispensaEstablecimiento find(DispensaEstablecimiento ab6320s00);

	/**
	 * Removes a single row in the Ab6320s00 table.
	 *
	 * @param ab6320s00
	 *            Ab6320s00
	 */
	void remove(DispensaEstablecimiento ab6320s00);

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

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

	/*
	 * OPERACIONES RUP_TABLE
	 */

	/**
	 * Filter in the Ab6320s00 table.
	 *
	 * @param filterAb6320s00
	 *            Ab6320s00
	 * @param jqGridRequestDto
	 *            JQGridRequestDto
	 * @param startsWith
	 *            Boolean
	 */
	void removeMultiple(DispensaEstablecimiento filterAb6320s00, JQGridRequestDto jqGridRequestDto, Boolean startsWith);

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

	/**
	 * Counts rows in the Ab6320s00 table.
	 *
	 * @param ab6320s00
	 *            Ab6320s00
	 * @return Long
	 */
	Long findAllCount(DispensaEstablecimiento ab6320s00);

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

	/**
	 * Searches in the Usuario table.
	 *
	 * @param filterAb6320s00
	 *            Ab6320s00
	 * @param searchAb6320s00
	 *            Ab6320s00
	 * @param jqGridRequestDto
	 *            JQGridRequestDto
	 * @param startsWith
	 *            Boolean
	 * @return List<TableRowDto<Ab6320s00>>
	 */
	List<TableRowDto<DispensaEstablecimiento>> search(DispensaEstablecimiento filterAb6320s00,
			DispensaEstablecimiento searchAb6320s00, JQGridRequestDto jqGridRequestDto, Boolean startsWith);

	/*
	 * OPERACIONES RUP_TABLE JERARQUIA
	 */

	/**
	 * Filter in the hierarchical Ab6320s00 table.
	 *
	 * @param filterAb6320s00
	 *            Ab6320s00
	 * @param jqGridRequestDto
	 *            JQGridRequestDto
	 * @return List<JerarquiaDto<Ab6320s00>>
	 */
	List<JerarquiaDto<DispensaEstablecimiento>> findAllLikeJerarquia(DispensaEstablecimiento filterAb6320s00,
			JQGridRequestDto jqGridRequestDto);

	/**
	 * Count rows in hierarchy
	 *
	 * @param filterAb6320s00
	 *            Ab6320s00
	 * @param jqGridRequestDto
	 *            JQGridRequestDto
	 * @return Long
	 */
	Long findAllLikeCountJerarquia(DispensaEstablecimiento filterAb6320s00, JQGridRequestDto jqGridRequestDto);

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

	DispensaEstablecimiento findByExpediente(DispensaEstablecimiento dispensa);

}
