Purpose: Define a fully qualified table name.
Responsibilities:
DatabaseField
| Modifier and Type | Field and Description |
|---|---|
| protected String | |
| protected Map | foreignKeyConstraints
JPA 2.1 Foreign key specification data |
| protected List | indexes
Store the set of indexes defined through meta-data for the table. |
| protected String | |
| protected String | |
| protected String | |
| protected Map | uniqueConstraints
Contains the user specified unique constraints. |
| protected boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public | |
| public | DatabaseTable(String tableName, String qualifier, boolean useDelimiters, String startDelimiter, String endDelimiter)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | addUniqueConstraints(String name, List<String> columnNames)
Add the unique constraint for the columns names. |
| public DatabaseTable | |
| public boolean | equals(Object
the reference object with which to compare. object)Overrides java. |
| public boolean | equals(DatabaseTable table)
Two tables are equal if their names and tables are equal, or their names are equal and one does not have a qualifier assigned. |
| public String | getCreationSuffix()
returns the suffix applied to the CREATE table statement on this field for DDL generation. |
| public ForeignKeyConstraint | |
| public Map | |
| public List | |
| public String | |
| public String | |
| public String | |
| public String | |
| public String | |
| public String | |
| public Map | |
| public boolean | |
| public int | hashCode()
Overrides java. |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public void | |
| protected void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public boolean | |
| public String |
| creationSuffix | back to summary |
|---|---|
| protected String creationSuffix | |
| foreignKeyConstraints | back to summary |
|---|---|
| protected Map<String, ForeignKeyConstraint> foreignKeyConstraints JPA 2.1 Foreign key specification data | |
| indexes | back to summary |
|---|---|
| protected List<IndexDefinition> indexes Store the set of indexes defined through meta-data for the table. | |
| name | back to summary |
|---|---|
| protected String name | |
| qualifiedName | back to summary |
|---|---|
| protected String qualifiedName | |
| tableQualifier | back to summary |
|---|---|
| protected String tableQualifier | |
| uniqueConstraints | back to summary |
|---|---|
| protected Map<String, List<List<String>>> uniqueConstraints Contains the user specified unique constraints. JPA 2.0 introduced the name element, therefore, if specified we will use that name to create the constraint. Constraints with no name will be added to the map under the null key and generated with a default name. Therefore, when a name is given the list size should only ever be 1. We will validate. The null key could have multiples however they will have their names defaulted (as we did before). | |
| useDelimiters | back to summary |
|---|---|
| protected boolean useDelimiters | |
| DatabaseTable | back to summary |
|---|---|
| public DatabaseTable() Initialize the newly allocated instance of this class. By default their is no qualifier. | |
| DatabaseTable | back to summary |
|---|---|
| public DatabaseTable(String possiblyQualifiedName) | |
| DatabaseTable | back to summary |
|---|---|
| public DatabaseTable(String possiblyQualifiedName, String startDelimiter, String endDelimiter) | |
| DatabaseTable | back to summary |
|---|---|
| public DatabaseTable(String tableName, String qualifier) | |
| DatabaseTable | back to summary |
|---|---|
| public DatabaseTable(String tableName, String qualifier, boolean useDelimiters, String startDelimiter, String endDelimiter) | |
| addForeignKeyConstraint | back to summary |
|---|---|
| public void addForeignKeyConstraint(ForeignKeyConstraint foreignKeyConstraint) | |
| addIndex | back to summary |
|---|---|
| public void addIndex(IndexDefinition index) Add an index definition to this table. | |
| addUniqueConstraints | back to summary |
|---|---|
| public void addUniqueConstraints(String name, List<String> columnNames) Add the unique constraint for the columns names. Used for DDL generation. For now we just add all the unique constraints as we would have before when we didn't have a name. | |
| clone | back to summary |
|---|---|
| public DatabaseTable clone() Overrides java. Return a shallow copy of the receiver.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object object) Overrides java. Two tables are equal if their names and tables are equal, or their names are equal and one does not have a qualifier assigned. This allows an unqualified table to equal the same fully qualified one.
| |
| equals | back to summary |
|---|---|
| public boolean equals(DatabaseTable table) Two tables are equal if their names and tables are equal, or their names are equal and one does not have a qualifier assigned. This allows an unqualified table to equal the same fully qualified one. | |
| getCreationSuffix | back to summary |
|---|---|
| public String getCreationSuffix() returns the suffix applied to the CREATE table statement on this field for DDL generation. | |
| getForeignKeyConstraint | back to summary |
|---|---|
| public ForeignKeyConstraint getForeignKeyConstraint(String name) | |
| getForeignKeyConstraints | back to summary |
|---|---|
| public Map | |
| getIndexes | back to summary |
|---|---|
| public List Return a list of index definitions. Used for DDL generation. | |
| getName | back to summary |
|---|---|
| public String getName() Get method for table name. | |
| getNameDelimited | back to summary |
|---|---|
| public String getNameDelimited(DatasourcePlatform platform) Get method for table name. | |
| getQualifiedName | back to summary |
|---|---|
| public String getQualifiedName() | |
| getQualifiedNameDelimited | back to summary |
|---|---|
| public String getQualifiedNameDelimited(DatasourcePlatform platform) | |
| getTableQualifier | back to summary |
|---|---|
| public String getTableQualifier() | |
| getTableQualifierDelimited | back to summary |
|---|---|
| public String getTableQualifierDelimited(DatasourcePlatform platform) | |
| getUniqueConstraints | back to summary |
|---|---|
| public Map Return a list of the unique constraints for this table. Used for DDL generation. | |
| hasForeignKeyConstraints | back to summary |
|---|---|
| public boolean hasForeignKeyConstraints() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Return the hashcode of the name, because it is fairly unique.
| |
| hasIndexes | back to summary |
|---|---|
| public boolean hasIndexes() | |
| hasName | back to summary |
|---|---|
| public boolean hasName() Determine whether the receiver has any identification information. Return true if the name or qualifier of the receiver are nonempty. | |
| hasUniqueConstraints | back to summary |
|---|---|
| public boolean hasUniqueConstraints() | |
| isDecorated | back to summary |
|---|---|
| public boolean isDecorated() INTERNAL: Is this decorated / has an AS OF (some past time) clause. Example: SELECT ... FROM EMPLOYEE AS OF TIMESTAMP (exp) t0 ... | |
| printSQL | back to summary |
|---|---|
| public void printSQL(ExpressionSQLPrinter printer) throws IOException Print the table's SQL from clause. | |
| resetQualifiedName | back to summary |
|---|---|
| protected void resetQualifiedName() | |
| setCreationSuffix | back to summary |
|---|---|
| public void setCreationSuffix(String creationSuffix) | |
| setName | back to summary |
|---|---|
| public void setName(String name) Set the table name. Used when aliasing table names. | |
| setName | back to summary |
|---|---|
| public void setName(String name, String startDelimiter, String endDelimiter) Set the table name. Used when aliasing table names. If the name contains database delimiters, they will be stripped and a flag will be set to have them added when the DatabaseTable is written to SQL | |
| setPossiblyQualifiedName | back to summary |
|---|---|
| public void setPossiblyQualifiedName(String possiblyQualifiedName) Used to map the project xml. Any time a string name is read from the project xml, we must check if it is fully qualified and split the actual name from the qualifier. | |
| setPossiblyQualifiedName | back to summary |
|---|---|
| public void setPossiblyQualifiedName(String possiblyQualifiedName, String startDelimiter, String endDelimiter) | |
| setTableQualifier | back to summary |
|---|---|
| public void setTableQualifier(String qualifier) | |
| setTableQualifier | back to summary |
|---|---|
| public void setTableQualifier(String qualifier, String startDelimiter, String endDelimiter) | |
| setUseDelimiters | back to summary |
|---|---|
| public void setUseDelimiters(boolean useDelimiters) | |
| shouldUseDelimiters | back to summary |
|---|---|
| public boolean shouldUseDelimiters() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |