package com.ejie.ab79.dao;

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

import java.util.List;
import com.ejie.ab79.model.RelOriDir;

/**
 * RelOriDirDao  
 * 
 *  
 */

public interface RelOriDirDao {

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

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

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

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

	/*
	 * OPERACIONES RUP_TABLE
	 */

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

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

	public List<TableRowDto<RelOriDir>> reorderSelection(RelOriDir relOriDir, TableRequestDto tableRequestDto,
			Boolean startsWith);

	RelOriDir findByOrigenDireccion(RelOriDir relOriDir);

}
