com.univocity.api.config.builders
Interface QueryDefinition


public interface QueryDefinition

The QueryDefinition configuration is obtained from a QuerySetup, and is used to determine what query should be executed against the data store.

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

Method Summary
 QueryResult fromFile(File query)
          Uses a query definition from a file.
 QueryResult fromFile(File query, Charset encoding)
          Uses a query definition from a file.
 QueryResult fromFile(File query, String encoding)
          Uses a query definition from a file.
 QueryResult fromResource(String filePath)
          Uses a query definition from a resource available either in the classpath or the file system.
 QueryResult fromResource(String resourcePath, Charset encoding)
          Uses a query definition from a resource available either in the classpath or the file system.
 QueryResult fromResource(String resourcePath, String encoding)
          Uses a query definition from a resource available either in the classpath or the file system.
 QueryResult fromString(String query)
          Uses a query definition from a string.
 

Method Detail

fromString

QueryResult fromString(String query)
Uses a query definition from a string.

Parameters:
query - the query definition that the data store is able to recognize and execute to produce values.
Returns:
the next step of this configuration: determine how the result of this query should be read.

fromFile

QueryResult fromFile(File query)
Uses a query definition from a file.

Parameters:
query - the file containing a query definition that the data store is able to recognize and execute to produce values.

Note: As the file encoding is not provided, the default system encoding will be used to read the file.

Returns:
the next step of this configuration: determine how the result of this query should be read.

fromResource

QueryResult fromResource(String filePath)
Uses a query definition from a resource available either in the classpath or the file system.

Parameters:
filePath - the path to a resource containing a query definition that the data store is able to recognize and execute to produce values.

Note: As the resource encoding is not provided, the default system encoding will be used to read the resource.

Returns:
the next step of this configuration: determine how the result of this query should be read.

fromFile

QueryResult fromFile(File query,
                     String encoding)
Uses a query definition from a file.

Parameters:
query - the file containing a query definition that the data store is able to recognize and execute to produce values.
encoding - the encoding that should be used to read the given file.
Returns:
the next step of this configuration: determine how the result of this query should be read.

fromResource

QueryResult fromResource(String resourcePath,
                         String encoding)
Uses a query definition from a resource available either in the classpath or the file system.

Parameters:
resourcePath - the path to a resource containing a query definition that the data store is able to recognize and execute to produce values.
encoding - the encoding that should be used to read the given resource.
Returns:
the next step of this configuration: determine how the result of this query should be read.

fromFile

QueryResult fromFile(File query,
                     Charset encoding)
Uses a query definition from a file.

Parameters:
query - the file containing a query definition that the data store is able to recognize and execute to produce values.
encoding - the encoding that should be used to read the given file.
Returns:
the next step of this configuration: determine how the result of this query should be read.

fromResource

QueryResult fromResource(String resourcePath,
                         Charset encoding)
Uses a query definition from a resource available either in the classpath or the file system.

Parameters:
resourcePath - the path to a resource containing a query definition that the data store is able to recognize and execute to produce values.
encoding - the encoding that should be used to read the given resource.
Returns:
the next step of this configuration: determine how the result of this query should be read.


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