public class AsOfClause extends Object implements Serializable
For Oracle 9R2 Flasback corresponds to the sub clause which appears between
the table and alias name in the FROM clause:
SELECT ... FROM EMPLOYEE AS OF TIMESTAMP (value) t0, ...
For generic historical schema support, a special criteria can be added to
the where clause for each table in a select:
((t0.ROW_START <= value) AND ((t0.END IS NULL) OR (t1.END > value)))
Responsibilities:
Expression.asOf(AsOfClause)
,
ObjectLevelReadQuery.setAsOfClause(AsOfClause)
,
Session.acquireHistoricalSession(AsOfClause)
,
HistoryPolicy
,
Serialized FormModifier and Type | Field and Description |
---|---|
static AsOfClause |
NO_CLAUSE |
Constructor and Description |
---|
AsOfClause(Calendar calendar) |
AsOfClause(Date date) |
AsOfClause(Expression expression) |
AsOfClause(long time) |
AsOfClause(Long time) |
AsOfClause(Timestamp timestamp) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object)
INTERNAL:
Return if the as of is equal to the other.
|
Object |
getValue()
PUBLIC:
The past time represented by the receiver.
|
boolean |
isAsOfSCNClause()
PUBLIC:
Indicates that
value is a system change number or an expression
evaluating to one. |
boolean |
isUniversal()
PUBLIC:
Answers if this is a UniversalAsOfClause, one to be applied
to the entire selection criteria.
|
void |
printSQL(org.eclipse.persistence.internal.expressions.ExpressionSQLPrinter printer)
INTERNAL:
Prints the as of clause for an expression inside of the FROM clause.
|
String |
toString() |
public static final AsOfClause NO_CLAUSE
public AsOfClause(Date date)
public AsOfClause(Timestamp timestamp)
public AsOfClause(Calendar calendar)
public AsOfClause(long time)
public AsOfClause(Long time)
public AsOfClause(Expression expression)
public boolean equals(Object object)
public void printSQL(org.eclipse.persistence.internal.expressions.ExpressionSQLPrinter printer)
public Object getValue()
public boolean isAsOfSCNClause()
value
is a system change number or an expression
evaluating to one.
In Oracle the value will have to be printed using the syntax AS OF SCN(value)
instead of AS OF TIMESTAMP(value)
.
AsOfSCNClause
public boolean isUniversal()
Used when a query is made as of a past time.