Description: All queries executed through this special lightweight session will return results as of a past time. Objects read will be cached in a special isolated cache.
Responsibilities:org.eclipse.persistence.sessions.Session#acquireHistoricalSession
| Modifier and Type | Field and Description |
|---|---|
| protected final AsOfClause | |
| protected final AbstractSession |
| Access | Constructor and Description |
|---|---|
| public | HistoricalSession(AbstractSession parent, AsOfClause clause)
INTERNAL: Create and return a new Historical Session. |
| asOfClause | back to summary |
|---|---|
| protected final AsOfClause asOfClause | |
| parent | back to summary |
|---|---|
| protected final AbstractSession parent | |
| HistoricalSession | back to summary |
|---|---|
| public HistoricalSession(AbstractSession parent, AsOfClause clause) INTERNAL: Create and return a new Historical Session. | |
| acquireHistoricalSession | back to summary |
|---|---|
| public Session acquireHistoricalSession(AsOfClause clause) throws ValidationException Overrides org. Implements org. INTERNAL: Acquires a special historical session for reading objects as of a past time.
| |
| acquireUnitOfWork | back to summary |
|---|---|
| public UnitOfWorkImpl acquireUnitOfWork() Overrides org. Implements org. INTERNAL: A UnitOfWork can not be acquired from a Historical Session.
| |
| beginTransaction | back to summary |
|---|---|
| public void beginTransaction() throws DatabaseException, ConcurrencyException Overrides org. INTERNAL: No transactions should be used inside a HistoricalSession.
| |
| commitTransaction | back to summary |
|---|---|
| public void commitTransaction() throws DatabaseException, ConcurrencyException Overrides org. INTERNAL: No transactions should be used inside a HistoricalSession.
| |
| getAsOfClause | back to summary |
|---|---|
| public AsOfClause getAsOfClause() Overrides org. Implements org. ADVANCED: Answers a read-only data object, which knows whether it is a wall-clock time or a system change number.
| |
| getAsOfValue | back to summary |
|---|---|
| public Object getAsOfValue() PUBLIC: Answers the value this Session is As Of. Equivalent to getAsOfClause().getValue(). | |
| getExecutionSession | back to summary |
|---|---|
| public AbstractSession getExecutionSession(DatabaseQuery query) Overrides org. INTERNAL: Gets the session which this query will be executed on. Generally will be called immediately before the call is translated, which is immediately before session.executeCall. Since the execution session also knows the correct datasource platform to execute on, it is often used in the mappings where the platform is needed for type conversion, or where calls are translated. Is also the session with the accessor. Will return a ClientSession if it is in transaction and has a write connection.
| |
| getParent | back to summary |
|---|---|
| public AbstractSession getParent() Overrides org. INTERNAL: Returns the parent Session.
| |
| getServerPlatform | back to summary |
|---|---|
| public ServerPlatform getServerPlatform() Overrides org. Implements org. INTERNAL: Marked internal as this is not customer API but helper methods for accessing the server platform from within TopLink's other sessions types (ie not DatabaseSession)
| |
| hasAsOfClause | back to summary |
|---|---|
| public boolean hasAsOfClause() ADVANCED: Answers if all objects are to be read as of a past time. Only true if this is a special historical session.
| |
| internalExecuteQuery | back to summary |
|---|---|
| public Object internalExecuteQuery(DatabaseQuery query, AbstractRecord databaseRow) throws DatabaseException Overrides org. INTERNAL: Return the results from executing the database query. the arguments should be a database row with raw data values. No modify queries are allowed through a HistoricalSession.
| |
| isHistoricalSession | back to summary |
|---|---|
| public boolean isHistoricalSession() Overrides org. INTERNAL: Return if this session is a historical session.
| |
| isInTransaction | back to summary |
|---|---|
| public boolean isInTransaction() Overrides org. INTERNAL: Historical session are never in a transaction.
| |
| prepareDatabaseQuery | back to summary |
|---|---|
| public DatabaseQuery prepareDatabaseQuery(DatabaseQuery query) Overrides org. INTERNAL: A call back to do session specific preparation of a query. The call back occurs immediately before we clone the query for execution, meaning that if this method needs to clone the query then the caller will determine that it doesn't need to clone the query twice.
| |
| rollbackTransaction | back to summary |
|---|---|
| public void rollbackTransaction() throws DatabaseException, ConcurrencyException Overrides org. INTERNAL: No transactions should be used inside a HistoricalSession.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Doc from org. Print the connection status with the session.
| |