|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DefinitionFactory
This is factory for creating builders and syntax elements related to SQL Data Definition (typically CREATE
statements).
| Method Summary | |
|---|---|
CheckConstraint |
createCheckConstraint(BooleanExpression check)
Creates a CHECK clause, typically used in CREATE TABLE statements. |
ColumnDefinition |
createColumnDefinition(java.lang.String columnName,
SQLDataType columnDataType)
Creates a new definition of column with specified name and data type. |
ColumnDefinition |
createColumnDefinition(java.lang.String columnName,
SQLDataType columnDataType,
java.lang.Boolean mayBeNull)
Creates a new definition of column with specified name, data type, and NULL value policy. |
ColumnDefinition |
createColumnDefinition(java.lang.String columnName,
SQLDataType columnDataType,
java.lang.String columnDefault)
Creates a new definition of column with specified name, data type, default value. |
ColumnDefinition |
createColumnDefinition(java.lang.String columnName,
SQLDataType columnDataType,
java.lang.String columnDefault,
java.lang.Boolean mayBeNull)
Creates a new definition of column with specified name, data type, default value, and NULL value policy. |
ForeignKeyConstraintBuilder |
createForeignKeyConstraintBuilder()
Creates an empty builder for FOREIGN KEY constraint, typically used in CREATE TABLE statements. |
LikeClause |
createLikeClause(TableName tableName)
Creates a new LIKE
<table name> clause for CREATE TABLE statement. |
RegularViewSpecification |
createRegularViewSpecification(java.lang.String... columnNames)
Creates a new view specification with given columns. |
SchemaDefinitionBuilder |
createSchemaDefinitionBuilder()
Creates an empty builder for CREATE SCHEMA statement. |
TableConstraintDefinition |
createTableConstraintDefinition(java.lang.String name,
TableConstraint constraint)
Creates a new, named table constraint without any ConstraintCharacteristics. |
TableConstraintDefinition |
createTableConstraintDefinition(java.lang.String name,
TableConstraint constraint,
ConstraintCharacteristics characteristics)
Creates a new named table constraint with specified ConstraintCharacteristics. |
TableConstraintDefinition |
createTableConstraintDefinition(TableConstraint constraint)
Creates a new unnamed table constraint without any ConstraintCharacteristics. |
TableConstraintDefinition |
createTableConstraintDefinition(TableConstraint constraint,
ConstraintCharacteristics characteristics)
Creates a new unnamed table constraint with specified ConstraintCharacteristics. |
TableDefinitionBuilder |
createTableDefinitionBuilder()
Creates an empty builder for CREATE TABLE statement. |
TableElementListBuilder |
createTableElementListBuilder()
Creates an empty builder for defining columns and constraints for CREATE TABLE statement. |
UniqueConstraintBuilder |
createUniqueConstraintBuilder()
Creates an empty builder for unique constraint (either UNIQUE(columns...) or
PRIMARY KEY(columns...)), typically used in CREATE TABLE statements. |
ViewDefinitionBuilder |
createViewDefinitionBuilder()
Creates an empty builder for CREATE VIEW statement. |
| Method Detail |
|---|
SchemaDefinitionBuilder createSchemaDefinitionBuilder()
CREATE SCHEMA statement.
CREATE SCHEMA statement.TableDefinitionBuilder createTableDefinitionBuilder()
CREATE TABLE statement.
CREATE TABLE statement.TableElementListBuilder createTableElementListBuilder()
CREATE TABLE statement.
CREATE TABLE statement.TableDefinition
ColumnDefinition createColumnDefinition(java.lang.String columnName,
SQLDataType columnDataType)
#createColumnDefinition(String, String, String, Boolean) and pass null and true
as last two parameters (meaning that there is no default value for column, and it may have NULL values).
columnName - The name of the column.columnDataType - The data type of the column.
#createColumnDefinition(String, String, String, Boolean)
ColumnDefinition createColumnDefinition(java.lang.String columnName,
SQLDataType columnDataType,
java.lang.Boolean mayBeNull)
NULL value policy. Invoking this
method is equivalent to invoking #createColumnDefinition(String, String, String, Boolean) and pass
null and mayBeNull as last two parameters (meaning that there is no default value for column).
columnName - The name of the column.columnDataType - The data type of the column.mayBeNull - The NULL value policy. Setting this to false is same as specifying
NOT NULL in column definition in SQL.
NULL value
policy.#createColumnDefinition(String, String, String, Boolean)
ColumnDefinition createColumnDefinition(java.lang.String columnName,
SQLDataType columnDataType,
java.lang.String columnDefault)
#createColumnDefinition(String, String, String, Boolean) and pass
columnDefault and true as last two parameters (meaning that column may have NULL values).
columnName - The name of the column.columnDataType - The data type of the column.columnDefault - The default value of the column.
#createColumnDefinition(String, String, String, Boolean)
ColumnDefinition createColumnDefinition(java.lang.String columnName,
SQLDataType columnDataType,
java.lang.String columnDefault,
java.lang.Boolean mayBeNull)
NULL value policy.
columnName - The name of the column.columnDataType - The data type of the column.columnDefault - The default value of the column.mayBeNull - The NULL value policy for the column. Setting this to false is same as
specifying NOT NULL in column definition in SQL.
NULL value policy.LikeClause createLikeClause(TableName tableName)
LIKE
<table name> clause for CREATE TABLE statement.
tableName - The name of the target table.
LIKE
<table name> clause for CREATE TABLE statement.TableConstraintDefinition createTableConstraintDefinition(TableConstraint constraint)
ConstraintCharacteristics. Invoking this method is
equivalent to invoking
createTableConstraintDefinition(String, TableConstraint, ConstraintCharacteristics) and passing
nulls as first and last parameters.
constraint - The constraint for the table.
ConstraintCharacteristics.#createColumnDefinition(String, String, String, Boolean)
TableConstraintDefinition createTableConstraintDefinition(java.lang.String name,
TableConstraint constraint)
ConstraintCharacteristics. Invoking this method is
equivalent to invoking
createTableConstraintDefinition(String, TableConstraint, ConstraintCharacteristics) and passing
null as last parameter.
name - The name for the constraint.constraint - The constraint for the table.
ConstraintCharacteristics.#createColumnDefinition(String, String, String, Boolean)
TableConstraintDefinition createTableConstraintDefinition(TableConstraint constraint,
ConstraintCharacteristics characteristics)
ConstraintCharacteristics. Invoking this method is
equivalent to invoking
createTableConstraintDefinition(String, TableConstraint, ConstraintCharacteristics) and passing
null as first parameter.
constraint - The constraint for the table.characteristics - The constraint characteristics for the constraint.
ConstraintCharacteristics.#createColumnDefinition(String, String, String, Boolean),
ConstraintCharacteristics
TableConstraintDefinition createTableConstraintDefinition(java.lang.String name,
TableConstraint constraint,
ConstraintCharacteristics characteristics)
ConstraintCharacteristics.
name - The name for the constraint.constraint - The constraint for the table.characteristics - The characteristics for the constraint.
ConstraintCharacteristics.ConstraintCharacteristicsCheckConstraint createCheckConstraint(BooleanExpression check)
CHECK clause, typically used in CREATE TABLE statements.
check - The boolean expression for check.
CHECK clause, typically used in CREATE TABLE statements.UniqueConstraintBuilder createUniqueConstraintBuilder()
UNIQUE(columns...) or
PRIMARY KEY(columns...)), typically used in CREATE TABLE statements.
UNIQUE(columns...) or
PRIMARY KEY(columns...)).ForeignKeyConstraintBuilder createForeignKeyConstraintBuilder()
FOREIGN KEY constraint, typically used in CREATE TABLE statements.
FOREIGN KEY constraint.ForeignKeyConstraintBuilder,
ForeignKeyConstraintViewDefinitionBuilder createViewDefinitionBuilder()
CREATE VIEW statement.
CREATE VIEW statement.ViewDefinitionBuilder,
ViewDefinitionRegularViewSpecification createRegularViewSpecification(java.lang.String... columnNames)
columnNames - The names of the columns.
RegularViewSpecification.RegularViewSpecification
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||