public class HistoricalDatabaseTable extends DatabaseTable
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.
Constructor and Description |
---|
HistoricalDatabaseTable() |
HistoricalDatabaseTable(DatabaseTable source,
DatabaseTable mirroring,
DatasourcePlatform platform)
Constructs a new database table which appears as
guise but
in fact really is identity . |
HistoricalDatabaseTable(java.lang.String possiblyQualifiedName) |
HistoricalDatabaseTable(java.lang.String name,
java.lang.String qualifier) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getQualifiedName() |
java.lang.String |
getQualifiedNameDelimited(DatasourcePlatform platform) |
void |
setHistoricalName(java.lang.String name) |
addForeignKeyConstraint, addIndex, addUniqueConstraints, clone, equals, equals, getCreationSuffix, getForeignKeyConstraint, getForeignKeyConstraints, getIndexes, getName, getNameDelimited, getTableQualifier, getTableQualifierDelimited, getUniqueConstraints, hasForeignKeyConstraints, hashCode, hasIndexes, hasName, hasUniqueConstraints, isDecorated, printSQL, setCreationSuffix, setName, setName, setPossiblyQualifiedName, setPossiblyQualifiedName, setTableQualifier, setTableQualifier, setUseDelimiters, shouldUseDelimiters, toString
public HistoricalDatabaseTable()
public HistoricalDatabaseTable(java.lang.String name, java.lang.String qualifier)
public HistoricalDatabaseTable(java.lang.String possiblyQualifiedName)
public HistoricalDatabaseTable(DatabaseTable source, DatabaseTable mirroring, DatasourcePlatform platform)
guise
but
in fact really is identity
.public void setHistoricalName(java.lang.String name)
public java.lang.String getQualifiedName()
getQualifiedName
in class DatabaseTable
public java.lang.String getQualifiedNameDelimited(DatasourcePlatform platform)
getQualifiedNameDelimited
in class DatabaseTable
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference