Package com.exasol.dbbuilder
Class Table
- java.lang.Object
-
- com.exasol.dbbuilder.AbstractDatabaseObject
-
- com.exasol.dbbuilder.Table
-
- All Implemented Interfaces:
DatabaseObject
public class Table extends AbstractDatabaseObject
Database table.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTable.BuilderBuilder for database tables.
-
Field Summary
-
Fields inherited from class com.exasol.dbbuilder.AbstractDatabaseObject
name, writer
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Table.Builderbuilder(DatabaseObjectWriter writer, Schema schema, String tableName)Create a builder for aTable.intgetColumnCount()Get the number of columns the table has.List<Column>getColumns()Get the columns of the table.DatabaseObjectgetParent()Get the parent object.List<List<Object>>getRows()Get the table's contents (aka.StringgetType()Get the type of the database object.booleanhasParent()Check if this object has a parent object that sets the scope within the databaseTableinsert(Object... values)Insert a row of values to the table.-
Methods inherited from class com.exasol.dbbuilder.AbstractDatabaseObject
getFullyQualifiedName, getName
-
-
-
-
Method Detail
-
getType
public String getType()
Description copied from interface:DatabaseObjectGet the type of the database object.- Returns:
- type of the database object
-
hasParent
public boolean hasParent()
Description copied from interface:DatabaseObjectCheck if this object has a parent object that sets the scope within the database- Returns:
trueif the object has a parent
-
getParent
public DatabaseObject getParent()
Description copied from interface:DatabaseObjectGet the parent object.- Returns:
- parent object
-
getColumnCount
public int getColumnCount()
Get the number of columns the table has.- Returns:
- column count
-
getRows
public List<List<Object>> getRows()
Get the table's contents (aka. "rows")- Returns:
- rows in the table
-
insert
public Table insert(Object... values)
Insert a row of values to the table.- Parameters:
values- cell values- Returns:
thisfor fluent programming
-
builder
public static Table.Builder builder(DatabaseObjectWriter writer, Schema schema, String tableName)
Create a builder for aTable.- Parameters:
writer- database object writerschema- parent schematableName- name of the database table- Returns:
- new
Tableinstance
-
-