Class HistoricalDatabaseTable
- java.lang.Object
-
- org.eclipse.persistence.internal.helper.DatabaseTable
-
- org.eclipse.persistence.internal.history.HistoricalDatabaseTable
-
- All Implemented Interfaces:
Serializable
,Cloneable
,CoreTable
public class HistoricalDatabaseTable extends DatabaseTable
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)
- Author:
- Stephen McRitchie
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String
historicalName
protected String
historicalNameDelimited
-
Fields inherited from class org.eclipse.persistence.internal.helper.DatabaseTable
creationSuffix, foreignKeyConstraints, indexes, name, qualifiedName, tableQualifier, uniqueConstraints, useDelimiters
-
-
Constructor Summary
Constructors Constructor Description HistoricalDatabaseTable()
HistoricalDatabaseTable(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getQualifiedName()
String
getQualifiedNameDelimited(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
-
-
-
-
Constructor Detail
-
HistoricalDatabaseTable
public HistoricalDatabaseTable()
-
HistoricalDatabaseTable
public HistoricalDatabaseTable(String possiblyQualifiedName)
-
HistoricalDatabaseTable
public HistoricalDatabaseTable(DatabaseTable source, DatabaseTable mirroring, DatasourcePlatform platform)
Constructs a new database table which appears asguise
but in fact really isidentity
.
-
-
Method Detail
-
setHistoricalName
public void setHistoricalName(String name)
-
getQualifiedName
public String getQualifiedName()
- Overrides:
getQualifiedName
in classDatabaseTable
-
getQualifiedNameDelimited
public String getQualifiedNameDelimited(DatasourcePlatform platform)
- Overrides:
getQualifiedNameDelimited
in classDatabaseTable
-
-