return lg;
}
public Logradouro pesquisarLogradouroPorNome(String nome){
Session session = factory.openSession();
SQLQuery query = session.createSQLQuery("SELECT {logradouro.*} FROM logradouro {logradouro} WHERE nome like '"+nome+"'");
query.addEntity("logradouro", Logradouro.class);
Logradouro lg = null;
if(query.list().size() > 0){
lg = (Logradouro) query.list().get(0);
}
session.close();
return lg;
}