List of usage examples for org.hibernate Query setLong
@Deprecated @SuppressWarnings("unchecked") default Query<R> setLong(String name, long val)
From source file:br.gov.jfrj.siga.hibernate.ExDao.java
License:Open Source License
public int consultarQuantidadeParaArquivarIntermediarioEmLote(DpLotacao lot) { final Query query = getSessao().getNamedQuery("consultarQuantidadeParaArquivarIntermediarioEmLote"); query.setLong("idOrgaoUsu", lot.getOrgaoUsuario().getIdOrgaoUsu()); return ((Long) query.uniqueResult()).intValue(); }
From source file:br.gov.jfrj.siga.hibernate.ExDao.java
License:Open Source License
public List<ExItemDestinacao> consultarParaArquivarPermanenteEmLote(DpLotacao lot, int offset) { final Query query = getSessao().getNamedQuery("consultarParaArquivarPermanenteEmLote"); query.setLong("idOrgaoUsu", lot.getOrgaoUsuario().getIdOrgaoUsu()); query.setFirstResult(offset);//from ww w . j a va 2s .c o m query.setMaxResults(100); List<Object[]> results = query.list(); List<ExItemDestinacao> listaFinal = new ArrayList<ExItemDestinacao>(); for (Object[] result : results) { listaFinal.add(new ExItemDestinacao(result)); } return listaFinal; }
From source file:br.gov.jfrj.siga.hibernate.ExDao.java
License:Open Source License
public int consultarQuantidadeParaArquivarPermanenteEmLote(DpLotacao lot) { final Query query = getSessao().getNamedQuery("consultarQuantidadeParaArquivarPermanenteEmLote"); query.setLong("idOrgaoUsu", lot.getOrgaoUsuario().getIdOrgaoUsu()); return ((Long) query.uniqueResult()).intValue(); }
From source file:br.gov.jfrj.siga.hibernate.ExDao.java
License:Open Source License
@SuppressWarnings("unchecked") public Iterator<ExMobil> consultarParaTransferirEmLote(DpLotacao lot) { final Query query = getSessao().getNamedQuery("consultarParaTransferirEmLote"); query.setLong("lotaIni", lot.getIdLotacaoIni()); //return query; return query.iterate(); }
From source file:br.gov.jfrj.siga.hibernate.ExDao.java
License:Open Source License
public List<ExMobil> consultarParaAnotarEmLote(DpLotacao lot) { final Query query = getSessao().getNamedQuery("consultarParaAnotarEmLote"); query.setLong("lotaIni", lot.getIdLotacaoIni()); return query.list(); }
From source file:br.gov.jfrj.siga.hibernate.ExDao.java
License:Open Source License
public List<ExItemDestinacao> consultarAEliminar(CpOrgaoUsuario orgaoUsu, Date dtIni, Date dtFim) { final Query query = getSessao().getNamedQuery("consultarAEliminar"); query.setLong("idOrgaoUsu", orgaoUsu.getIdOrgaoUsu()); query.setDate("dtIni", dtIni); query.setDate("dtFim", dtFim); long ini = System.currentTimeMillis(); List<Object[]> results = query.list(); List<ExItemDestinacao> listaFinal = new ArrayList<ExItemDestinacao>(); for (Object[] result : results) { listaFinal.add(new ExItemDestinacao(result)); }/* www. ja v a2 s . c o m*/ long fim = System.currentTimeMillis() - ini; return listaFinal; }
From source file:br.gov.jfrj.siga.hibernate.ExDao.java
License:Open Source License
public int consultarQuantidadeAEliminar(CpOrgaoUsuario orgaoUsu, Date dtIni, Date dtFim) { final Query query = getSessao().getNamedQuery("consultarQuantidadeAEliminar"); query.setLong("idOrgaoUsu", orgaoUsu.getIdOrgaoUsu()); query.setDate("dtIni", dtIni); query.setDate("dtFim", dtFim); return ((Long) query.uniqueResult()).intValue(); }
From source file:br.gov.jfrj.siga.hibernate.ExDao.java
License:Open Source License
public List<ExItemDestinacao> consultarEmEditalEliminacao(CpOrgaoUsuario orgaoUsu, Date dtIni, Date dtFim) { final Query query = getSessao().getNamedQuery("consultarEmEditalEliminacao"); query.setLong("idOrgaoUsu", orgaoUsu.getIdOrgaoUsu()); query.setDate("dtIni", dtIni); query.setDate("dtFim", dtFim); List<Object[]> results = query.list(); List<ExItemDestinacao> listaFinal = new ArrayList<ExItemDestinacao>(); for (Object[] result : results) { listaFinal.add(new ExItemDestinacao(result)); }/*w w w .j a v a2 s .c o m*/ return listaFinal; }
From source file:br.gov.jfrj.siga.hibernate.ExDao.java
License:Open Source License
public List<ExMobil> consultarParaReceberEmLote(DpLotacao lot) { final Query query = getSessao().getNamedQuery("consultarParaReceberEmLote"); query.setLong("lotaIni", lot.getIdLotacaoIni()); return query.list(); }
From source file:br.gov.jfrj.siga.hibernate.ExDao.java
License:Open Source License
public List<ExMobil> consultarParaViaDeProtocolo(DpLotacao lot) { final Query query = getSessao().getNamedQuery("consultarParaViaDeProtocolo"); query.setLong("lotaIni", lot.getIdLotacaoIni()); return query.list(); }