Module org.simpleflatmapper.jdbc
Package org.simpleflatmapper.jdbc.impl
Class MapperQueryPreparer<T>
java.lang.Object
org.simpleflatmapper.jdbc.impl.MapperQueryPreparer<T>
- All Implemented Interfaces:
QueryPreparer<T>
-
Constructor Summary
ConstructorsConstructorDescriptionMapperQueryPreparer(NamedSqlQuery query, org.simpleflatmapper.map.FieldMapper<T, PreparedStatement> mapper, String[] generatedKeys) -
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)
-
Constructor Details
-
MapperQueryPreparer
public MapperQueryPreparer(NamedSqlQuery query, org.simpleflatmapper.map.FieldMapper<T, PreparedStatement> mapper, String[] generatedKeys)
-
-
Method Details
-
prepare
Description copied from interface:QueryPreparerCreate a new QueryBinder based on the underlying query.- Specified by:
preparein interfaceQueryPreparer<T>- Parameters:
connection- the connection- Returns:
- the PreparedStatement
- Throws:
SQLException- if an sql error occurs
-
prepareStatement
Description copied from interface:QueryPreparerWill create a PreparedStatement based on the query. If any parameters is a List or an array it will throw an UnsupportedOperationException.- Specified by:
prepareStatementin interfaceQueryPreparer<T>- Parameters:
connection- the connection- Returns:
- the PreparedStatement
- Throws:
SQLException- if an error occurs
-
mapper
Description copied from interface:QueryPreparerWill create a PreparedStatement mapper on the query. If any parameters is a List or an array it will throw an UnsupportedOperationException.- Specified by:
mapperin interfaceQueryPreparer<T>- Returns:
- the mapper
-
toRewrittenSqlQuery
- Specified by:
toRewrittenSqlQueryin interfaceQueryPreparer<T>
-