package com.ejie.ab61.dao.procedimientos;

import com.ejie.ab61.model.procedimientos.Areas;
import com.ejie.x38.dto.JQGridRequestDto;
import com.ejie.x38.dto.JerarquiaDto;
import com.ejie.x38.dto.TableRowDto;
import java.util.List;

/**
 * AreasDao  
 *  
 */

public interface AreasDao {
    
    /**
     * Inserts a single row in the Areas table.
     *
     * @param areas Areas
     * @return Areas
     */
    Areas add(Areas areas);

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

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

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

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

	/**
     * Finds rows in the Areas table using like.
     *
     * @param areas Areas
     * @param jqGridRequestDto JQGridRequestDto
     * @param startsWith Boolean
     * @return List
     */
	List<Areas> findAllLike(Areas areas, JQGridRequestDto jqGridRequestDto, Boolean startsWith);
	
	
	/*
	 * OPERACIONES RUP_TABLE
	 */
	 
	/**
	 * Filter in the Areas table.
	 *
	 * @param filterAreas Areas
	 * @param jqGridRequestDto JQGridRequestDto
	 * @param startsWith Boolean
	 */	
	 void removeMultiple(Areas filterAreas, JQGridRequestDto jqGridRequestDto, Boolean startsWith);
	
	
    /**
     * Counts rows in the Areas table using like.
     *
     * @param areas Areas
     * @param startsWith Boolean
     * @return Long
     */
    Long findAllLikeCount(Areas areas, Boolean startsWith);
    
    /**
     * Counts rows in the Areas table.
     *
     * @param areas Areas
     * @return Long
     */
    Long findAllCount(Areas areas);
    
    /**
	 * Reorder selection.
	 *
	 * @param filterAreas Areas
	 * @param jqGridRequestDto JQGridRequestDto
	 * @param startsWith Boolean
	 * @return List<TableRowDto<Areas>>
	 */	
    List<TableRowDto<Areas>> reorderSelection(Areas filterAreas, JQGridRequestDto jqGridRequestDto, Boolean startsWith);
    
     /**
	 * Searches in the Usuario table.
	 *
	 * @param filterAreas Areas
	 * @param searchAreas Areas
	 * @param jqGridRequestDto JQGridRequestDto
	 * @param startsWith Boolean
	 * @return List<TableRowDto<Areas>>	 
	 */	
    List<TableRowDto<Areas>> search(Areas filterAreas, Areas searchAreas, JQGridRequestDto jqGridRequestDto, Boolean startsWith);

    /*
	 * OPERACIONES RUP_TABLE JERARQUIA
	 */
    
    /**
	 * Filter in the hierarchical Areas table.
	 *
	 * @param filterAreas Areas
	 * @param jqGridRequestDto JQGridRequestDto
	 * @return List<JerarquiaDto<Areas>>
	 */	
	List<JerarquiaDto<Areas>> findAllLikeJerarquia(Areas filterAreas, JQGridRequestDto jqGridRequestDto);
	
	/**
	 * Count rows in hierarchy
	 *
	 * @param filterAreas Areas
	 * @param jqGridRequestDto JQGridRequestDto
	 * @return Long
	 */	
	Long findAllLikeCountJerarquia(Areas filterAreas, JQGridRequestDto jqGridRequestDto);
	
	/**
	 * Find dependent hierarchical rows
	 *
	 * @param filterAreas Areas
	 * @param jqGridRequestDto JQGridRequestDto
	 * @return List<TableRowDto<Areas>>
	 */	
	List<TableRowDto<Areas>> findAllChild(Areas filterAreas, JQGridRequestDto jqGridRequestDto);
	
	
}

