org.sqlproc.engine
Interface SqlSession

All Known Implementing Classes:
JdbcSimpleSession

public interface SqlSession

The SQL Engine session contract definition. In fact it's an adapter or a proxy to an internal stuff in one of the stacks on top of which the SQL Processor works. It's the first parameter to all primary methods in the SqlQueryEngine and SqlCrudEngine. The implementation depends on the stack, on top of which the SQL Processor works. In this SQL Processor version the next stacks can be used:

For these stacks the next session objects can be utilized:

The primary contract is the method for the SqlQuery instance creation.

For the concrete implementation please see for example JdbcSession or JdbcSimpleSession.

For more info please see the Tutorials.

Author:
Vladimir Hudec

Method Summary
 SqlQuery createSqlQuery(String queryString)
          Creates a new instance of SqlQuery, which is a wrapper around the SQL query command.
 int[] executeBatch(String[] statements)
          Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts.
 

Method Detail

createSqlQuery

SqlQuery createSqlQuery(String queryString)
                        throws SqlProcessorException
Creates a new instance of SqlQuery, which is a wrapper around the SQL query command.

Parameters:
queryString - the SQL query command
Returns:
a new instance of a wrapper around the SQL query command
Throws:
SqlProcessorException - in the case of any problem in ORM or JDBC stack

executeBatch

int[] executeBatch(String[] statements)
                   throws SqlProcessorException
Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts.

Parameters:
statements - SQL statements to be executed in batch
Returns:
an array of update counts containing one element for each command in the batch
Throws:
SqlProcessorException - in the case of any problem in ORM or JDBC stack


Copyright © 2013. All Rights Reserved.