package com.ejie.m62fb.service.registroVPP;


import java.util.List;

import com.ejie.m62fb.model.InquilinoAd;
import com.ejie.x38.dto.JQGridRequestDto;
import com.ejie.x38.dto.JQGridResponseDto;

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

public interface InquilinoAdService {

	/**
	 * 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);

	/**
	 * Deletes 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<InquilinoAd>
	 */
	List<InquilinoAd> findAllLike(InquilinoAd inquilinoAd, JQGridRequestDto jqGridRequestDto, Boolean startsWith);

	/*
	 * OPERACIONES RUP_TABLE
	 */

    
	/**
	 * Filter method in the InquilinoAd table.
	 *
	 * @param filterInquilinoAd InquilinoAd
	 * @param jqGridRequestDto JQGridRequestDto
	 * @param startsWith Boolean
	 * @return JQGridResponseDto<InquilinoAd>
	 */	
	JQGridResponseDto<InquilinoAd> filter(InquilinoAd filterInquilinoAd, JQGridRequestDto jqGridRequestDto,  Boolean startsWith);
    
    /**
	 * Reorder the selection made in InquilinoAd table.
	 *
	 * @param filterInquilinoAd InquilinoAd
	 * @param jqGridRequestDto JQGridRequestDto
	 * @param startsWith Boolean
	 * @return Object
	 */	
    Object 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);
    
}


