final class NoOpTableEditorImpl extends Object implements TableEditor
| Modifier and Type | Field and Description |
|---|---|
private String |
defaultCharsetName |
private TableId |
id |
private boolean |
uniqueValues |
| Modifier | Constructor and Description |
|---|---|
protected |
NoOpTableEditorImpl() |
| Modifier and Type | Method and Description |
|---|---|
TableEditor |
addColumns(Column... columns)
Add one or more columns to this table, regardless of the
position of the supplied
columns. |
TableEditor |
addColumns(Iterable<Column> columns)
Add one or more columns to the end of this table's list of columns, regardless of the
position of the supplied columns. |
List<Column> |
columns()
Get the definitions for the columns in this table.
|
Column |
columnWithName(String name)
Get the definition for the column in this table with the supplied name.
|
Table |
create()
Obtain an immutable table definition representing the current state of this editor.
|
protected boolean |
hasColumnWithName(String name) |
boolean |
hasDefaultCharsetName()
Determine if a
default character set has been set on this table. |
boolean |
hasUniqueValues()
Determine whether this table's primary key contains all columns (via
TableEditor.setUniqueValues()) such that all rows
within the table are unique. |
List<String> |
primaryKeyColumnNames()
The list of column names that make up the primary key for this table.
|
TableEditor |
removeColumn(String columnName)
Remove the column with the given name.
|
TableEditor |
renameColumn(String existingName,
String newName)
Rename the column with the given name to the new specified name.
|
TableEditor |
reorderColumn(String columnName,
String afterColumnName)
Reorder the column with the given name to be positioned after the designated column.
|
TableEditor |
setColumns(Column... columns)
Set this table's column definitions.
|
TableEditor |
setColumns(Iterable<Column> columns)
Set this table's column definitions.
|
TableEditor |
setDefaultCharsetName(String charsetName)
Set the name of the character set that should be used by default in the columns that require a character set but have
not defined one.
|
TableEditor |
setPrimaryKeyNames(List<String> pkColumnNames)
Set the columns that make up this table's primary key.
|
TableEditor |
setPrimaryKeyNames(String... pkColumnNames)
Set the columns that make up this table's primary key.
|
TableEditor |
setUniqueValues()
Sets this table's primary key to contain all columns, ensuring that all values are unique within the table.
|
TableId |
tableId()
Get the identifier for this table.
|
TableEditor |
tableId(TableId id)
Set the table identifier.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddColumn, columnNames, hasPrimaryKey, noOpprivate TableId id
private boolean uniqueValues
private String defaultCharsetName
public TableId tableId()
TableEditortableId in interface TableEditorpublic TableEditor tableId(TableId id)
TableEditortableId in interface TableEditorid - the table identifierpublic List<Column> columns()
TableEditorTableEditor.addColumns(Column...),
TableEditor.addColumns(Iterable), TableEditor.setColumns(Column...), TableEditor.setColumns(Iterable), or
TableEditor.removeColumn(String).columns in interface TableEditorpublic Column columnWithName(String name)
TableEditorcolumnWithName in interface TableEditorname - the case-insensitive name of the columnprotected boolean hasColumnWithName(String name)
public List<String> primaryKeyColumnNames()
TableEditorTableEditor.setPrimaryKeyNames(String...).primaryKeyColumnNames in interface TableEditorpublic TableEditor addColumns(Column... columns)
TableEditorposition of the supplied
columns. However, if an existing column definition matches a supplied column, the new column definition will replace
the existing column definition.addColumns in interface TableEditorcolumns - the definitions for the columns to be addedpublic TableEditor addColumns(Iterable<Column> columns)
TableEditorposition of the supplied columns. However, if an existing column definition matches a supplied column, the new column
definition will replace the existing column definition.addColumns in interface TableEditorcolumns - the definitions for the columns to be addedpublic TableEditor setColumns(Column... columns)
TableEditorsetColumns in interface TableEditorcolumns - the definitions for the columns to be addedpublic TableEditor setColumns(Iterable<Column> columns)
TableEditorsetColumns in interface TableEditorcolumns - the definitions for the columns to be addedpublic TableEditor setPrimaryKeyNames(String... pkColumnNames)
TableEditorsetPrimaryKeyNames in interface TableEditorpkColumnNames - the names of this tables columns that make up the primary keypublic TableEditor setPrimaryKeyNames(List<String> pkColumnNames)
TableEditorsetPrimaryKeyNames in interface TableEditorpkColumnNames - the names of this tables columns that make up the primary keypublic TableEditor setUniqueValues()
TableEditorsetPrimaryKeyNames(columnNames()) except that the primary key is updated
when columns are added or removed.setUniqueValues in interface TableEditorpublic boolean hasUniqueValues()
TableEditorTableEditor.setUniqueValues()) such that all rows
within the table are unique.hasUniqueValues in interface TableEditortrue if TableEditor.setUniqueValues() was last called on this table, or false otherwisepublic TableEditor setDefaultCharsetName(String charsetName)
TableEditorsetDefaultCharsetName in interface TableEditorcharsetName - the name of the character set that should be used by defaultpublic boolean hasDefaultCharsetName()
TableEditordefault character set has been set on this table.hasDefaultCharsetName in interface TableEditortrue if this has a default character set, or false if one has not yet been setpublic TableEditor removeColumn(String columnName)
TableEditorremoveColumn in interface TableEditorcolumnName - the name of the column to be removedpublic TableEditor reorderColumn(String columnName, String afterColumnName)
TableEditorafterColumnName is null,
the column will be moved to the first column.reorderColumn in interface TableEditorcolumnName - the name of the column to be removedafterColumnName - the name of the column after which the moved column is to be positioned; may be null if the column
is to be moved to the first columnpublic TableEditor renameColumn(String existingName, String newName)
TableEditorrenameColumn in interface TableEditorexistingName - the existing name of the column to be renamed; may not be nullnewName - the new name of the column; may not be nullpublic Table create()
TableEditorcreate in interface TableEditorCopyright © 2020 JBoss by Red Hat. All rights reserved.