com.espertech.esper.client.hook
Interface SQLColumnTypeConversion


public interface SQLColumnTypeConversion

Implement this interface when providing a callback for SQL input parameter and column result processing for a statement, converting an input parameter or converting an output column value into any other value.

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.Class getColumnType(SQLColumnTypeContext context)
          Return the new type of the column.
 java.lang.Object getColumnValue(SQLColumnValueContext context)
          Return the new value of the column.
 java.lang.Object getParameterValue(SQLInputParameterContext context)
          Return the new value of the input parameter.
 

Method Detail

getColumnType

java.lang.Class getColumnType(SQLColumnTypeContext context)
Return the new type of the column. To leave the type unchanged, return SQLColumnTypeContext.getColumnClassType() or null.

Parameters:
context - contains the database name, query fired, column name, column type and column number
Returns:
type of column after conversion

getColumnValue

java.lang.Object getColumnValue(SQLColumnValueContext context)
Return the new value of the column. To leave the value unchanged, return SQLColumnValueContext.getColumnValue().

Parameters:
context - contains the column name, column value and column number
Returns:
value of column after conversion

getParameterValue

java.lang.Object getParameterValue(SQLInputParameterContext context)
Return the new value of the input parameter. To leave the value unchanged, return SQLInputParameterContext.getParameterValue().

Parameters:
context - contains the parameter name and number
Returns:
value of parameter after conversion

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