If you have a date object that is + 1 month already you could do something like this:
public List findEmployees(Date endDate) {
return entityManager.createQuery(
"SELECT e from Employee e WHERE e.startDate BETWEEN ?1 AND ?2")
.setParameter(1,new Date(), TemporalType.DATE)
.setParameter(2,endDate, TemporalType.DATE).getResultList();
}
This however, requires that the dates be valid before hand.
UPDATE
If you always want the next month, you can use JodaTime which has a great and easy api.
You could then modify your query like this:
//Get next month
DateTime dt = new DateTime();
entityManager.createQuery(
"SELECT e from Employee e WHERE e.startDate BETWEEN ?1 AND ?2")
.setParameter(1,new Date(), TemporalType.DATE)
.setParameter(2,dt.plusMonths(1).toDate(), TemporalType.DATE).getResultList();