package com.ejie.ad74a.dao;

import com.ejie.x38.dto.JerarquiaDto;
import com.ejie.x38.dto.TableRequestDto;
import com.ejie.x38.dto.TableRowDto;

import java.math.BigDecimal;
import java.util.List;

import com.ejie.ad74a.model.Iprem;

/**
 * IpremDao generated by UDA, 04-oct-2023 15:51:45.
 * 
 * @author UDA
 */

public interface IpremDao {

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

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

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

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

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

	/**
	 * Finds rows in the Iprem table using like.
	 *
	 * @param iprem           Iprem
	 * @param tableRequestDto TableRequestDto
	 * @param startsWith      Boolean
	 * @return List
	 */
	List<Iprem> findAllLike(Iprem iprem, TableRequestDto tableRequestDto, Boolean startsWith);

	/*
	 * OPERACIONES RUP_TABLE
	 */

	/**
	 * Filter in the Iprem table.
	 *
	 * @param tableRequestDto TableRequestDto
	 */
	void removeMultiple(TableRequestDto tableRequestDto);

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

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

	/**
	 * Reorder selection.
	 *
	 * @param filterIprem     Iprem
	 * @param tableRequestDto TableRequestDto
	 * @param startsWith      Boolean
	 * @return List<TableRowDto<Iprem>>
	 */
	List<TableRowDto<Iprem>> reorderSelection(Iprem filterIprem, TableRequestDto tableRequestDto, Boolean startsWith);

	/**
	 * Searches in the Usuario table.
	 *
	 * @param filterIprem     Iprem
	 * @param searchIprem     Iprem
	 * @param tableRequestDto TableRequestDto
	 * @param startsWith      Boolean
	 * @return List<TableRowDto<Iprem>>
	 */
	List<TableRowDto<Iprem>> search(Iprem filterIprem, Iprem searchIprem, TableRequestDto tableRequestDto,
			Boolean startsWith);

	/*
	 * OPERACIONES RUP_TABLE JERARQUIA
	 */

	/**
	 * Filter in the hierarchical Iprem table.
	 *
	 * @param filterIprem     Iprem
	 * @param tableRequestDto TableRequestDto
	 * @return List<JerarquiaDto<Iprem>>
	 */
	List<JerarquiaDto<Iprem>> findAllLikeJerarquia(Iprem filterIprem, TableRequestDto tableRequestDto);

	/**
	 * Count rows in hierarchy
	 *
	 * @param filterIprem     Iprem
	 * @param tableRequestDto TableRequestDto
	 * @return Long
	 */
	Long findAllLikeCountJerarquia(Iprem filterIprem, TableRequestDto tableRequestDto);

	/**
	 * Find dependent hierarchical rows
	 *
	 * @param filterIprem     Iprem
	 * @param tableRequestDto TableRequestDto
	 * @return List<TableRowDto<Iprem>>
	 */
	List<TableRowDto<Iprem>> findAllChild(Iprem filterIprem, TableRequestDto tableRequestDto);

	/**
	 * Exporta Datos al clipBoard
	 *
	 */
	List<Iprem> getMultiple(Iprem filterIprem, TableRequestDto tableRequestDto, Boolean startsWith);

	BigDecimal getByAnio79(Iprem iprem);

	List<Iprem> getAnioIPREMList();

	Iprem getMaxIprem();

	Iprem getIpremActual();

	Iprem getIpremAnio(Long anio);

}
