StatementPreparer (Hibernate JavaDocs)
Date: 2012-04-05

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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
    - `Statement.RETURN_GENERATED_KEYS`
    - `Statement.NO_GENERATED_KEYS`
  Returns:
    the prepared statement
  See Also:
    `Connection.prepareStatement(String, int)`

### 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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