Interface QueryPreparer<T>

All Known Implementing Classes:
MapperQueryPreparer, MultiIndexQueryPreparer, UnsupportedQueryPreparer

public interface QueryPreparer<T>
  • Method Details

    • prepare

      QueryBinder<T> prepare(Connection connection) throws SQLException
      Create a new QueryBinder based on the underlying query.
      Parameters:
      connection - the connection
      Returns:
      the PreparedStatement
      Throws:
      SQLException - if an sql error occurs
    • prepareStatement

      PreparedStatement prepareStatement(Connection connection) throws SQLException
      Will create a PreparedStatement based on the query. If any parameters is a List or an array it will throw an UnsupportedOperationException.
      Parameters:
      connection - the connection
      Returns:
      the PreparedStatement
      Throws:
      SQLException - if an error occurs
      UnsupportedOperationException - if a parameter is an array or a List
    • mapper

      org.simpleflatmapper.map.FieldMapper<T,PreparedStatement> mapper()
      Will create a PreparedStatement mapper on the query. If any parameters is a List or an array it will throw an UnsupportedOperationException.
      Returns:
      the mapper
      Throws:
      UnsupportedOperationException - if a parameter is an array or a List
    • toRewrittenSqlQuery

      String toRewrittenSqlQuery(T value)