package com.ejie.ab63.service;

import java.util.List;

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

/**
 * Ab6334s00Service  
 * 
 *  
 */

public interface ParcelaService {

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

	/**
	 * Inserts a single row in the Ab6334s00 table.
	 *
	 * @param ab6334s00
	 *            Ab6334s00
	 * @return Ab6334s00
	 */
	Parcela save(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);

	/**
	 * Deletes 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<Ab6334s00>
	 */
	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<Ab6334s00>
	 */
	List<Parcela> findAllLike(Parcela ab6334s00, JQGridRequestDto jqGridRequestDto, Boolean startsWith);

	/*
	 * OPERACIONES RUP_TABLE
	 */

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

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

	/**
	 * Searches rows in the Ab6334s00 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);

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

	/*
	 * OPERACIONES RUP_TABLE JERARQUIA
	 */

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

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

	public Long getTotalPlazasParcelas(Parcela parcela);

	Long getTotalUnidadesResumen(Integer idEstablecimiento);

	Long getTotalUnidadesDetalle(Integer idEstablecimiento);

	Long getTotalPlazasResumen(Integer idEstablecimiento);

	Long getTotalPlazasDetalle(Integer idEstablecimiento);

	void addMasivo(List<Parcela> listaParcelas);
}
