public class Table extends ModelElement implements Comparable<Table>
| Modifier and Type | Field and Description |
|---|---|
List<Association> |
associations
Associations to other tables.
|
boolean |
defaultExcludeFromDeletion
Data Model default for Exclude from Deletion.
|
boolean |
defaultUpsert
Data model default for export mode.
|
Boolean |
excludeFromDeletion
Exclude from Deletion?
|
PrimaryKey |
primaryKey
The primary-key of the table.
|
Boolean |
upsert
Use upsert (merge) or insert-statement for entities of this table in export-script.
|
| Constructor and Description |
|---|
Table(String name,
PrimaryKey primaryKey,
boolean defaultUpsert,
boolean defaultExcludeFromDeletion)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Set<Table> |
closure(boolean directed)
Gets the closure of the table.
|
Set<Table> |
closure(Set<Table> tablesToIgnore,
boolean directed)
Gets the closure of the table.
|
int |
compareTo(Table o) |
boolean |
equals(Object other)
Compares tables.
|
List<Column> |
getColumns()
Gets columns.
|
Document |
getDefaultXmlTemplate(Quoting quoting)
Gets default template for XML exports as DOM.
|
String |
getName()
Gets the table name.
|
int |
getOrdinal()
Gets unique number of this table to be used as type discriminator in JAILER_ENTITY table.
|
String |
getOriginalName()
Gets the original table-name.
|
String |
getOriginalSchema(String defaultSchema)
Gets un-mapped schema name of table.
|
String |
getSchema(String defaultSchema)
Gets mapped schema name of table.
|
List<Column> |
getSelectionClause(Session session)
Gets all non-virtual columns of the table in the order in which they are selected.
|
String |
getUnqualifiedName()
Gets unqualified name of table.
|
Boolean |
getUpsert()
Gets export modus.
|
String |
getXmlTemplate()
Gets template for XML exports.
|
Document |
getXmlTemplateAsDocument(Quoting quoting)
Gets template for XML exports as DOM.
|
int |
hashCode()
The hash-code.
|
boolean |
isExcludedFromDeletion() |
void |
setColumns(List<Column> columns)
Sets columns.
|
void |
setOriginalName(String originalName)
Sets the original table-name.
|
void |
setXmlTemplate(String xmlTemplate)
Sets template for XML exports.
|
String |
toString()
Stringifies the table.
|
Set<Table> |
unrestrictedClosure(Set<Table> tables)
Gets the closure of the table, ignoring restrictions.
|
getAuthor, setAuthorpublic final PrimaryKey primaryKey
public final List<Association> associations
public Boolean upsert
public final boolean defaultUpsert
public Boolean excludeFromDeletion
public final boolean defaultExcludeFromDeletion
public Table(String name, PrimaryKey primaryKey, boolean defaultUpsert, boolean defaultExcludeFromDeletion)
name - the table-nameprimaryKey - the names of the primary-key columnsdefaultUpsert - data model default for export modepublic String getName()
public Boolean getUpsert()
public void setColumns(List<Column> columns)
columns - list of table columnspublic int compareTo(Table o)
compareTo in interface Comparable<Table>public Set<Table> closure(boolean directed)
directed - consider associations as directed?public Set<Table> closure(Set<Table> tablesToIgnore, boolean directed)
directed - consider associations as directed?tablesToIgnore - ignore this tablespublic Set<Table> unrestrictedClosure(Set<Table> tables)
tables - tables known in closurepublic void setXmlTemplate(String xmlTemplate)
public String getXmlTemplate()
public Document getXmlTemplateAsDocument(Quoting quoting) throws ParserConfigurationException, SAXException, IOException
public Document getDefaultXmlTemplate(Quoting quoting) throws ParserConfigurationException, SAXException, IOException
public String getOriginalSchema(String defaultSchema)
defaultSchema - the default schema to return if table name is unqualifiedpublic String getSchema(String defaultSchema)
defaultSchema - the default schema to return if table name is unqualifiedpublic String getUnqualifiedName()
public void setOriginalName(String originalName)
originalName - the original namepublic String getOriginalName()
public int getOrdinal()
public List<Column> getSelectionClause(Session session)
session - current sessionpublic boolean isExcludedFromDeletion()