package com.ejie.ab79.dao.inspecciones;

import com.ejie.ab79.model.inspecciones.DesResIns;
import com.ejie.x38.dto.JerarquiaDto;
import com.ejie.x38.dto.TableRequestDto;
import com.ejie.x38.dto.TableRowDto;
import java.util.List;

/**
 * DesResInsDao  
 *  
 */

public interface DesResInsDao {
    
    /**
     * Inserts a single row in the DesResIns table.
     *
     * @param desresins DesResIns
     * @return DesResIns
     */
    DesResIns add(DesResIns desresins);

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

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

    /**
     * Removes a single row in the DesResIns table.
     *
     * @param desresins DesResIns
     */
    void remove(DesResIns desresins);

    /**
     * Finds a List of rows in the DesResIns table.
     *
     * @param desresins DesResIns
     * @param tableRequestDto TableRequestDto
     * @return List
     */
    List<DesResIns> findAll(DesResIns desresins, TableRequestDto tableRequestDto);

	/**
     * Finds rows in the DesResIns table using like.
     *
     * @param desresins DesResIns
     * @param tableRequestDto TableRequestDto
     * @param startsWith Boolean
     * @return List
     */
	List<DesResIns> findAllLike(DesResIns desresins, TableRequestDto tableRequestDto, Boolean startsWith);
	
	
	/*
	 * OPERACIONES RUP_TABLE
	 */
	 
	/**
	 * Filter in the DesResIns table.
	 *
	 * @param filterDesResIns DesResIns
	 * @param tableRequestDto TableRequestDto
	 * @param startsWith Boolean
	 */	
	 void removeMultiple(DesResIns filterDesResIns, TableRequestDto tableRequestDto, Boolean startsWith);
	
	
    /**
     * Counts rows in the DesResIns table using like.
     *
     * @param desresins DesResIns
     * @param startsWith Boolean
     * @return Long
     */
    Long findAllLikeCount(DesResIns desresins, Boolean startsWith);
    
    /**
     * Counts rows in the DesResIns table.
     *
     * @param desresins DesResIns
     * @return Long
     */
    Long findAllCount(DesResIns desresins);
    
    /**
	 * Reorder selection.
	 *
	 * @param filterDesResIns DesResIns
	 * @param tableRequestDto TableRequestDto
	 * @param startsWith Boolean
	 * @return List<TableRowDto<DesResIns>>
	 */	
    List<TableRowDto<DesResIns>> reorderSelection(DesResIns filterDesResIns, TableRequestDto tableRequestDto, Boolean startsWith);
    
     /**
	 * Searches in the Usuario table.
	 *
	 * @param filterDesResIns DesResIns
	 * @param searchDesResIns DesResIns
	 * @param tableRequestDto TableRequestDto
	 * @param startsWith Boolean
	 * @return List<TableRowDto<DesResIns>>	 
	 */	
    List<TableRowDto<DesResIns>> search(DesResIns filterDesResIns, DesResIns searchDesResIns, TableRequestDto tableRequestDto, Boolean startsWith);

    /*
	 * OPERACIONES RUP_TABLE JERARQUIA
	 */
    
    /**
	 * Filter in the hierarchical DesResIns table.
	 *
	 * @param filterDesResIns DesResIns
	 * @param tableRequestDto TableRequestDto
	 * @return List<JerarquiaDto<DesResIns>>
	 */	
	List<JerarquiaDto<DesResIns>> findAllLikeJerarquia(DesResIns filterDesResIns, TableRequestDto tableRequestDto);
	
	/**
	 * Count rows in hierarchy
	 *
	 * @param filterDesResIns DesResIns
	 * @param tableRequestDto TableRequestDto
	 * @return Long
	 */	
	Long findAllLikeCountJerarquia(DesResIns filterDesResIns, TableRequestDto tableRequestDto);
	
	/**
	 * Find dependent hierarchical rows
	 *
	 * @param filterDesResIns DesResIns
	 * @param tableRequestDto TableRequestDto
	 * @return List<TableRowDto<DesResIns>>
	 */	
	List<TableRowDto<DesResIns>> findAllChild(DesResIns filterDesResIns, TableRequestDto tableRequestDto);
	
	/**
    * Exporta Datos al clipBoard
    *
    */
    List<DesResIns> getMultiple(DesResIns filterDesResIns, TableRequestDto tableRequestDto, Boolean startsWith);
	
}

