package com.ejie.ab63.dao;

import java.util.List;

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

/**
 * Ab6331s00Dao  
 * 
 *  
 */

public interface SuiteDao {

	/**
	 * Inserts a single row in the Ab6331s00 table.
	 *
	 * @param ab6331s00
	 *            Ab6331s00
	 * @return Ab6331s00
	 */
	Suite add(Suite ab6331s00);

	/**
	 * Updates a single row in the Ab6331s00 table.
	 *
	 * @param ab6331s00
	 *            Ab6331s00
	 * @return Ab6331s00
	 */
	Suite update(Suite ab6331s00);

	/**
	 * Finds a single row in the Ab6331s00 table.
	 *
	 * @param ab6331s00
	 *            Ab6331s00
	 * @return Ab6331s00
	 */
	Suite find(Suite ab6331s00);

	/**
	 * Removes a single row in the Ab6331s00 table.
	 *
	 * @param ab6331s00
	 *            Ab6331s00
	 */
	void remove(Suite ab6331s00);

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

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

	/*
	 * OPERACIONES RUP_TABLE
	 */

	/**
	 * Filter in the Ab6331s00 table.
	 *
	 * @param filterAb6331s00
	 *            Ab6331s00
	 * @param jqGridRequestDto
	 *            JQGridRequestDto
	 * @param startsWith
	 *            Boolean
	 */
	void removeMultiple(Suite filterAb6331s00, JQGridRequestDto jqGridRequestDto, Boolean startsWith);

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

	/**
	 * Counts rows in the Ab6331s00 table.
	 *
	 * @param ab6331s00
	 *            Ab6331s00
	 * @return Long
	 */
	Long findAllCount(Suite ab6331s00);

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

	/**
	 * Searches in the Usuario table.
	 *
	 * @param filterAb6331s00
	 *            Ab6331s00
	 * @param searchAb6331s00
	 *            Ab6331s00
	 * @param jqGridRequestDto
	 *            JQGridRequestDto
	 * @param startsWith
	 *            Boolean
	 * @return List<TableRowDto<Ab6331s00>>
	 */
	List<TableRowDto<Suite>> search(Suite filterAb6331s00, Suite searchAb6331s00, JQGridRequestDto jqGridRequestDto,
			Boolean startsWith);

	/*
	 * OPERACIONES RUP_TABLE JERARQUIA
	 */

	/**
	 * Filter in the hierarchical Ab6331s00 table.
	 *
	 * @param filterAb6331s00
	 *            Ab6331s00
	 * @param jqGridRequestDto
	 *            JQGridRequestDto
	 * @return List<JerarquiaDto<Ab6331s00>>
	 */
	List<JerarquiaDto<Suite>> findAllLikeJerarquia(Suite filterAb6331s00, JQGridRequestDto jqGridRequestDto);

	/**
	 * Count rows in hierarchy
	 *
	 * @param filterAb6331s00
	 *            Ab6331s00
	 * @param jqGridRequestDto
	 *            JQGridRequestDto
	 * @return Long
	 */
	Long findAllLikeCountJerarquia(Suite filterAb6331s00, JQGridRequestDto jqGridRequestDto);

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

	Long getTotalSuitesByIdEstablecimiento(Integer idEstablecimiento);

	Long getTotalUnidadesResumen(Integer idEstablecimiento);

	Long getTotalUnidadesDetalle(Integer idEstablecimiento);

	Long getTotalPlazasResumen(Integer idEstablecimiento);

	Long getTotalPlazasDetalle(Integer idEstablecimiento);

}
