| Modifier and Type | Field and Description |
|---|---|
| private IndexColumn[] | |
| private ConstraintActionType | |
| private String | |
| private Index | |
| private boolean | |
| private IndexColumn[] | |
| private ConstraintUnique | |
| private Table | |
| private boolean | |
| private ConstraintActionType | |
| private String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| private void | |
| private void | |
| 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. |
| private void | |
| private void | |
| private void | |
| private boolean | |
| public IndexColumn[] | |
| public Constraint. | getConstraintType()
Implements abstract org. The constraint type name |
| public String | |
| public String | Returns: the SQL statementthe table to create the object for forTable, String the name of this object (quoted if necessary) quotedName)Overrides org. Create the SQL statement of this object so a copy of the table can be made. |
| public String | Returns: the SQL statementthe table to create the object for forTable, Table the referenced table forRefTable, String the name of this object (quoted if necessary) quotedName, boolean add the index name to the statement internalIndex)Create the SQL statement of this object so a copy of the table can be made. |
| public String | getCreateSQLWithoutIndexes()
Implements abstract org. Get the SQL statement to create this constraint. |
| private Prepared | |
| public ConstraintActionType | |
| public Index | getIndex()
Overrides org. Get the index of this constraint in the source table, or null if no index is used. |
| public IndexColumn[] | |
| public HashSet | getReferencedColumns(Table
the table table)Implements abstract org. Get all referenced columns. |
| public ConstraintUnique | getReferencedConstraint()
Overrides org. Returns the referenced unique constraint, or null. |
| public Table | |
| private String | Returns: the descriptionthe index, or null searchIndex, SearchRow the row, or null check)Get a short description of the constraint. |
| private Prepared | |
| public ConstraintActionType | |
| public boolean | isBefore()
Implements abstract org. Check if this constraint needs to be checked before updating the data. |
| private boolean | |
| private Prepared | |
| 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 | setDeleteAction(ConstraintActionType
the action action)Set the action to apply (restrict, cascade,...) on a delete. |
| public void | |
| public void | setIndexOwner(Index
the index index)Implements abstract org. This index is now the owner of the specified index. |
| public void | |
| public void | setRefConstraint(ConstraintUnique
the unique constraint refConstraint)Set the unique constraint of the referenced table to use for this constraint. |
| public void | |
| public void | setUpdateAction(ConstraintActionType
the action action)Set the action to apply (restrict, cascade,...) on an update. |
| private void | |
| public void | |
| private void | |
| 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 | |
| deleteAction | back to summary |
|---|---|
| private ConstraintActionType deleteAction | |
| deleteSQL | back to summary |
|---|---|
| private String deleteSQL | |
| index | back to summary |
|---|---|
| private Index index | |
| indexOwner | back to summary |
|---|---|
| private boolean indexOwner | |
| refColumns | back to summary |
|---|---|
| private IndexColumn[] refColumns | |
| refConstraint | back to summary |
|---|---|
| private ConstraintUnique refConstraint | |
| refTable | back to summary |
|---|---|
| private Table refTable | |
| skipOwnTable | back to summary |
|---|---|
| private boolean skipOwnTable | |
| updateAction | back to summary |
|---|---|
| private ConstraintActionType updateAction | |
| updateSQL | back to summary |
|---|---|
| private String updateSQL | |
| ConstraintReferential | back to summary |
|---|---|
| public ConstraintReferential(Schema schema, int id, String name, Table table) | |
| appendUpdate | back to summary |
|---|---|
| private void appendUpdate(StringBuilder builder) | |
| appendWhere | back to summary |
|---|---|
| private void appendWhere(StringBuilder builder) | |
| buildDeleteSQL | back to summary |
|---|---|
| private void buildDeleteSQL() | |
| buildUpdateSQL | back to summary |
|---|---|
| private void buildUpdateSQL() | |
| 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.
| |
| checkRow | back to summary |
|---|---|
| private void checkRow(SessionLocal session, Row oldRow) | |
| checkRowOwnTable | back to summary |
|---|---|
| private void checkRowOwnTable(SessionLocal session, Row oldRow, Row newRow) | |
| checkRowRefTable | back to summary |
|---|---|
| private void checkRowRefTable(SessionLocal session, Row oldRow, Row newRow) | |
| existsRow | back to summary |
|---|---|
| private boolean existsRow(SessionLocal session, Index searchIndex, SearchRow check, Row excluding) | |
| 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. Create the SQL statement of this object so a copy of the table can be made. | |
| getCreateSQLForCopy | back to summary |
|---|---|
| public String getCreateSQLForCopy(Table forTable, Table forRefTable, String quotedName, boolean internalIndex) Create the SQL statement of this object so a copy of the table can be made. | |
| getCreateSQLWithoutIndexes | back to summary |
|---|---|
| public String getCreateSQLWithoutIndexes() Implements abstract org. Doc from org. Get the SQL statement to create this constraint. | |
| getDelete | back to summary |
|---|---|
| private Prepared getDelete(SessionLocal session) | |
| getDeleteAction | back to summary |
|---|---|
| public ConstraintActionType getDeleteAction() | |
| 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. | |
| getRefColumns | back to summary |
|---|---|
| public IndexColumn[] getRefColumns() | |
| getReferencedColumns | back to summary |
|---|---|
| public HashSet Implements abstract org. Doc from org. Get all referenced columns. | |
| getReferencedConstraint | back to summary |
|---|---|
| public ConstraintUnique getReferencedConstraint() Overrides org. Doc from org. Returns the referenced unique constraint, or null.
| |
| getRefTable | back to summary |
|---|---|
| public Table getRefTable() Overrides org.
| |
| getShortDescription | back to summary |
|---|---|
| private String getShortDescription(Index searchIndex, SearchRow check) Get a short description of the constraint. This includes the constraint name (if set), and the constraint expression. | |
| getUpdate | back to summary |
|---|---|
| private Prepared getUpdate(SessionLocal session) | |
| getUpdateAction | back to summary |
|---|---|
| public ConstraintActionType getUpdateAction() | |
| 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.
| |
| isEqual | back to summary |
|---|---|
| private boolean isEqual(Row oldRow, Row newRow) | |
| prepare | back to summary |
|---|---|
| private Prepared prepare(SessionLocal session, String sql, ConstraintActionType action) | |
| 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[] cols) | |
| setDeleteAction | back to summary |
|---|---|
| public void setDeleteAction(ConstraintActionType action) Set the action to apply (restrict, cascade,...) on a delete.
| |
| setIndex | back to summary |
|---|---|
| public void setIndex(Index index, boolean isOwner) Set the index to use for this 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. | |
| setRefColumns | back to summary |
|---|---|
| public void setRefColumns(IndexColumn[] refCols) | |
| setRefConstraint | back to summary |
|---|---|
| public void setRefConstraint(ConstraintUnique refConstraint) Set the unique constraint of the referenced table to use for this constraint.
| |
| setRefTable | back to summary |
|---|---|
| public void setRefTable(Table refTable) | |
| setUpdateAction | back to summary |
|---|---|
| public void setUpdateAction(ConstraintActionType action) Set the action to apply (restrict, cascade,...) on an update.
| |
| setWhere | back to summary |
|---|---|
| private void setWhere(Prepared command, int pos, Row row) | |
| updateOnTableColumnRename | back to summary |
|---|---|
| public void updateOnTableColumnRename() Update the constraint SQL when a referenced column is renamed. | |
| updateWithSkipCheck | back to summary |
|---|---|
| private void updateWithSkipCheck(Prepared prep) | |
| usesIndex | back to summary |
|---|---|
| public boolean usesIndex(Index idx) Implements abstract org. Doc from org. Check if this constraint needs the specified index. | |