org.silverpeas.jdbc
Interface JdbcSqlExecutor


public interface JdbcSqlExecutor

Implementations of this interface must permit to execute SQL queries into processes (transactional or not) without that the caller has to handle the connection to the database. It is possible to call this provided methods into transactions that handles JPA operations too.

Author:
Yohann Chastagnier

Method Summary
 long executeModify(JdbcSqlQuery... modifySqlQueries)
          Modify query executor.
 long executeModify(List<JdbcSqlQuery> modifySqlQueries)
          Modify query executor.
<ROW_ENTITY>
List<ROW_ENTITY>
select(JdbcSqlQuery selectQuery, SelectResultRowProcess<ROW_ENTITY> process)
          Select query executor.
 long selectCount(JdbcSqlQuery selectCountQueryBuilder)
          Select count SQL query executor.
 

Method Detail

selectCount

long selectCount(JdbcSqlQuery selectCountQueryBuilder)
                 throws SQLException
Select count SQL query executor.

Parameters:
selectCountQueryBuilder - the select count SQL query.
Returns:
the select count result.
Throws:
SQLException

select

<ROW_ENTITY> List<ROW_ENTITY> select(JdbcSqlQuery selectQuery,
                                     SelectResultRowProcess<ROW_ENTITY> process)
                        throws SQLException
Select query executor.

Parameters:
selectQuery - the select SQL query.
process - the row processor.
Returns:
the list of entities.
Throws:
SQLException

executeModify

long executeModify(JdbcSqlQuery... modifySqlQueries)
                   throws SQLException
Modify query executor.

Parameters:
modifySqlQueries - the list of SQL query to execute. An SQL query is represented by a string (SQL) and an Object (parameters).
Throws:
SQLException

executeModify

long executeModify(List<JdbcSqlQuery> modifySqlQueries)
                   throws SQLException
Modify query executor.

Parameters:
modifySqlQueries - the list of SQL query to execute. An SQL query is represented by a string (SQL) and an Object (parameters).
Throws:
SQLException


Copyright © 2016 Silverpeas. All Rights Reserved.