org.hibernate.engine.jdbc.spi
Interface StatementPreparer


public interface StatementPreparer

Contracting for preparing SQL statements


Method Summary
 PreparedStatement prepareQueryStatement(String sql, boolean isCallable, ScrollMode scrollMode)
          Get a prepared statement for use in loading / querying.
 PreparedStatement prepareStatement(String sql)
          Prepare a statement.
 PreparedStatement prepareStatement(String sql, boolean isCallable)
          Prepare a statement.
 PreparedStatement prepareStatement(String sql, int autoGeneratedKeys)
          Get a prepared statement to use for inserting using JDBC3 getGeneratedKeys processing.
 PreparedStatement prepareStatement(String sql, String[] columnNames)
          Get a prepared statement to use for inserting using JDBC3 getGeneratedKeys processing.
 

Method Detail

prepareStatement

PreparedStatement prepareStatement(String sql)
Prepare a statement.

Parameters:
sql - The SQL the statement to be prepared
Returns:
the prepared statement

prepareStatement

PreparedStatement prepareStatement(String sql,
                                   boolean isCallable)
Prepare a statement.

Parameters:
sql - The SQL the statement to be prepared
isCallable - Whether to prepare as a callable statement.
Returns:
the prepared statement

prepareStatement

PreparedStatement prepareStatement(String sql,
                                   int autoGeneratedKeys)
Get a prepared statement to use for inserting using JDBC3 getGeneratedKeys processing.

Parameters:
sql - - the SQL for the statement to be prepared
autoGeneratedKeys - - a flag indicating whether auto-generated keys should be returned; one of

prepareStatement

PreparedStatement prepareStatement(String sql,
                                   String[] columnNames)
Get a prepared statement to use for inserting using JDBC3 getGeneratedKeys processing.

Parameters:
sql - - the SQL for the statement to be prepared
columnNames - The name of the columns to be returned in the generated keys result set.
Returns:
the prepared statement
See Also:
Connection.prepareStatement(String, String[])

prepareQueryStatement

PreparedStatement prepareQueryStatement(String sql,
                                        boolean isCallable,
                                        ScrollMode scrollMode)
Get a prepared statement for use in loading / querying.

Parameters:
sql - The SQL the statement to be prepared
isCallable - Whether to prepare as a callable statement.
scrollMode - (optional) scroll mode to be applied to the resulting result set; may be null to indicate no scrolling should be applied.
Returns:
the prepared statement


Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.