package com.ejie.ab61.dao.documentosPid;

import com.ejie.ab61.model.documentosPid.DocumentosPid;
import com.ejie.x38.dto.JQGridRequestDto;
import com.ejie.x38.dto.JerarquiaDto;
import com.ejie.x38.dto.TableRowDto;
import java.util.List;

/**
 * DocumentosPidDao  
 * 
 *  
 */

public interface DocumentosPidDao {

	/**
	 * Inserts a single row in the DocumentosPid table.
	 *
	 * @param documentospid
	 *            DocumentosPid
	 * @return DocumentosPid
	 */
	DocumentosPid add(DocumentosPid documentospid);

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

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

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

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

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

	/*
	 * OPERACIONES RUP_TABLE
	 */

	/**
	 * Filter in the DocumentosPid table.
	 *
	 * @param filterDocumentosPid
	 *            DocumentosPid
	 * @param jqGridRequestDto
	 *            JQGridRequestDto
	 * @param startsWith
	 *            Boolean
	 */
	void removeMultiple(DocumentosPid filterDocumentosPid, JQGridRequestDto jqGridRequestDto, Boolean startsWith);

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

	/**
	 * Counts rows in the DocumentosPid table.
	 *
	 * @param documentospid
	 *            DocumentosPid
	 * @return Long
	 */
	Long findAllCount(DocumentosPid documentospid);

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

	/**
	 * Searches in the Usuario table.
	 *
	 * @param filterDocumentosPid
	 *            DocumentosPid
	 * @param searchDocumentosPid
	 *            DocumentosPid
	 * @param jqGridRequestDto
	 *            JQGridRequestDto
	 * @param startsWith
	 *            Boolean
	 * @return List<TableRowDto<DocumentosPid>>
	 */
	List<TableRowDto<DocumentosPid>> search(DocumentosPid filterDocumentosPid, DocumentosPid searchDocumentosPid,
			JQGridRequestDto jqGridRequestDto, Boolean startsWith);

	/*
	 * OPERACIONES RUP_TABLE JERARQUIA
	 */

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

	/**
	 * Count rows in hierarchy
	 *
	 * @param filterDocumentosPid
	 *            DocumentosPid
	 * @param jqGridRequestDto
	 *            JQGridRequestDto
	 * @return Long
	 */
	Long findAllLikeCountJerarquia(DocumentosPid filterDocumentosPid, JQGridRequestDto jqGridRequestDto);

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

	DocumentosPid findIdByOidPid(String oidPid);

	void removeByOidPid(String oidPid);

}
