package com.ejie.m62fb.service.registroVPP;


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

import com.ejie.m62fb.model.Elemento;
import com.ejie.m62fb.model.ElementoActMasiva;
import com.ejie.x38.dto.JQGridRequestDto;
import com.ejie.x38.dto.JQGridResponseDto;

/**
 * ElementoService generated by UDA, 04-sep-2015 12:03:48.
XXXX
 */

public interface ElementosService {
	 /**
     * <p>Comprobar que el anejo no esté dado de alta ya en el sistema</p>
     *
     * @param elemento Elemento
     * @return boolean
     */
    boolean existenContratos(Elemento elemento);
    /**
     * <p>Desvincular un elemento a una vivienda</p>
     *
     * @param ideElemento BigDecimal
     * @return boolean
     */
    boolean desvincularElemento(BigDecimal  ideElemento,BigDecimal  numVivienda);
    /**
     * <p>Vincular un elemento a una vivienda</p>
     *
     * @param ideElemento BigDecimal
     * @param numVivienda BigDecimal
     * @return boolean
     */
    boolean vincularElemento(BigDecimal ideElemento, BigDecimal numVivienda);
	/**
	 * Inserts a single row in the Elemento table.
	 *
	 * @param m62r12t0 Elemento
	 * @return Elemento
	 */
    Elemento add(Elemento m62r12t0);
	/**
	 * Updates the direcction of a number of Elements
	 *
	 * @param m62r12t0 ElementoActMasiva
	 * @return ElementoActMasiva
	 */
    public Elemento updateDireccion(ElementoActMasiva elemento);
    
	/**
	 * Updates the portal of a number of Elements
	 *
	 * @param m62r12t0 ElementoActMasiva
	 * @return ElementoActMasiva
	 */
    public Elemento updatePortal(ElementoActMasiva elemento);
	/**
	 * Updates a single row in the Elemento table.
	 *
	 * @param m62r12t0 Elemento
	 * @return Elemento
	 */
	Elemento update(Elemento m62r12t0);

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

	/**
	 * Deletes a single row in the Elemento table.
	 *
	 * @param m62r12t0 Elemento
	 */
	void remove(Elemento m62r12t0);

	/**
	 * Finds a list of rows in the Elemento table.
	 *
	 * @param m62r12t0 Elemento
	 * @param jqGridRequestDto JQGridRequestDto
	 * @return List<Elemento>
	 */
	List<Elemento> findAll(Elemento m62r12t0, JQGridRequestDto jqGridRequestDto);

	/**
	 * Finds rows in the Elemento table using like.
	 *
	 * @param m62r12t0 Elemento
	 * @param jqGridRequestDto JQGridRequestDto
     * @param startsWith Boolean	 
	 * @return List<Elemento>
	 */
	List<Elemento> findAllLike(Elemento m62r12t0, JQGridRequestDto jqGridRequestDto, Boolean startsWith);
    
	/**
	 * Filter method in the Elemento table.
	 *
	 * @param filterElemento Elemento
	 * @param jqGridRequestDto JQGridRequestDto
	 * @param startsWith Boolean
	 * @return JQGridResponseDto<Elemento>
	 */	
	JQGridResponseDto<Elemento> filter(Elemento filterElemento, JQGridRequestDto jqGridRequestDto,  Boolean startsWith);
    
    /**
	 * Reorder the selection made in Elemento table.
	 *
	 * @param filterElemento Elemento
	 * @param jqGridRequestDto JQGridRequestDto
	 * @param startsWith Boolean
	 * @return Object
	 */	
    Object reorderSelection(Elemento filterElemento, JQGridRequestDto jqGridRequestDto, Boolean startsWith);
    
    /*
	 * OPERACIONES RUP_TABLE JERARQUIA
	 */
	 
	/**
	 * Finder method in the hierarchical the Elemento table.
	 *
	 * @param filterElemento Elemento
	 * @param jqGridRequestDto JQGridRequestDto
	 * @param startsWith Boolean
	 * @return JQGridResponseDto<JerarquiaDto<Elemento>>
	 */	
	//JQGridResponseDto<JerarquiaDto<Elemento>> jerarquia(Elemento filterElemento, JQGridRequestDto jqGridRequestDto, Boolean startsWith);
	
	/**
	 * Finder method for siblings rows in the hierarchical the Elemento table.
	 *
	 * @param filterElemento Elemento
	 * @param jqGridRequestDto JQGridRequestDto
	 * @return JQGridResponseDto<JerarquiaDto<Elemento>>
	 */	
	//JQGridResponseDto<JerarquiaDto<Elemento>> jerarquiaChildren(Elemento filterElemento, JQGridRequestDto jqGridRequestDto);
    
}


