package com.ejie.ab63.dao;

import java.util.List;

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

/**
 * Ab6334s00Dao  
 * 
 *  
 */

public interface ParcelaDao {

	/**
	 * Inserts a single row in the Ab6334s00 table.
	 *
	 * @param ab6334s00
	 *            Ab6334s00
	 * @return Ab6334s00
	 */
	Parcela add(Parcela ab6334s00);

	/**
	 * Updates a single row in the Ab6334s00 table.
	 *
	 * @param ab6334s00
	 *            Ab6334s00
	 * @return Ab6334s00
	 */
	Parcela update(Parcela ab6334s00);

	/**
	 * Finds a single row in the Ab6334s00 table.
	 *
	 * @param ab6334s00
	 *            Ab6334s00
	 * @return Ab6334s00
	 */
	Parcela find(Parcela ab6334s00);

	/**
	 * Removes a single row in the Ab6334s00 table.
	 *
	 * @param ab6334s00
	 *            Ab6334s00
	 */
	void remove(Parcela ab6334s00);

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

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

	/*
	 * OPERACIONES RUP_TABLE
	 */

	/**
	 * Filter in the Ab6334s00 table.
	 *
	 * @param filterAb6334s00
	 *            Ab6334s00
	 * @param jqGridRequestDto
	 *            JQGridRequestDto
	 * @param startsWith
	 *            Boolean
	 */
	void removeMultiple(Parcela filterAb6334s00, JQGridRequestDto jqGridRequestDto, Boolean startsWith);

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

	/**
	 * Counts rows in the Ab6334s00 table.
	 *
	 * @param ab6334s00
	 *            Ab6334s00
	 * @return Long
	 */
	Long findAllCount(Parcela ab6334s00);

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

	/**
	 * Searches in the Usuario table.
	 *
	 * @param filterAb6334s00
	 *            Ab6334s00
	 * @param searchAb6334s00
	 *            Ab6334s00
	 * @param jqGridRequestDto
	 *            JQGridRequestDto
	 * @param startsWith
	 *            Boolean
	 * @return List<TableRowDto<Ab6334s00>>
	 */
	List<TableRowDto<Parcela>> search(Parcela filterAb6334s00, Parcela searchAb6334s00,
			JQGridRequestDto jqGridRequestDto, Boolean startsWith);

	/*
	 * OPERACIONES RUP_TABLE JERARQUIA
	 */

	/**
	 * Filter in the hierarchical Ab6334s00 table.
	 *
	 * @param filterAb6334s00
	 *            Ab6334s00
	 * @param jqGridRequestDto
	 *            JQGridRequestDto
	 * @return List<JerarquiaDto<Ab6334s00>>
	 */
	List<JerarquiaDto<Parcela>> findAllLikeJerarquia(Parcela filterAb6334s00, JQGridRequestDto jqGridRequestDto);

	/**
	 * Count rows in hierarchy
	 *
	 * @param filterAb6334s00
	 *            Ab6334s00
	 * @param jqGridRequestDto
	 *            JQGridRequestDto
	 * @return Long
	 */
	Long findAllLikeCountJerarquia(Parcela filterAb6334s00, JQGridRequestDto jqGridRequestDto);

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

	Long getTotalUnidadesResumen(Integer idEstablecimiento);

	Long getTotalUnidadesDetalle(Integer idEstablecimiento);

	Long getTotalPlazasResumen(Integer idEstablecimiento);

	Long getTotalPlazasDetalle(Integer idEstablecimiento);

}
