public abstract class AbstractJdbcPersister extends Object implements org.springframework.beans.factory.InitializingBean, EventWriter
EventDatabaseConstants.MULTIPLE_VAL_DELIM,
EventDatabaseConstants.DB_ATTRIB_DELIM,
EventDatabaseConstants.NAME_VAL_DELIM,
EventDatabaseConstants.MULTIPLE_VAL_DELIM,
EventDatabaseConstants.DB_ATTRIB_DELIM,
EventDatabaseConstants.NAME_VAL_DELIM,
EventDatabaseConstants.MULTIPLE_VAL_DELIM,
EventDatabaseConstants.DB_ATTRIB_DELIM,
EventDatabaseConstants.NAME_VAL_DELIMEVENT_ACKUSER_FIELD_SIZE, EVENT_AUTOACTION_FIELD_SIZE, EVENT_CORRELATION_FIELD_SIZE, EVENT_DPNAME_FIELD_SIZE, EVENT_FORWARD_FIELD_SIZE, EVENT_HOST_FIELD_SIZE, EVENT_INTERFACE_FIELD_SIZE, EVENT_LOGGRP_FIELD_SIZE, EVENT_MOUSEOVERTEXT_FIELD_SIZE, EVENT_OPERACTION_FIELD_SIZE, EVENT_OPERACTION_MENU_FIELD_SIZE, EVENT_PATHOUTAGE_FIELD_SIZE, EVENT_SNMP_FIELD_SIZE, EVENT_SNMPHOST_FIELD_SIZE, EVENT_SOURCE_FIELD_SIZE, EVENT_TTICKET_FIELD_SIZE, EVENT_UEI_FIELD_SIZE, EVENT_X733_ALARMTYPE_SIZE, MSG_NO, MSG_YES| Constructor and Description |
|---|
AbstractJdbcPersister()
Constructor for AbstractJdbcPersister.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
afterPropertiesSet
|
protected static boolean |
checkEventSanityAndDoWeProcess(Event event,
String logPrefix)
checkEventSanityAndDoWeProcess
|
DataSource |
getDataSource()
getDataSource
|
EventdServiceManager |
getEventdServiceManager()
getEventdServiceManager
|
protected static Timestamp |
getEventTime(Event event)
getEventTime
|
EventUtil |
getEventUtil() |
String |
getGetNextIdString()
getGetNextIdString
|
protected int |
getNextId()
getNextId
|
protected int |
getServiceID(String name)
This method is used to convert the service name into a service id.
|
protected static void |
set(PreparedStatement stmt,
int ndx,
char value)
Sets the statement up for a character value.
|
protected static void |
set(PreparedStatement stmt,
int ndx,
int value)
Sets the statement up for an integer type.
|
protected static void |
set(PreparedStatement stmt,
int ndx,
String value)
Sets the statement up for a String value.
|
protected static void |
set(PreparedStatement stmt,
int ndx,
Timestamp value)
Sets the statement up for a timestamp type.
|
void |
setDataSource(DataSource dataSource)
setDataSource
|
void |
setEventdServiceManager(EventdServiceManager eventdServiceManager)
setEventdServiceManager
|
void |
setEventUtil(EventUtil eventUtil) |
void |
setGetNextIdString(String getNextIdString)
setGetNextIdString
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprocesspublic AbstractJdbcPersister()
Constructor for AbstractJdbcPersister.
protected static void set(PreparedStatement stmt, int ndx, String value) throws SQLException
stmt - The statement to add the value to.ndx - The ndx for the value.value - The value to add to the statement.SQLException - Thrown if there is an error adding the value to the
statement.SQLException - if any.protected static void set(PreparedStatement stmt, int ndx, int value) throws SQLException
stmt - The statement to add the value to.ndx - The ndx for the value.value - The value to add to the statement.SQLException - Thrown if there is an error adding the value to the
statement.SQLException - if any.protected static void set(PreparedStatement stmt, int ndx, Timestamp value) throws SQLException
stmt - The statement to add the value to.ndx - The ndx for the value.value - The value to add to the statement.SQLException - Thrown if there is an error adding the value to the
statement.SQLException - if any.protected static void set(PreparedStatement stmt, int ndx, char value) throws SQLException
stmt - The statement to add the value to.ndx - The ndx for the value.value - The value to add to the statement.SQLException - Thrown if there is an error adding the value to the
statement.SQLException - if any.protected int getServiceID(String name) throws SQLException
name - The name of the serviceSQLException - Thrown if there is an error accessing the stored data or
the SQL text is malformed. This will also be thrown if the
result cannot be obtained.SQLException - if any.EventdConstants.SQL_DB_SVCNAME_TO_SVCIDprotected int getNextId()
throws SQLException
getNextId
SQLException - if any.public void afterPropertiesSet()
throws SQLException
afterPropertiesSet
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanSQLException - if any.public EventdServiceManager getEventdServiceManager()
getEventdServiceManager
EventdServiceManager object.public void setEventdServiceManager(EventdServiceManager eventdServiceManager)
setEventdServiceManager
eventdServiceManager - a EventdServiceManager object.public DataSource getDataSource()
getDataSource
DataSource object.public void setDataSource(DataSource dataSource)
setDataSource
dataSource - a DataSource object.public EventUtil getEventUtil()
public void setEventUtil(EventUtil eventUtil)
public void setGetNextIdString(String getNextIdString)
setGetNextIdString
getNextIdString - a String object.Copyright © 2015. All rights reserved.