package com.ejie.ab39a.dao;

import java.util.List;

import com.ejie.ab39a.model.AccionesPg;
import com.ejie.ab39a.model.ElementosArbol;
import com.ejie.ab39a.model.PlanesGestion;
import com.ejie.x38.dto.JQGridRequestDto;
import com.ejie.x38.dto.TableRowDto;

/**
 * PlanesGestionDao.
 * 
 *  
 */

public interface PlanesGestionDao {

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

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

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

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

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

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

	/**
	 * findAllLikeCopiar findAllLikeCopiar
	 * 
	 * @param planesGestion
	 *            PlanesGestion planesGestion
	 * @param jqGridRequestDto
	 *            JQGridRequestDto jqGridRequestDto
	 * @param startsWith
	 *            Boolean startsWith
	 * @return List<PlanesGestion> lista
	 */
	List<PlanesGestion> findAllLikeCopiar(PlanesGestion planesGestion, JQGridRequestDto jqGridRequestDto,
			Boolean startsWith);

	/*
	 * OPERACIONES RUP_TABLE
	 */

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

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

	/**
	 * findAllLikeCopiarCount findAllLikeCopiarCount
	 * 
	 * @param planesGestion
	 *            PlanesGestion planesGestion
	 * @param startsWith
	 *            Boolean startsWith
	 * @return Long Long
	 */
	Long findAllLikeCopiarCount(PlanesGestion planesGestion, Boolean startsWith);

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

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

	/**
	 * Operación que carga los planes de gestión
	 * 
	 * @param planesGestion
	 *            PlanesGestion plan de gestion nuevo a cargar
	 * @return void
	 */
	void generarPlanesGestion(PlanesGestion planesGestion);

	/**
	 * Crea una copia del plan de gestión
	 * 
	 * @param codplanorigen
	 *            Integer codplanorigen
	 * @param codplandestino
	 *            Integer codplandestino
	 * @return Integer Integer
	 */
	Integer crearCopiaPlanGestion(Integer codplanorigen, Integer codplandestino);

	/**
	 * Actualiza la fecha de actualizacion del plan de gestión
	 *
	 * @param planesGestion
	 *            PlanesGestion planesGestion
	 */
	void updateActualizar(PlanesGestion planesgestion);

	/**
	 * Actualiza la fecha de actualizacion del plan de gestión
	 *
	 * @param elem
	 *            ElementosArbol elem
	 */
	void updateActualizar(ElementosArbol elem);

	/**
	 * Actualiza la fecha de actualización de un plan de gestion
	 *
	 * @param accionesPg
	 *            AccionesPg
	 */
	void updateActualizar(AccionesPg accionesPg);
}
