com.espertech.esper.client.hook
Interface SQLOutputRowConversion


public interface SQLOutputRowConversion

Implement this interface when providing a callback for SQL row result processing for a statement, converting each row's values into a POJO.

Rows can also be skipped via this callback, determined by the implementation returning a null value for a row.

An instance of the class implementating this interface exists typically per statement that the callback has been registered for by means of EPL statement annotation.


Method Summary
 java.lang.Object getOutputRow(SQLOutputRowValueContext context)
          Returns the POJO object that represents a row of the SQL query result, or null to indicate to skip this row.
 java.lang.Class getOutputRowType(SQLOutputRowTypeContext context)
          Return the POJO class that represents a row of the SQL query result.
 

Method Detail

getOutputRowType

java.lang.Class getOutputRowType(SQLOutputRowTypeContext context)
Return the POJO class that represents a row of the SQL query result.

Parameters:
context - receives the context information such as database name, query fired and types returned by query
Returns:
class that represents a result row

getOutputRow

java.lang.Object getOutputRow(SQLOutputRowValueContext context)
Returns the POJO object that represents a row of the SQL query result, or null to indicate to skip this row.

Parameters:
context - receives row result information
Returns:
POJO or null value to skip the row

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