com.espertech.esper.epl.db
Class DatabasePollingViewableFactory

java.lang.Object
  extended by com.espertech.esper.epl.db.DatabasePollingViewableFactory

public class DatabasePollingViewableFactory
extends java.lang.Object

Factory for a view onto historical data via SQL statement.


Field Summary
static java.lang.String SAMPLE_WHERECLAUSE_PLACEHOLDER
          Placeholder name for SQL-where clause substitution.
 
Constructor Summary
DatabasePollingViewableFactory()
           
 
Method Summary
static HistoricalEventViewable createDBStatementView(java.lang.String statementId, int streamNumber, DBStatementStreamSpec databaseStreamSpec, DatabaseConfigService databaseConfigService, EventAdapterService eventAdapterService, EPStatementAgentInstanceHandle epStatementAgentInstanceHandle, SQLColumnTypeConversion columnTypeConversionHook, SQLOutputRowConversion outputRowConversionHook, boolean enableJDBCLogging)
          Creates the viewable for polling via database SQL query.
protected static java.lang.String lexSampleSQL(java.lang.String querySQL)
          Lexes the sample SQL and inserts a "where 1=0" where-clause.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SAMPLE_WHERECLAUSE_PLACEHOLDER

public static final java.lang.String SAMPLE_WHERECLAUSE_PLACEHOLDER
Placeholder name for SQL-where clause substitution.

See Also:
Constant Field Values
Constructor Detail

DatabasePollingViewableFactory

public DatabasePollingViewableFactory()
Method Detail

createDBStatementView

public static HistoricalEventViewable createDBStatementView(java.lang.String statementId,
                                                            int streamNumber,
                                                            DBStatementStreamSpec databaseStreamSpec,
                                                            DatabaseConfigService databaseConfigService,
                                                            EventAdapterService eventAdapterService,
                                                            EPStatementAgentInstanceHandle epStatementAgentInstanceHandle,
                                                            SQLColumnTypeConversion columnTypeConversionHook,
                                                            SQLOutputRowConversion outputRowConversionHook,
                                                            boolean enableJDBCLogging)
                                                     throws ExprValidationException
Creates the viewable for polling via database SQL query.

Parameters:
streamNumber - is the stream number of the view
databaseStreamSpec - provides the SQL statement, database name and additional info
databaseConfigService - for getting database connection and settings
eventAdapterService - for generating event beans from database information
epStatementAgentInstanceHandle - is the statements-own handle for use in registering callbacks with services
columnTypeConversionHook - hook for statement-specific column conversion
outputRowConversionHook - hook for statement-specific row conversion
enableJDBCLogging - indicator to enable JDBC logging
Returns:
viewable providing poll functionality
Throws:
ExprValidationException - if the validation failed

lexSampleSQL

protected static java.lang.String lexSampleSQL(java.lang.String querySQL)
                                        throws ExprValidationException
Lexes the sample SQL and inserts a "where 1=0" where-clause.

Parameters:
querySQL - to inspect using lexer
Returns:
sample SQL with where-clause inserted
Throws:
ExprValidationException - to indicate a lexer problem

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com