List of usage examples for javax.persistence TemporalType DATE
TemporalType DATE
To view the source code for javax.persistence TemporalType DATE.
Click Source Link
java.sql.Date
From source file:com.encens.khipus.service.production.RawMaterialPayRollServiceBean.java
@Override public void approvedSession(Calendar startDate, Calendar endDate, ProductiveZone productiveZone) { if (productiveZone != null) { getEntityManager().createQuery(/* w ww.j av a 2 s .c om*/ "update RawMaterialCollectionSession rawMaterialCollectionSession set rawMaterialCollectionSession.state = 'APPROVED'" + " where rawMaterialCollectionSession.date between :startDate and :endDate " + " and rawMaterialCollectionSession.productiveZone = :productiveZone") .setParameter("startDate", startDate, TemporalType.DATE) .setParameter("endDate", endDate, TemporalType.DATE) .setParameter("productiveZone", productiveZone).executeUpdate(); } else { getEntityManager().createQuery( "update RawMaterialCollectionSession rawMaterialCollectionSession set rawMaterialCollectionSession.state = 'APPROVED'" + " where rawMaterialCollectionSession.date between :startDate and :endDate ") .setParameter("startDate", startDate, TemporalType.DATE) .setParameter("endDate", endDate, TemporalType.DATE).executeUpdate(); } }