public class BeanPropertiesPreparedStatementProvider extends java.lang.Object implements PreparedStatementProvider
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.Class<?>,java.lang.Integer> |
javaTypesToSqlTypes |
protected java.lang.String[] |
properties |
protected java.beans.PropertyDescriptor[] |
propertyDescriptors |
| Constructor and Description |
|---|
BeanPropertiesPreparedStatementProvider(java.lang.Class<?> type,
java.lang.String... properties)
Create a new
BeanPropertiesPreparedStatementProvider. |
| Modifier and Type | Method and Description |
|---|---|
void |
prepareStatement(java.sql.PreparedStatement preparedStatement,
java.lang.Object record)
Prepare the statement with input data.
|
protected java.lang.String[] properties
protected java.beans.PropertyDescriptor[] propertyDescriptors
protected final java.util.Map<java.lang.Class<?>,java.lang.Integer> javaTypesToSqlTypes
public BeanPropertiesPreparedStatementProvider(java.lang.Class<?> type,
java.lang.String... properties)
throws BeanIntrospectionException
BeanPropertiesPreparedStatementProvider.type - the record typeproperties - the properties to set in the statement in that order.BeanIntrospectionException - when unable to introspect the record typepublic void prepareStatement(java.sql.PreparedStatement preparedStatement,
java.lang.Object record)
throws java.sql.SQLException
PreparedStatementProviderprepareStatement in interface PreparedStatementProviderpreparedStatement - the statement to preparerecord - the record holding input datajava.sql.SQLException - thrown when a problem occurs when preparing the statementCopyright © 2020. All Rights Reserved.