public class AsOfClause
extends java.lang.Object
implements java.io.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)
, org.eclipse.persistence.queries.ObjectLevelReadQuery#asOf(AsOfClause)
, org.eclipse.persistence.sessions.Session#acquireSessionAsOf(AsOfClause)
, HistoryPolicy
, Serialized FormModifier and Type | Field and Description |
---|---|
static AsOfClause |
NO_CLAUSE |
Constructor and Description |
---|
AsOfClause(java.util.Calendar calendar) |
AsOfClause(java.util.Date date) |
AsOfClause(Expression expression) |
AsOfClause(long time) |
AsOfClause(java.lang.Long time) |
AsOfClause(java.sql.Timestamp timestamp) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object object)
INTERNAL: Return if the as of is equal to the other.
|
java.lang.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.
|
java.lang.String |
toString() |
public static final AsOfClause NO_CLAUSE
public AsOfClause(java.util.Date date)
public AsOfClause(java.sql.Timestamp timestamp)
public AsOfClause(java.util.Calendar calendar)
public AsOfClause(long time)
public AsOfClause(java.lang.Long time)
public AsOfClause(Expression expression)
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public void printSQL(org.eclipse.persistence.internal.expressions.ExpressionSQLPrinter printer)
public java.lang.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.
public java.lang.String toString()
toString
in class java.lang.Object