Java Persistence API (JPA) Extensions Reference for EclipseLink, Release 2.4
  Go To Table Of Contents
 Search
 PDFComments
Comments


history.as-of

Configures the query to query the state of the object as-of a point in time.


Values

Table 4-10 describes this query hint's values.

Table 4-10 Valid Values for history.as-of

Value Description

Timestamp

Timestamp, in the form: YYYY/MM/DD HH:MM:SS.n



Usage

Both the query execution and result will conform to the database as it existed in the past.


NoteNote:

This query hint requires a class with historical support or when using Oracle Flashback.



Examples

Example 4-21 Using history.as-of in a JPA Query

import org.eclipse.persistence.config.HintValues;
 import org.eclipse.persistence.config.QueryHints;
 query.setHint("eclipselink.AS_OF", "2012/10/15 11:21:18.2");

Example 4-22 Using history.as-of in @QueryHint Annotation

import org.eclipse.persistence.config.HintValues;
 import org.eclipse.persistence.config.QueryHints;
 @QueryHint(name=QueryHints.AS_OF, value="2012/10/15 11:21:18.2");


See Also

For more information, see: