package com.ejie.m62fb.dao.registroVPP;

import com.ejie.x38.dto.JQGridRequestDto;
import com.ejie.x38.dto.TableRowDto;
import java.util.List;

import com.ejie.m62fb.model.Inquilino;
import com.ejie.m62fb.model.InquilinoAd;


/**
 * InquilinoAdDao generated by UDA, 08-oct-2015 9:02:54.
XXXX
 */

public interface InquilinoAdDao {
    
    /**
     * Inserts a single row in the InquilinoAd table.
     *
     * @param inquilinoad InquilinoAd
     * @return InquilinoAd
     */
    InquilinoAd add(InquilinoAd inquilinoad);

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

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

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


	/**
     * Finds rows in the InquilinoAd table using like.
     *
     * @param inquilinoad InquilinoAd
     * @param jqGridRequestDto JQGridRequestDto
     * @param startsWith Boolean
     * @return List
     */
	List<InquilinoAd> findAllLike(InquilinoAd inquilinoad, JQGridRequestDto jqGridRequestDto, Boolean startsWith);
	
	
	/*
	 * OPERACIONES RUP_TABLE
	 */
	 
    /**
     * Counts rows in the InquilinoAd table using like.
     *
     * @param inquilinoad InquilinoAd
     * @param startsWith Boolean
     * @return Long
     */
    Long findAllLikeCount(InquilinoAd inquilinoad, Boolean startsWith);
    
    /**
	 * Reorder selection.
	 *
	 * @param filterInquilinoAd InquilinoAd
	 * @param jqGridRequestDto JQGridRequestDto
	 * @param startsWith Boolean
	 * @return List<TableRowDto<InquilinoAd>>
	 */	
    List<TableRowDto<InquilinoAd>> reorderSelection(InquilinoAd filterInquilinoAd, JQGridRequestDto jqGridRequestDto, Boolean startsWith);

    /**
     * Devuelve si existen contratos de alojamiento dotacional y de Etxelaguntza para el inquilino recibido
     * en el contrato que estamos dando de alta
     * 
     * @param idPersona
     * 			Integer
     * @param idContrato
	 *            Integer
     * @return
     */
	Boolean existsContract4Inquilino(Integer idPersona, Integer idContrato);
	
	/**
	 * Finds a single row in the Inquilino table.
	 * 
	 * @param inquilinoad
	 *            InquilinoAd
	 * @return InquilinoAd
	 */
	InquilinoAd findForUpdate(InquilinoAd inquilinoad);
    
	
}

