public class NormalizedJDBCTarget extends DefaultJDBCTarget
Parts based on JDBC logger from prottomatter by Nate Sammons
Modifier and Type | Field and Description |
---|---|
private java.util.HashMap |
m_categoryIDs |
private java.util.HashMap |
m_priorityIDs |
Constructor and Description |
---|
NormalizedJDBCTarget(javax.sql.DataSource dataSource,
java.lang.String table,
ColumnInfo[] columns) |
Modifier and Type | Method and Description |
---|---|
protected int |
getID(java.lang.String tableName,
java.util.HashMap idMap,
java.lang.String instance) |
protected void |
specifyColumn(java.sql.PreparedStatement statement,
int index,
LogEvent event)
Adds a single object into statement.
|
closeConnection, getColumn, getStatementSQL, getTable, isStale, openConnection, output
checkConnection, close, doProcessEvent, getConnection, open
getErrorHandler, isOpen, processEvent, setErrorHandler
private java.util.HashMap m_categoryIDs
private java.util.HashMap m_priorityIDs
public NormalizedJDBCTarget(javax.sql.DataSource dataSource, java.lang.String table, ColumnInfo[] columns)
protected void specifyColumn(java.sql.PreparedStatement statement, int index, LogEvent event) throws java.sql.SQLException
specifyColumn
in class DefaultJDBCTarget
statement
- the prepard statementindex
- the indexevent
- the log eventjava.sql.SQLException
- if an SQL related error occursprotected int getID(java.lang.String tableName, java.util.HashMap idMap, java.lang.String instance) throws java.sql.SQLException
java.sql.SQLException