|
Kieker 1.9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object kieker.monitoring.writer.database.DBWriterHelper
public final class DBWriterHelper
Constructor Summary | |
---|---|
DBWriterHelper(Connection connection,
String indexTablename,
AtomicInteger tableCounter,
boolean overwrite)
Creates a new instance of this class using the given parameters. |
|
DBWriterHelper(Connection connection,
String indexTablename,
boolean overwrite)
Creates a new instance of this class using the given parameters. |
Method Summary | |
---|---|
void |
createIndexTable()
|
String |
createTable(String classname,
Class<?>... columns)
Creates a table using the given parameters. |
boolean |
set(PreparedStatement preparedStatement,
int parameterIndex,
Object value)
This is a simple helper method using automatically the correct setter method for the given value to set a value within the prepared statement. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DBWriterHelper(Connection connection, String indexTablename, boolean overwrite) throws SQLException
connection
- The connection to the database.indexTablename
- The index table name (The created tables will have this name as a prefix).overwrite
- If set to true, existing tables will be dropped and newly created.
SQLException
- If something went wrong during the preparation of the connection.public DBWriterHelper(Connection connection, String indexTablename, AtomicInteger tableCounter, boolean overwrite) throws SQLException
connection
- The connection to the database.indexTablename
- The index table name (The created tables will have this name as a prefix).tableCounter
- The counter containing the number of tables within the current system.overwrite
- If set to true, existing tables will be dropped and newly created.
SQLException
- If something went wrong during the preparation of the connection.Method Detail |
---|
public String createTable(String classname, Class<?>... columns) throws SQLException
classname
- The name of the class which corresponds to the newly created table.columns
- The array of classes determining the columns of this table.
SQLException
- If something went wrong during the creation.public void createIndexTable() throws SQLException
SQLException
public boolean set(PreparedStatement preparedStatement, int parameterIndex, Object value) throws SQLException
preparedStatement
- The prepared statement to fill.parameterIndex
- The index of the parameter to fill.value
- The value of the parameter to fill.
SQLException
- If, for example, the connection has already been closed or the given index is invalid.public String toString()
toString
in class Object
|
Kieker 1.9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |