| Modifier and Type | Class and Description |
|---|---|
| public static enum |
| Modifier and Type | Field and Description |
|---|---|
| protected Table | table
The table for which this constraint is defined. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public abstract void | |
| public abstract void | checkRow(SessionLocal
the session session, Table the table t, Row the old row oldRow, Row the new row newRow)Check if this row fulfils the constraint. |
| public int | compareTo(Constraint
the object to be compared. other)Implements java. Compares this object with the specified object for order. |
| public abstract Constraint. | |
| public abstract String | Returns: the SQL statementGet the SQL statement to create this constraint. |
| public Expression | |
| public Index | Returns: the indexGet the index of this constraint in the source table, or null if no index is used. |
| public abstract HashSet | Returns: the set of referenced columnsthe table table)Get all referenced columns. |
| public ConstraintUnique | Returns: the referenced unique constraint, or nullReturns the referenced unique constraint, or null. |
| public Table | |
| public Table | |
| public int | |
| public abstract boolean | Returns: true if it must be checked before updatingCheck if this constraint needs to be checked before updating the data. |
| public boolean | Returns: true if every visited expression returned true, or if there are no expressionsthe visitor visitor)Visit all elements in the constraint. |
| public abstract void | rebuild()
This method is called after a related table has changed (the table was renamed, or columns have been renamed). |
| public abstract void | |
| public abstract boolean |
| table | back to summary |
|---|---|
| protected Table table The table for which this constraint is defined. | |
| Constraint | back to summary |
|---|---|
| pack-priv Constraint(Schema schema, int id, String name, Table table) | |
| checkExistingData | back to summary |
|---|---|
| public abstract void checkExistingData(SessionLocal session) 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 abstract void checkRow(SessionLocal session, Table t, Row oldRow, Row newRow) Check if this row fulfils the constraint. This method throws an exception if not.
| |
| compareTo | back to summary |
|---|---|
| public int compareTo(Constraint other) Implements java. Doc from java. Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. The implementor must ensure The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| getConstraintType | back to summary |
|---|---|
| public abstract Constraint. The constraint type name
| |
| getCreateSQLWithoutIndexes | back to summary |
|---|---|
| public abstract String getCreateSQLWithoutIndexes() Get the SQL statement to create this constraint.
| |
| getExpression | back to summary |
|---|---|
| public Expression getExpression() Returns the CHECK expression or null.
| |
| getIndex | back to summary |
|---|---|
| public Index getIndex() Get the index of this constraint in the source table, or null if no index is used.
| |
| getReferencedColumns | back to summary |
|---|---|
| public abstract HashSet Get all referenced columns. | |
| getReferencedConstraint | back to summary |
|---|---|
| public ConstraintUnique getReferencedConstraint() Returns the referenced unique constraint, or null.
| |
| getRefTable | back to summary |
|---|---|
| public Table getRefTable() | |
| getTable | back to summary |
|---|---|
| public Table getTable() | |
| getType | back to summary |
|---|---|
| public int getType() Implements abstract org. Doc from org. Get the object type.
| |
| isBefore | back to summary |
|---|---|
| public abstract boolean isBefore() Check if this constraint needs to be checked before updating the data.
| |
| isEverything | back to summary |
|---|---|
| public boolean isEverything(ExpressionVisitor visitor) Visit all elements in the constraint.
| |
| rebuild | back to summary |
|---|---|
| public abstract void rebuild() This method is called after a related table has changed (the table was renamed, or columns have been renamed). | |
| setIndexOwner | back to summary |
|---|---|
| public abstract void setIndexOwner(Index index) This index is now the owner of the specified index.
| |
| usesIndex | back to summary |
|---|---|
| public abstract boolean usesIndex(Index index) Check if this constraint needs the specified index.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final Constraint. | CHECK
The constraint type for check constraints. |
| public static final Constraint. | DOMAIN
The constraint type for domain constraints. |
| public static final Constraint. | PRIMARY_KEY
The constraint type for primary key constraints. |
| public static final Constraint. | REFERENTIAL
The constraint type for referential constraints. |
| public static final Constraint. | UNIQUE
The constraint type for unique constraints. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public boolean | Returns: true if this type is a check or a domain type,
false otherwiseTests whether this type is a check or domain type or not. |
| public boolean | Returns: true if this type is a primary key or unique type,
false otherwiseTests whether this type is a primary key or unique or not. |
| public static Constraint. | |
| public static Constraint. |
| CHECK | back to summary |
|---|---|
| public static final Constraint. The constraint type for check constraints. | |
| DOMAIN | back to summary |
|---|---|
| public static final Constraint. The constraint type for domain constraints. | |
| PRIMARY_KEY | back to summary |
|---|---|
| public static final Constraint. The constraint type for primary key constraints. | |
| REFERENTIAL | back to summary |
|---|---|
| public static final Constraint. The constraint type for referential constraints. | |
| UNIQUE | back to summary |
|---|---|
| public static final Constraint. The constraint type for unique constraints. | |
| Type | back to summary |
|---|---|
| private Type() | |
| getSqlName | back to summary |
|---|---|
| public String getSqlName() Get standard SQL type name.
| |
| isCheck | back to summary |
|---|---|
| public boolean isCheck() Tests whether this type is a check or domain type or not.
| |
| isUnique | back to summary |
|---|---|
| public boolean isUnique() Tests whether this type is a primary key or unique or not.
| |
| valueOf | back to summary |
|---|---|
| public static Constraint. | |
| values | back to summary |
|---|---|
| public static Constraint. | |