public class DatabasePollingViewableFactory extends Object
Modifier and Type | Field and Description |
---|---|
static String |
SAMPLE_WHERECLAUSE_PLACEHOLDER
Placeholder name for SQL-where clause substitution.
|
Constructor and Description |
---|
DatabasePollingViewableFactory() |
Modifier and Type | Method and Description |
---|---|
static HistoricalEventViewable |
createDBStatementView(int statementId,
int streamNumber,
DBStatementStreamSpec databaseStreamSpec,
DatabaseConfigService databaseConfigService,
EventAdapterService eventAdapterService,
EPStatementAgentInstanceHandle epStatementAgentInstanceHandle,
SQLColumnTypeConversion columnTypeConversionHook,
SQLOutputRowConversion outputRowConversionHook,
boolean enableJDBCLogging,
DataCacheFactory dataCacheFactory,
StatementContext statementContext)
Creates the viewable for polling via database SQL query.
|
protected static String |
lexSampleSQL(String querySQL)
Lexes the sample SQL and inserts a "where 1=0" where-clause.
|
public static final String SAMPLE_WHERECLAUSE_PLACEHOLDER
public static HistoricalEventViewable createDBStatementView(int statementId, int streamNumber, DBStatementStreamSpec databaseStreamSpec, DatabaseConfigService databaseConfigService, EventAdapterService eventAdapterService, EPStatementAgentInstanceHandle epStatementAgentInstanceHandle, SQLColumnTypeConversion columnTypeConversionHook, SQLOutputRowConversion outputRowConversionHook, boolean enableJDBCLogging, DataCacheFactory dataCacheFactory, StatementContext statementContext) throws ExprValidationException
streamNumber
- is the stream number of the viewdatabaseStreamSpec
- provides the SQL statement, database name and additional infodatabaseConfigService
- for getting database connection and settingseventAdapterService
- for generating event beans from database informationepStatementAgentInstanceHandle
- is the statements-own handle for use in registering callbacks with servicescolumnTypeConversionHook
- hook for statement-specific column conversionoutputRowConversionHook
- hook for statement-specific row conversionenableJDBCLogging
- indicator to enable JDBC loggingstatementId
- statement idstatementContext
- statement contextdataCacheFactory
- factory for cacheExprValidationException
- if the validation failedprotected static String lexSampleSQL(String querySQL) throws ExprValidationException
querySQL
- to inspect using lexerExprValidationException
- to indicate a lexer problem