Last active
February 27, 2020 02:57
-
-
Save Marlysson/1ad08b4a5819c2fd540d2d259b570f4c to your computer and use it in GitHub Desktop.
Refatorações
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Método que chama a geração de relatório | |
public void visualizarRelatorio(){ | |
// Montando o Map pra passar para o query interna. | |
HashMap<String, Object> argumentos = new HashMap<>(); | |
argumentos.put("unidade", sessaoUsuarioMB.getUnidadeSelecionada()); | |
argumentos.put("mes", mesSelecionado); | |
argumentos.put("ano", sessaoUsuarioMB.getAnoLetivo()); | |
argumentos.put("turma", turmaComplementarEscolhida); | |
argumentos.put("atividade", atividadeSelecionada); | |
argumentos.put("usuario", sessaoUsuarioMB.getUsuarioLogado()); | |
this.gerarRelatorioParaTurma(argumentos); | |
} | |
public void gerarRelatorioParaTurma(Map<String, Object argumentos){ | |
Unidade unidade = (Unidade) argumentos.get("unidade"); | |
Ano ano = (Ano) argumentos.get("anoLetivo"); | |
Mes mes = (Mes) argumentos.get("mes"); | |
Turma turma = (Turma) argumentos.get("turma"); | |
Atividade atividade = (Atividade) argumentos.get("atividade"); | |
Usuario usuario = (Usuario) argumentos.get("usuario"); | |
return this.query(unidade, ano, mes, turma, atividade, usuario); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void gerarRelatorioParaTurma(Unidade unidade, | |
AnoLetivo ano, | |
Mes mes, | |
Turma turma, | |
Atividade atividade, | |
Usuario usuario){ | |
// Realizar a lógica passando os parâmetros para método que realiza busca no banco de dados; | |
return this.query(unidade, ano, mes, turma, atividade, usuario); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment