Package com.exedio.dsmf
Class Table
- java.lang.Object
-
- com.exedio.dsmf.Node
-
- com.exedio.dsmf.Table
-
public final class Table extends Node
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.exedio.dsmf.Node
Node.Color
-
-
Constructor Summary
Constructors Constructor Description Table(Schema schema, String name)
Deprecated.UseSchema.newTable(String)
insteadTable(Schema schema, String name, String options)
Deprecated.UseTable(Schema, String)
instead
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
checkUnsupportedConstraints()
void
create()
void
create(StatementListener listener)
void
drop()
void
drop(StatementListener listener)
Column
getColumn(String columnName)
Collection<Column>
getColumns()
Constraint
getConstraint(String constraintName)
Collection<Constraint>
getConstraints()
Returns all constraints of this table, including constraints returned byColumn.getConstraints()
.String
getName()
String
getOptions()
Deprecated.Not supported anymore, always returns null.Collection<Constraint>
getTableConstraints()
Returns constraints of this table, that are not already returned byColumn.getConstraints()
.void
makeDefensive()
Deprecated.Is not supported anymore, does nothing.CheckConstraint
newCheck(String name, String condition)
Column
newColumn(String name, String type)
UniqueConstraint
newUnique(Column column, String name, String clause)
void
renameTo(String newName)
void
renameTo(String newName, StatementListener listener)
String
toString()
-
Methods inherited from class com.exedio.dsmf.Node
exists, getCumulativeColor, getError, getParticularColor, required
-
-
-
-
Constructor Detail
-
Table
@Deprecated public Table(Schema schema, String name)
Deprecated.UseSchema.newTable(String)
instead
-
Table
@Deprecated public Table(Schema schema, String name, String options)
Deprecated.UseTable(Schema, String)
instead- Parameters:
options
- is ignored
-
-
Method Detail
-
getName
public String getName()
-
newUnique
public UniqueConstraint newUnique(Column column, @Nonnull String name, @Nonnull String clause)
-
newCheck
public CheckConstraint newCheck(@Nonnull String name, @Nonnull String condition)
-
getColumns
public Collection<Column> getColumns()
-
getConstraints
public Collection<Constraint> getConstraints()
Returns all constraints of this table, including constraints returned byColumn.getConstraints()
.- See Also:
getTableConstraints()
-
getTableConstraints
public Collection<Constraint> getTableConstraints()
Returns constraints of this table, that are not already returned byColumn.getConstraints()
.- See Also:
getConstraints()
-
getConstraint
public Constraint getConstraint(String constraintName)
-
create
public void create()
-
create
public void create(StatementListener listener)
-
drop
public void drop()
-
drop
public void drop(StatementListener listener)
-
renameTo
public void renameTo(String newName)
-
renameTo
public void renameTo(String newName, StatementListener listener)
-
checkUnsupportedConstraints
public void checkUnsupportedConstraints()
-
makeDefensive
@Deprecated public void makeDefensive()
Deprecated.Is not supported anymore, does nothing.
-
getOptions
@Deprecated public String getOptions()
Deprecated.Not supported anymore, always returns null.
-
-