com.univocity.api.config.builders
Interface QueryResultError


public interface QueryResultError

The QueryResultError is the last step of the configuration required to use a query as a function, which is initialized in DataIntegrationEngine.addQuery(EngineScope, String). It is used to specify how to handle an unexpected result coming from a query. Which can be:

Author:
uniVocity Software Pty Ltd - dev@univocity.com
See Also:
DataErrorHandler, QuerySetup, QueryResult, DataIntegrationEngine

Method Summary
 void onErrorAbort()
          Specifies that if a unexpected result is produced by the query, or an exception happens, the current mapping cycle will be aborted.
 void onErrorHandleWith(DataErrorHandler<?> handler)
          Defines a custom DataErrorHandler to process the unexpected outcome from a query execution.
 void onErrorReturnNull()
          Specifies that if a unexpected result is produced by the query, or an exception happens, null will be returned.
 

Method Detail

onErrorHandleWith

void onErrorHandleWith(DataErrorHandler<?> handler)
Defines a custom DataErrorHandler to process the unexpected outcome from a query execution.

Parameters:
handler - the custom object that handles unexpected results from a query

This completes the configuration started in DataIntegrationEngine.addQuery(EngineScope, String)


onErrorReturnNull

void onErrorReturnNull()
Specifies that if a unexpected result is produced by the query, or an exception happens, null will be returned.

This completes the configuration started in DataIntegrationEngine.addQuery(EngineScope, String)


onErrorAbort

void onErrorAbort()
Specifies that if a unexpected result is produced by the query, or an exception happens, the current mapping cycle will be aborted. A DataInputException will be thrown.

This completes the configuration started in DataIntegrationEngine.addQuery(EngineScope, String)



Copyright © 2015 uniVocity Software Pty Ltd. All rights reserved.