Advertisement
Guest User

Untitled

a guest
Jul 3rd, 2015
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. public boolean possuiHistorico(Long atendimentoId) {
  2. QueryAtendimentoProfissional query = new QueryAtendimentoProfissional(this.getEm());
  3. query.andAtendimentoIdEqual(atendimentoId);
  4.  
  5. Date dataInicio = EsusDataUtil.normalizeTime(EsusDataUtil.getDataAtual(), true);
  6. Date dataFim = EsusDataUtil.normalizeTime(EsusDataUtil.getDataAtual(), false);
  7.  
  8. query.andDataInicioBetween(dataInicio, dataFim);
  9.  
  10. return query.count() > 0;
  11. }
  12.  
  13. public void andDataInicioBetween(Date dataInicio, Date dataFim) {
  14. this.and(this.getBasePath().dataHorarioInicio.between(dataInicio, dataFim));
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement