Class SpringBatchReaderRenderingStrategy
java.lang.Object
org.mybatis.dynamic.sql.render.RenderingStrategy
org.mybatis.dynamic.sql.render.MyBatis3RenderingStrategy
org.mybatis.dynamic.sql.util.springbatch.SpringBatchReaderRenderingStrategy
This rendering strategy should be used for MyBatis3 statements using one of the
Spring batch readers supplied by mybatis-spring integration (http://www.mybatis.org/spring/).
Those readers are MyBatisPagingItemReader and MyBatisCursorItemReader.
-
Field Summary
Fields inherited from class org.mybatis.dynamic.sql.render.RenderingStrategy
DEFAULT_PARAMETER_PREFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetFormattedJdbcPlaceholder
(BindableColumn<?> column, String prefix, String parameterName) This method generates a binding for a parameter to a placeholder in a generated SQL statement.Methods inherited from class org.mybatis.dynamic.sql.render.MyBatis3RenderingStrategy
getFormattedJdbcPlaceholder, getRecordBasedInsertBinding
Methods inherited from class org.mybatis.dynamic.sql.render.RenderingStrategy
formatParameterMapKey, getRecordBasedInsertBinding
-
Constructor Details
-
SpringBatchReaderRenderingStrategy
public SpringBatchReaderRenderingStrategy()
-
-
Method Details
-
getFormattedJdbcPlaceholder
public String getFormattedJdbcPlaceholder(BindableColumn<?> column, String prefix, String parameterName) Description copied from class:RenderingStrategy
This method generates a binding for a parameter to a placeholder in a generated SQL statement.This binding is appropriate when there can be a mapping between a parameter and a known target column, In MyBatis, the binding can specify type information based on the column. The bindings are specific to the target framework.
For MyBatis, a binding looks like this: "#{prefix.parameterName,jdbcType=xxx,typeHandler=xxx,javaType=xxx}"
For Spring, a binding looks like this: ":parameterName"
- Overrides:
getFormattedJdbcPlaceholder
in classMyBatis3RenderingStrategy
- Parameters:
column
- column definition used for generating type details in a MyBatis binding. Ignored for Spring.prefix
- parameter prefix used for locating the parameters in a SQL provider object. Typically, will beRenderingStrategy.DEFAULT_PARAMETER_PREFIX
. This is ignored for Spring.parameterName
- name of the parameter. Typically generated by callingRenderingStrategy.formatParameterMapKey(AtomicInteger)
- Returns:
- the generated binding
-