|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javatools.database.Database.Inserter
public class Database.Inserter
Represents a bulk loader
Constructor Summary | |
---|---|
Database.Inserter(java.lang.String table)
Creates a bulk loader |
|
Database.Inserter(java.lang.String table,
java.lang.Class<?>... columnTypes)
Creates a bulk loader for a table with column types given by Java classes |
|
Database.Inserter(java.lang.String table,
int... columnTypes)
Creates a bulk loader with column types from java.sql.Type |
|
Database.Inserter(java.lang.String table,
java.lang.String[] colnames,
java.lang.Class<?>[] coltypes)
Creates a bulk loader for specific coloumns of a table with column types given by their names and Java classes |
Method Summary | |
---|---|
void |
close()
Flushes and closes |
void |
flush()
Flushes the batch |
int |
getBatchSize()
returns the number of entries gathered |
int |
getBatchThreshold()
returns the batch size set (i.e. |
java.lang.String |
getTableName()
Returns the table name |
void |
insert(java.util.List<java.lang.Object> row)
Inserts a row |
void |
insert(java.lang.Object... values)
Inserts a row |
int |
numColumns()
Returns the number of columns |
void |
setBatchThreshold(int size)
Inserter - Attribute Accessors **** |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Database.Inserter(java.lang.String table) throws java.sql.SQLException
java.sql.SQLException
public Database.Inserter(java.lang.String table, java.lang.Class<?>... columnTypes) throws java.sql.SQLException
java.sql.SQLException
public Database.Inserter(java.lang.String table, int... columnTypes) throws java.sql.SQLException
java.sql.SQLException
public Database.Inserter(java.lang.String table, java.lang.String[] colnames, java.lang.Class<?>[] coltypes) throws java.sql.SQLException
java.sql.SQLException
Method Detail |
---|
public void close()
close
in interface java.io.Closeable
public void setBatchThreshold(int size)
public int getBatchThreshold()
public java.lang.String getTableName()
public int getBatchSize()
public int numColumns()
public void insert(java.util.List<java.lang.Object> row) throws java.sql.SQLException
java.sql.SQLException
public void insert(java.lang.Object... values) throws java.sql.SQLException
java.sql.SQLException
public void flush() throws java.sql.SQLException
java.sql.SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |