org.midao.jdbc.core.handlers.input.query
Class AbstractQueryInputHandler<T>

java.lang.Object
  extended by org.midao.jdbc.core.handlers.input.AbstractInputHandler<T>
      extended by org.midao.jdbc.core.handlers.input.query.AbstractQueryInputHandler<T>
All Implemented Interfaces:
InputHandler<T>
Direct Known Subclasses:
QueryInputHandler

public abstract class AbstractQueryInputHandler<T>
extends AbstractInputHandler<T>

Query InputHandler allows accepting QueryParameters as an input. This is useful when you have to call Stored Procedures, as it is possible to specify Direction and Type of Stored Procedure parameters. If Metadata Handler cannot figure Stored Procedure/Function parameters for Named Input Handlers(Bean/Map Input Handlers) - AbstractQueryInputHandler implementation should be used. In such case - please specify Direction and/or Type in QueryParameters


Field Summary
 
Fields inherited from class org.midao.jdbc.core.handlers.input.AbstractInputHandler
EMPTY_ARRAY, EMPTY_INT_ARRAY, processor
 
Constructor Summary
protected AbstractQueryInputHandler(QueryInputProcessor processor)
          Initializes parent part of QueryInputHandler
 
Method Summary
abstract  QueryParameters getQueryParameters()
          Returns named parameters and their values
abstract  java.lang.String getQueryString()
          Returns parsed SQL String (without named parameters)
abstract  QueryParameters update(java.lang.Object[] outParamValues)
          This implementation allows updating input parameters with values returned from Query call.
 
Methods inherited from class org.midao.jdbc.core.handlers.input.AbstractInputHandler
mergeMaps, validateSqlString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractQueryInputHandler

protected AbstractQueryInputHandler(QueryInputProcessor processor)
Initializes parent part of QueryInputHandler

Parameters:
processor - Query input processor
Method Detail

update

public abstract QueryParameters update(java.lang.Object[] outParamValues)
This implementation allows updating input parameters with values returned from Query call. Usually it is used when you have OUT parameters from Query execution and want to update original input with them. Only fields with Direction specified as OUT/INOUT would be updated. Doesn't actually updates input, but creates new instance with updated values. Might be removed in future, as can be replaced with: 1. QueryInputHandler.getQueryParameters() 2. QueryParameters.update(Object[], boolean)

Parameters:
outParamValues - Array of values returned after Query execution from OUT/INOUT fields
Returns:
new instance of input parameters with updated values.

getQueryString

public abstract java.lang.String getQueryString()
Returns parsed SQL String (without named parameters)

Returns:
parsed SQL String

getQueryParameters

public abstract QueryParameters getQueryParameters()
Returns named parameters and their values

Returns:
QueryParameters filled with parameters and their values


Copyright © 2013. All Rights Reserved.