public EPStatement create( EPStatementObjectModel sodaStatement, String statementName, Object userObject, String statementId) throws EPException { // Specifies the statement StatementSpecRaw statementSpec = mapSODAToRaw(sodaStatement); String eplStatement = sodaStatement.toEPL(); EPStatement statement = services .getStatementLifecycleSvc() .createAndStart( statementSpec, eplStatement, false, statementName, userObject, null, statementId, sodaStatement); log.debug(".createEPLStmt Statement created and started"); return statement; }
private EPStatement createPatternStmt( String expression, String statementName, Object userObject, String statementId) throws EPException { StatementSpecRaw rawPattern = EPAdministratorHelper.compilePattern( expression, expression, true, services, SelectClauseStreamSelectorEnum.ISTREAM_ONLY); return services .getStatementLifecycleSvc() .createAndStart( rawPattern, expression, true, statementName, userObject, null, statementId, null); }
public EPStatement create( EPPreparedStatement prepared, String statementName, Object userObject, String statementId) throws EPException { EPPreparedStatementImpl impl = (EPPreparedStatementImpl) prepared; StatementSpecRaw statementSpec = mapSODAToRaw(impl.getModel()); String eplStatement = impl.getModel().toEPL(); return services .getStatementLifecycleSvc() .createAndStart( statementSpec, eplStatement, false, statementName, userObject, null, statementId, impl.getModel()); }
private EPStatement createEPLStmt( String eplStatement, String statementName, Object userObject, String statementId) throws EPException { StatementSpecRaw statementSpec = EPAdministratorHelper.compileEPL( eplStatement, eplStatement, true, statementName, services, defaultStreamSelector); EPStatement statement = services .getStatementLifecycleSvc() .createAndStart( statementSpec, eplStatement, false, statementName, userObject, null, statementId, null); log.debug(".createEPLStmt Statement created and started"); return statement; }
public void destroyAllStatements() throws EPException { services.getStatementLifecycleSvc().destroyAllStatements(); }
public void stopAllStatements() throws EPException { services.getStatementLifecycleSvc().stopAllStatements(); }
public String[] getStatementNames() { return services.getStatementLifecycleSvc().getStatementNames(); }
public String getStatementNameForId(String statementId) { return services.getStatementLifecycleSvc().getStatementNameById(statementId); }
public EPStatement getStatement(String name) { return services.getStatementLifecycleSvc().getStatementByName(name); }