public class TableDefinition
extends Object
Definition of the CREATE TABLE statement.
Nested Class Summary
Nested Classes
static class
Builder for the table definition.
Method Summary
All Methods Static Methods Instance Methods Concrete Methods
Creates a builder for the table with the specified name.
Creates a builder for the table with the specified qualified name.
Returns a list of colocation column names.
Returns definitions of the columns.
boolean
int
boolean
Returns a list of indexes to create on this table.
Returns a class to use to generate columns.
Returns a list of columns used in the primary key.
Returns primary key type.
Returns qualified table name.
Returns new builder using this definition.
Returns a class to use to generate columns.
Returns primary zone name.
Method Details
builder
Creates a builder for the table with the specified name.
Parameters:
tableName - Table name.
Returns:
Builder.
builder
Creates a builder for the table with the specified qualified name.
Parameters:
qualifiedName - Qualified name.
Returns:
Builder.
tableName
Returns table name.
Returns:
Table name.
schemaName
@Nullable
public @Nullable String schemaName ()
Returns schema name.
Returns:
Schema name or null if not specified.
qualifiedName
Returns qualified table name.
Returns:
Qualified table name.
ifNotExists
public boolean ifNotExists ()
Returns not exists flag.
Returns:
true if IF NOT EXISTS clause should be added to the statement.
columns
Returns definitions of the columns.
Returns:
List of column definitions or null if columns are specified using other methods.
See Also:
primaryKeyType
@Nullable
public @Nullable IndexType primaryKeyType ()
Returns primary key type.
Returns:
Primary key type or null if default should be used.
primaryKeyColumns
Returns a list of columns used in the primary key.
Returns:
List of columns used in the primary key or null if the primary key is not specified.
zoneName
@Nullable
public @Nullable String zoneName ()
Returns primary zone name.
Returns:
Zone name to use in the ZONE option or null if not specified.
colocationColumns
Returns a list of colocation column names.
Returns:
A list of colocation column names, or null if not specified.
keyClass
@Nullable
public @Nullable Class <?> keyClass ()
Returns a class to use to generate columns. If it's a natively supported class, then the column with the name "id" will be created
and added to the list of columns for the primary key. If it's a class annotated with the
Table annotation, then the annotation will be processed and column definitions will be
extracted from it.
Returns:
A class to use to generate columns or null if columns are specified using other methods.
See Also:
valueClass
@Nullable
public @Nullable Class <?> valueClass ()
Returns a class to use to generate columns. If it's a natively supported class, then the column with the name "val" will be created.
If it's a class annotated with the
Table annotation, then the annotation will be
processed and column definitions will be extracted from it.
Returns:
A class to use to generate columns or null if columns are specified using other methods.
See Also:
indexes
Returns a list of indexes to create on this table.
Returns:
a list of index definitions to create on this table or null if none should be created.
toBuilder
Returns new builder using this definition.
Returns:
New builder.