public class ConstraintCheck extends Constraint
Constraint.TypetableAGGREGATE, comment, COMMENT, CONSTANT, CONSTRAINT, database, DOMAIN, FUNCTION_ALIAS, INDEX, RIGHT, ROLE, SCHEMA, SEQUENCE, SETTING, SYNONYM, TABLE_OR_VIEW, trace, TRIGGER, USERADD_PLAN_INFORMATION, DEFAULT_SQL_FLAGS, NO_CASTS, QUOTE_ONLY_WHEN_REQUIRED, REPLACE_LOBS_FOR_TRACE, TRACE_SQL_FLAGS| Constructor and Description |
|---|
ConstraintCheck(Schema schema,
int id,
java.lang.String name,
Table table) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkExistingData(SessionLocal session)
Check the existing data.
|
void |
checkRow(SessionLocal session,
Table t,
Row oldRow,
Row newRow)
Check if this row fulfils the constraint.
|
Constraint.Type |
getConstraintType()
The constraint type name
|
java.lang.String |
getCreateSQL()
Construct the CREATE ...
|
java.lang.String |
getCreateSQLForCopy(Table forTable,
java.lang.String quotedName)
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
|
java.lang.String |
getCreateSQLWithoutIndexes()
Get the SQL statement to create this constraint.
|
Expression |
getExpression()
Returns the CHECK expression or null.
|
java.util.HashSet<Column> |
getReferencedColumns(Table table)
Get all referenced columns.
|
boolean |
isBefore()
Check if this constraint needs to be checked before updating the data.
|
boolean |
isEverything(ExpressionVisitor visitor)
Visit all elements in the constraint.
|
void |
rebuild()
This method is called after a related table has changed
(the table was renamed, or columns have been renamed).
|
void |
removeChildrenAndResources(SessionLocal session)
Delete all dependent children objects and resources of this object.
|
void |
setExpression(Expression expr) |
void |
setIndexOwner(Index index)
This index is now the owner of the specified index.
|
void |
setTableFilter(TableFilter filter) |
boolean |
usesIndex(Index index)
Check if this constraint needs the specified index.
|
compareTo, getIndex, getReferencedConstraint, getRefTable, getTable, getType, isHiddengetSchema, getSQL, getSQLcheckRename, getChildren, getComment, getCreateSQLForMeta, getDatabase, getDropSQL, getId, getModificationId, getName, invalidate, isTemporary, isValid, rename, setComment, setModified, setObjectName, setTemporary, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetTraceSQLpublic Constraint.Type getConstraintType()
ConstraintgetConstraintType in class Constraintpublic void setTableFilter(TableFilter filter)
public void setExpression(Expression expr)
public java.lang.String getCreateSQLForCopy(Table forTable, java.lang.String quotedName)
DbObjectgetCreateSQLForCopy in class DbObjectforTable - the new tablequotedName - the quoted namepublic java.lang.String getCreateSQLWithoutIndexes()
ConstraintgetCreateSQLWithoutIndexes in class Constraintpublic java.lang.String getCreateSQL()
DbObjectgetCreateSQL in class DbObjectpublic void removeChildrenAndResources(SessionLocal session)
DbObjectremoveChildrenAndResources in class DbObjectsession - the sessionpublic void checkRow(SessionLocal session, Table t, Row oldRow, Row newRow)
ConstraintcheckRow in class Constraintsession - the sessiont - the tableoldRow - the old rownewRow - the new rowpublic boolean usesIndex(Index index)
ConstraintusesIndex in class Constraintindex - the indexpublic void setIndexOwner(Index index)
ConstraintsetIndexOwner in class Constraintindex - the indexpublic java.util.HashSet<Column> getReferencedColumns(Table table)
ConstraintgetReferencedColumns in class Constrainttable - the tablepublic Expression getExpression()
ConstraintgetExpression in class Constraintpublic boolean isBefore()
ConstraintisBefore in class Constraintpublic void checkExistingData(SessionLocal session)
ConstraintcheckExistingData in class Constraintsession - the sessionpublic void rebuild()
Constraintrebuild in class Constraintpublic boolean isEverything(ExpressionVisitor visitor)
ConstraintisEverything in class Constraintvisitor - the visitor