Module org.eclipse.persistence.core
Class HistoricalDatabaseTable
java.lang.Object
org.eclipse.persistence.internal.helper.DatabaseTable
org.eclipse.persistence.internal.history.HistoricalDatabaseTable
- All Implemented Interfaces:
Serializable
,Cloneable
,CoreTable
INTERNAL:
An impersonating database table is one that pretends to be another database
table, and whose true identity is revealed only when printed as SQL.
a.k.a HistoricalDatabaseTable, DisguisedDatabaseTable
More precisely, if a is impersonating b, (a.equals(b) == true) but (a.getQualifiedName().equals(b.getQualifiedName()) == false).
This class is used in temporal versioning, where every update to one table triggers an update to a nearly identical historical table. This second update is almost identical to the first, save that the table names are different (i.e. EMPLOYEE -> EMPLOYEE_HIST). It is much easier just to switch the table names at the last minute, as database fields in the descriptors and expressions have hardcoded table names.
- Since:
- OracleAS TopLink 10g (10.1.3)
- See Also:
-
Field Summary
Fields inherited from class org.eclipse.persistence.internal.helper.DatabaseTable
creationSuffix, foreignKeyConstraints, indexes, name, qualifiedName, tableQualifier, uniqueConstraints, useDelimiters
-
Constructor Summary
ConstructorDescriptionHistoricalDatabaseTable
(String possiblyQualifiedName) HistoricalDatabaseTable
(String name, String qualifier) HistoricalDatabaseTable
(DatabaseTable source, DatabaseTable mirroring, DatasourcePlatform platform) Constructs a new database table which appears asguise
but in fact really isidentity
. -
Method Summary
Modifier and TypeMethodDescriptiongetQualifiedNameDelimited
(DatasourcePlatform platform) void
setHistoricalName
(String name) Methods inherited from class org.eclipse.persistence.internal.helper.DatabaseTable
addForeignKeyConstraint, addIndex, addUniqueConstraints, clone, equals, equals, getCreationSuffix, getForeignKeyConstraint, getForeignKeyConstraints, getIndexes, getName, getNameDelimited, getTableQualifier, getTableQualifierDelimited, getUniqueConstraints, hasForeignKeyConstraints, hashCode, hasIndexes, hasName, hasUniqueConstraints, isDecorated, printSQL, resetQualifiedName, setCreationSuffix, setName, setName, setPossiblyQualifiedName, setPossiblyQualifiedName, setTableQualifier, setTableQualifier, setUseDelimiters, shouldUseDelimiters, toString
-
Field Details
-
historicalName
-
historicalNameDelimited
-
-
Constructor Details
-
HistoricalDatabaseTable
public HistoricalDatabaseTable() -
HistoricalDatabaseTable
-
HistoricalDatabaseTable
-
HistoricalDatabaseTable
public HistoricalDatabaseTable(DatabaseTable source, DatabaseTable mirroring, DatasourcePlatform platform) Constructs a new database table which appears asguise
but in fact really isidentity
.
-
-
Method Details
-
setHistoricalName
-
getQualifiedName
- Overrides:
getQualifiedName
in classDatabaseTable
-
getQualifiedNameDelimited
- Overrides:
getQualifiedNameDelimited
in classDatabaseTable
-