public class ConstraintDomain 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 |
|---|
ConstraintDomain(Schema schema,
int id,
java.lang.String name,
Domain domain) |
| Modifier and Type | Method and Description |
|---|---|
void |
check(SessionLocal session,
Value value)
Check the specified value.
|
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.
|
Expression |
getCheckConstraint(SessionLocal session,
java.lang.String columnName)
Get the check constraint expression for this column.
|
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.
|
Domain |
getDomain()
Returns the domain of 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(SessionLocal session,
Expression expr)
Set the expression.
|
void |
setIndexOwner(Index index)
This index is now the owner of the specified index.
|
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 Domain getDomain()
public void setExpression(SessionLocal session, Expression expr)
session - the sessionexpr - the expressionpublic 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 void check(SessionLocal session, Value value)
session - the sessionvalue - the value to checkpublic Expression getCheckConstraint(SessionLocal session, java.lang.String columnName)
session - the sessioncolumnName - the column namepublic 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