2121
2222/**
2323 * A rendering strategy is used to generate a platform specific binding.
24- * <p>
25- * Rendering strategies are used during the rendering phase of statement generation.
24+ *
25+ * <p> Rendering strategies are used during the rendering phase of statement generation.
2626 * All generated SQL statements include the generated statement itself, and a map of parameters that
2727 * should be bound to the statement at execution time. For example, a generated select statement may
2828 * look like this when rendered for MyBatis:
29- * <p>
30- * <code>select foo from bar where id = #{parameters.p1,jdbcType=INTEGER}</code>
31- * <p>
32- * In this case, the binding is <code>#{parameters.p1,jdbcType=INTEGER}</code>. MyBatis knows how to interpret this
29+ *
30+ * <p>< code>select foo from bar where id = #{parameters.p1,jdbcType=INTEGER}</code>
31+ *
32+ * <p> In this case, the binding is <code>#{parameters.p1,jdbcType=INTEGER}</code>. MyBatis knows how to interpret this
3333 * binding - it will look for a value in the <code>parameters.p1</code> property of the parameter object
3434 * passed to the statement and bind it as a prepared statement parameter when executing the statement.
3535 */
@@ -42,61 +42,62 @@ public String formatParameterMapKey(AtomicInteger sequence) {
4242
4343 /**
4444 * This method generates a binding for a parameter to a placeholder in a generated SQL statement.
45- * <p>
46- * This binding is appropriate when there can be a mapping between a parameter and a known target column,
45+ *
46+ * <p> This binding is appropriate when there can be a mapping between a parameter and a known target column,
4747 * In MyBatis, the binding can specify type information based on the column. The bindings are specific
4848 * to the target framework.
49- * <p>
50- * For MyBatis, a binding looks like this: "#{prefix.parameterName,jdbcType=xxx,typeHandler=xxx,javaType=xxx}"
51- * <p>
52- * For Spring, a binding looks like this: ":parameterName"
49+ *
50+ * <p> For MyBatis, a binding looks like this: "#{prefix.parameterName,jdbcType=xxx,typeHandler=xxx,javaType=xxx}"
51+ *
52+ * <p> For Spring, a binding looks like this: ":parameterName"
5353 *
5454 * @param column column definition used for generating type details in a MyBatis binding. Ignored for Spring.
5555 * @param prefix parameter prefix used for locating the parameters in a SQL provider object. Typically, will be
5656 * {@link RenderingStrategy#DEFAULT_PARAMETER_PREFIX}. This is ignored for Spring.
5757 * @param parameterName name of the parameter. Typically generated by calling
58- * {@link RenderingStrategy#formatParameterMapKey(AtomicInteger)}
58+ * {@link RenderingStrategy#formatParameterMapKey(AtomicInteger)}
5959 * @return the generated binding
6060 */
6161 public abstract String getFormattedJdbcPlaceholder (BindableColumn <?> column , String prefix , String parameterName );
6262
6363 /**
6464 * This method generates a binding for a parameter to a placeholder in a generated SQL statement.
65- * <p>
66- * This binding is appropriate when the parameter is bound to placeholder that is not a known column (such as
65+ *
66+ * <p> This binding is appropriate when the parameter is bound to placeholder that is not a known column (such as
6767 * a limit or offset parameter). The bindings are specific to the target framework.
68- * <p>
69- * For MyBatis, a binding looks like this: "#{prefix.parameterName}"
70- * <p>
71- * For Spring, a binding looks like this: ":parameterName"
68+ *
69+ * <p> For MyBatis, a binding looks like this: "#{prefix.parameterName}"
70+ *
71+ * <p> For Spring, a binding looks like this: ":parameterName"
7272 *
7373 * @param prefix parameter prefix used for locating the parameters in a SQL provider object. Typically, will be
7474 * {@link RenderingStrategy#DEFAULT_PARAMETER_PREFIX}. This is ignored for Spring.
7575 * @param parameterName name of the parameter. Typically generated by calling
76- * {@link RenderingStrategy#formatParameterMapKey(AtomicInteger)}
76+ * {@link RenderingStrategy#formatParameterMapKey(AtomicInteger)}
7777 * @return the generated binding
7878 */
7979 public abstract String getFormattedJdbcPlaceholder (String prefix , String parameterName );
8080
8181 /**
82- * This method generates a binding for a parameter to a placeholder in a generated multirow insert statement.
83- * <p>
84- * This binding is specifically for use with a multirow insert. The Spring implementation changes the binding
85- * to match values expected for a multirow insert statement. For MyBatis, the binding is the same
82+ * This method generates a binding for a parameter to a placeholder in a record based insert statement.
83+ *
84+ * <p>This binding is specifically for use with insert, batch insert, and multirow insert statements.
85+ * These statements bind parameters to properties of a row class. The Spring implementation changes the binding
86+ * to match values expected for a these insert statements. For MyBatis, the binding is the same
8687 * as {@link RenderingStrategy#getFormattedJdbcPlaceholder(BindableColumn, String, String)}.
87- * <p>
88- * For MyBatis, a binding looks like this: "#{prefix.parameterName,jdbcType=xxx,typeHandler=xxx,javaType=xxx}"
89- * <p>
90- * For Spring, a binding looks like this: ":prefix.parameterName"
88+ *
89+ * <p> For MyBatis, a binding looks like this: "#{prefix.parameterName,jdbcType=xxx,typeHandler=xxx,javaType=xxx}"
90+ *
91+ * <p> For Spring, a binding looks like this: ":prefix.parameterName"
9192 *
9293 * @param column column definition used for generating type details in a MyBatis binding. Ignored for Spring.
9394 * @param prefix parameter prefix used for locating the parameters in a SQL provider object. Typically, will be
94- * {@link RenderingStrategy#DEFAULT_PARAMETER_PREFIX}. This is ignored for Spring.
95+ * {@link RenderingStrategy#DEFAULT_PARAMETER_PREFIX}. This is ignored for Spring.
9596 * @param parameterName name of the parameter. Typically generated by calling
96- * {@link RenderingStrategy#formatParameterMapKey(AtomicInteger)}
97+ * {@link RenderingStrategy#formatParameterMapKey(AtomicInteger)}
9798 * @return the generated binding
9899 */
99- public String getMultiRowFormattedJdbcPlaceholder (BindableColumn <?> column , String prefix , String parameterName ) {
100+ public String getRecordBasedInsertBinding (BindableColumn <?> column , String prefix , String parameterName ) {
100101 return getFormattedJdbcPlaceholder (column , prefix , parameterName );
101102 }
102103
0 commit comments