net.esper.eql.db
Class PollingViewableFactory
java.lang.Object
net.esper.eql.db.PollingViewableFactory
public class PollingViewableFactory
- extends Object
Factory for a view onto historical data via SQL statement.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PollingViewableFactory
public PollingViewableFactory()
createDBStatementView
public static HistoricalEventViewable createDBStatementView(int streamNumber,
DBStatementStreamSpec databaseStreamSpec,
DatabaseConfigService databaseConfigService,
EventAdapterService eventAdapterService,
EPStatementHandle epStatementHandle)
throws ExprValidationException
- Creates the viewable for polling via database SQL query.
- Parameters:
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 informationepStatementHandle
- is the statements-own handle for use in registering callbacks with services
- Returns:
- viewable providing poll functionality
- Throws:
ExprValidationException
- if the validation failed
lexSampleSQL
protected static String lexSampleSQL(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