|
Kieker 1.11 | |||||||||
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(java.sql.Connection connection,
java.lang.String indexTablename,
java.util.concurrent.atomic.AtomicInteger tableCounter,
boolean overwrite)
Creates a new instance of this class using the given parameters. |
|
DBWriterHelper(java.sql.Connection connection,
java.lang.String indexTablename,
boolean overwrite)
Creates a new instance of this class using the given parameters. |
Method Summary | |
---|---|
void |
createIndexTable()
|
java.lang.String |
createTable(java.lang.String classname,
java.lang.Class<?>... columns)
Creates a table using the given parameters. |
boolean |
set(java.sql.PreparedStatement preparedStatement,
int parameterIndex,
java.lang.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. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DBWriterHelper(java.sql.Connection connection, java.lang.String indexTablename, boolean overwrite) throws java.sql.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.
java.sql.SQLException
- If something went wrong during the preparation of the connection.public DBWriterHelper(java.sql.Connection connection, java.lang.String indexTablename, java.util.concurrent.atomic.AtomicInteger tableCounter, boolean overwrite) throws java.sql.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.
java.sql.SQLException
- If something went wrong during the preparation of the connection.Method Detail |
---|
public java.lang.String createTable(java.lang.String classname, java.lang.Class<?>... columns) throws java.sql.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.
java.sql.SQLException
- If something went wrong during the creation.public void createIndexTable() throws java.sql.SQLException
java.sql.SQLException
public boolean set(java.sql.PreparedStatement preparedStatement, int parameterIndex, java.lang.Object value) throws java.sql.SQLException
preparedStatement
- The prepared statement to fill.parameterIndex
- The index of the parameter to fill.value
- The value of the parameter to fill.
java.sql.SQLException
- If, for example, the connection has already been closed or the given index is invalid.public java.lang.String toString()
toString
in class java.lang.Object
|
Kieker 1.11 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |