Package banco_imobiliario.AbstractFactoryLogradouro

Source Code of banco_imobiliario.AbstractFactoryLogradouro.ImovelFactory

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package banco_imobiliario.AbstractFactoryLogradouro;

import banco_imobiliario.dao.ImovelDAO;
import banco_imobiliario.dao.ImovelDAOImpl;
import banco_imobiliario.model.CasaDePropriedade;
import banco_imobiliario.model.Imovel;
import banco_imobiliario.model.Logradouro;



/**
*
* @author Andre
*/
public class ImovelFactory implements LogradouroFactory{

    @Override
    public CasaDePropriedade criarLogradouro(int id) {
        //Instanciando Objetos
        ImovelDAO imovelDao = new ImovelDAOImpl();       
        Imovel imovel;
       
        //Atribuindo ao objeto o retorno da empresa no banco de dados de acordo com o id passado
        imovel = imovelDao.buscarImovel(id);
              
        return imovel;
    }
   
}
TOP

Related Classes of banco_imobiliario.AbstractFactoryLogradouro.ImovelFactory

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.