Top Description Fields Constructors Methods
org.eclipse.persistence.internal.history

public Class HistoricalDatabaseTable

extends DatabaseTable
Class Inheritance
Imports
org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform, org.eclipse.persistence.internal.helper.DatabaseTable, .Helper

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.

Author
Stephen McRitchie
Since
OracleAS TopLink 10g (10.1.3)

Field Summary

Modifier and TypeField and Description
protected String
protected String
Inherited from org.eclipse.persistence.internal.helper.DatabaseTable:
creationSuffixforeignKeyConstraintsindexesnamequalifiedNametableQualifieruniqueConstraintsuseDelimiters

Constructor Summary

AccessConstructor and Description
public
public
public
HistoricalDatabaseTable(String possiblyQualifiedName)

public
HistoricalDatabaseTable(DatabaseTable source, DatabaseTable mirroring, DatasourcePlatform platform)

Constructs a new database table which appears as guise but in fact really is identity.

Method Summary

Modifier and TypeMethod and Description
public String
public String
public void
Inherited from org.eclipse.persistence.internal.helper.DatabaseTable:
addForeignKeyConstraintaddIndexaddUniqueConstraintscloneequalsequalsgetCreationSuffixgetForeignKeyConstraintgetForeignKeyConstraintsgetIndexesgetNamegetNameDelimitedgetTableQualifiergetTableQualifierDelimitedgetUniqueConstraintshasForeignKeyConstraintshashCodehasIndexeshasNamehasUniqueConstraintsisDecoratedprintSQLresetQualifiedNamesetCreationSuffixsetNamesetNamesetPossiblyQualifiedNamesetPossiblyQualifiedNamesetTableQualifiersetTableQualifiersetUseDelimitersshouldUseDelimiterstoString

Field Detail

historicalNameback to summary
protected String historicalName
historicalNameDelimitedback to summary
protected String historicalNameDelimited

Constructor Detail

HistoricalDatabaseTableback to summary
public HistoricalDatabaseTable()
HistoricalDatabaseTableback to summary
public HistoricalDatabaseTable(String name, String qualifier)
HistoricalDatabaseTableback to summary
public HistoricalDatabaseTable(String possiblyQualifiedName)
HistoricalDatabaseTableback to summary
public HistoricalDatabaseTable(DatabaseTable source, DatabaseTable mirroring, DatasourcePlatform platform)

Constructs a new database table which appears as guise but in fact really is identity.

Method Detail

getQualifiedNameback to summary
public String getQualifiedName()

Overrides org.eclipse.persistence.internal.helper.DatabaseTable.getQualifiedName.

Annotations
@Override
getQualifiedNameDelimitedback to summary
public String getQualifiedNameDelimited(DatasourcePlatform platform)

Overrides org.eclipse.persistence.internal.helper.DatabaseTable.getQualifiedNameDelimited.

Annotations
@Override
setHistoricalNameback to summary
public void setHistoricalName(String name)