| Modifier and Type | Field and Description |
|---|---|
| private IndexColumn[] | |
| private Index | |
| private boolean | |
| private NullsDistinct | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| public | ConstraintUnique(Schema schema, int id, String name, Table table, boolean primaryKey, NullsDistinct nullsDistinct)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | checkExistingData(SessionLocal
the session session)Implements abstract org. Check the existing data. |
| public void | checkRow(SessionLocal
the session session, Table the table t, Row the old row oldRow, Row the new row newRow)Implements abstract org. Check if this row fulfils the constraint. |
| public IndexColumn[] | |
| public Constraint. | getConstraintType()
Implements abstract org. The constraint type name |
| public String | |
| public String | getCreateSQLForCopy(Table
the new table forTable, String the quoted name quotedName)Overrides org. Build a SQL statement to re-create the object, or to create a copy of the object with a different name or referencing a different table |
| private String | |
| public String | getCreateSQLWithoutIndexes()
Implements abstract org. Get the SQL statement to create this constraint. |
| public Index | getIndex()
Overrides org. Get the index of this constraint in the source table, or null if no index is used. |
| public NullsDistinct | |
| public HashSet | getReferencedColumns(Table
the table table)Implements abstract org. Get all referenced columns. |
| public boolean | isBefore()
Implements abstract org. Check if this constraint needs to be checked before updating the data. |
| public void | rebuild()
Implements abstract org. This method is called after a related table has changed (the table was renamed, or columns have been renamed). |
| public void | removeChildrenAndResources(SessionLocal
the session session)Implements abstract org. Delete all dependent children objects and resources of this object. |
| public void | |
| public void | |
| public void | setIndexOwner(Index
the index index)Implements abstract org. This index is now the owner of the specified index. |
| public boolean | usesIndex(Index
the index idx)Implements abstract org. Check if this constraint needs the specified index. |
| columns | back to summary |
|---|---|
| private IndexColumn[] columns | |
| index | back to summary |
|---|---|
| private Index index | |
| indexOwner | back to summary |
|---|---|
| private boolean indexOwner | |
| nullsDistinct | back to summary |
|---|---|
| private NullsDistinct nullsDistinct | |
| primaryKey | back to summary |
|---|---|
| private final boolean primaryKey | |
| ConstraintUnique | back to summary |
|---|---|
| public ConstraintUnique(Schema schema, int id, String name, Table table, boolean primaryKey, NullsDistinct nullsDistinct) | |
| checkExistingData | back to summary |
|---|---|
| public void checkExistingData(SessionLocal session) Implements abstract org. Doc from org. Check the existing data. This method is called if the constraint is added after data has been inserted into the table.
| |
| checkRow | back to summary |
|---|---|
| public void checkRow(SessionLocal session, Table t, Row oldRow, Row newRow) Implements abstract org. Doc from org. Check if this row fulfils the constraint. This method throws an exception if not.
| |
| getColumns | back to summary |
|---|---|
| public IndexColumn[] getColumns() | |
| getConstraintType | back to summary |
|---|---|
| public Constraint. Implements abstract org. Doc from org. The constraint type name
| |
| getCreateSQL | back to summary |
|---|---|
| public String getCreateSQL() Implements abstract org. Doc from org. Construct the CREATE ... SQL statement for this object. | |
| getCreateSQLForCopy | back to summary |
|---|---|
| public String getCreateSQLForCopy(Table forTable, String quotedName) Overrides org. Doc from org. Build a SQL statement to re-create the object, or to create a copy of the object with a different name or referencing a different table | |
| getCreateSQLForCopy | back to summary |
|---|---|
| private String getCreateSQLForCopy(Table forTable, String quotedName, boolean internalIndex) | |
| getCreateSQLWithoutIndexes | back to summary |
|---|---|
| public String getCreateSQLWithoutIndexes() Implements abstract org. Doc from org. Get the SQL statement to create this constraint. | |
| getIndex | back to summary |
|---|---|
| public Index getIndex() Overrides org. Doc from org. Get the index of this constraint in the source table, or null if no index is used. | |
| getNullsDistinct | back to summary |
|---|---|
public NullsDistinct getNullsDistinct()
| |
| getReferencedColumns | back to summary |
|---|---|
| public HashSet Implements abstract org. Doc from org. Get all referenced columns. | |
| isBefore | back to summary |
|---|---|
| public boolean isBefore() Implements abstract org. Doc from org. Check if this constraint needs to be checked before updating the data.
| |
| rebuild | back to summary |
|---|---|
| public void rebuild() Implements abstract org. Doc from org. This method is called after a related table has changed (the table was renamed, or columns have been renamed).
| |
| removeChildrenAndResources | back to summary |
|---|---|
| public void removeChildrenAndResources(SessionLocal session) Implements abstract org. Doc from org. Delete all dependent children objects and resources of this object.
| |
| setColumns | back to summary |
|---|---|
| public void setColumns(IndexColumn[] columns) | |
| setIndex | back to summary |
|---|---|
| public void setIndex(Index index, boolean isOwner) Set the index to use for this unique constraint.
| |
| setIndexOwner | back to summary |
|---|---|
| public void setIndexOwner(Index index) Implements abstract org. Doc from org. This index is now the owner of the specified index. | |
| usesIndex | back to summary |
|---|---|
| public boolean usesIndex(Index idx) Implements abstract org. Doc from org. Check if this constraint needs the specified index. | |