- All Known Implementing Classes:
MapperQueryPreparer,MultiIndexQueryPreparer,UnsupportedQueryPreparer
public interface QueryPreparer<T>
-
Method Summary
Modifier and TypeMethodDescriptionorg.simpleflatmapper.map.FieldMapper<T,PreparedStatement> mapper()Will create a PreparedStatement mapper on the query.prepare(Connection connection) Create a new QueryBinder based on the underlying query.prepareStatement(Connection connection) Will create a PreparedStatement based on the query.toRewrittenSqlQuery(T value)
-
Method Details
-
prepare
Create a new QueryBinder based on the underlying query.- Parameters:
connection- the connection- Returns:
- the PreparedStatement
- Throws:
SQLException- if an sql error occurs
-
prepareStatement
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 occursUnsupportedOperationException- 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
-