public static Foto pesquisarFotoBanco(Integer idImovel, Integer fotoTipo) { Foto foto = new Foto(); String selection = FotoColunas.IMOVELATLZCAD_ID + "=?"; selection += " AND " + FotoColunas.FOTOTIPO + "=?"; String[] selectionArgs = new String[] {String.valueOf(idImovel), String.valueOf(fotoTipo)}; try { Fachada fachada = Fachada.getInstance(); foto = (Foto) fachada.pesquisar(foto, selection, selectionArgs); } catch (FachadaException e) { Log.e(ConstantesSistema.LOG_TAG, e.getMessage() + " - " + e.getCause()); } if (foto != null && foto.getId() != null) { return foto; } else { return null; } }