Is there a way to represent the maximum (and minimum) possible date in JPA without being database specific? The JPA implementation should be then be able to translate it to the correct value according to the used dialect.
If not JPA an Hibernate specific solution would also be OK.
Edit
In an application we are using there are several named queries which test if a date is in a given range
SELECT ... FROM ... WHERE somedate BETWEEN startdate AND end date
If the range is open (only startdate, or only enddate) it would be easier to use the maximum and minimum date that to have different queries with just a single comparison (this would require several changes in the existing application that I would like to avoid).
Edit 2
For the not a real question voters: the question is:
It is possible to query for the maximum possible date in a database agnostic way?
Edit 3
The application is storing dates as java.util.Date
as follows
@Temporal( TemporalType.TIMESTAMP )
private java.util.Date someDate;