Class DefaultJdbcRepositoryOperations.JdbcParameterBinder
java.lang.Object
io.micronaut.data.jdbc.operations.DefaultJdbcRepositoryOperations.JdbcParameterBinder
- All Implemented Interfaces:
BindableParametersStoredQuery.Binder
- Enclosing class:
DefaultJdbcRepositoryOperations
protected class DefaultJdbcRepositoryOperations.JdbcParameterBinder
extends Object
implements BindableParametersStoredQuery.Binder
- Since:
- 1.0.0
- Author:
- graemerocher, Denis Stepanov
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJdbcParameterBinder(Connection connection, PreparedStatement ps, SqlStoredQuery<?, ?> sqlStoredQuery) -
Method Summary
Modifier and TypeMethodDescriptionautoPopulateRuntimeProperty(RuntimePersistentProperty<?> persistentProperty, @Nullable Object previousValue) Auto populate property value.voidbindMany(QueryParameterBinding binding, Collection<Object> values) Bind multiple values.voidbindOne(QueryParameterBinding binding, @Nullable Object value) Bind the value.@Nullable Objectconvert(@Nullable Class<?> converterClass, @Nullable Object value, @Nullable io.micronaut.core.type.Argument<?> argument) Convert value using the converter class.@Nullable Objectconvert(@Nullable Object value, @Nullable RuntimePersistentProperty<?> property) Convert value according to the property definition.int
-
Constructor Details
-
JdbcParameterBinder
protected JdbcParameterBinder(Connection connection, PreparedStatement ps, SqlStoredQuery<?, ?> sqlStoredQuery)
-
-
Method Details
-
autoPopulateRuntimeProperty
public Object autoPopulateRuntimeProperty(RuntimePersistentProperty<?> persistentProperty, @Nullable Object previousValue) Description copied from interface:BindableParametersStoredQuery.BinderAuto populate property value.- Specified by:
autoPopulateRuntimePropertyin interfaceBindableParametersStoredQuery.Binder- Parameters:
persistentProperty- The propertypreviousValue- The previous value- Returns:
- The populated value
-
convert
public @Nullable Object convert(@Nullable Object value, @Nullable RuntimePersistentProperty<?> property) Description copied from interface:BindableParametersStoredQuery.BinderConvert value according to the property definition.- Specified by:
convertin interfaceBindableParametersStoredQuery.Binder- Parameters:
value- The valueproperty- The property- Returns:
- The converted value
-
convert
public @Nullable Object convert(@Nullable Class<?> converterClass, @Nullable Object value, @Nullable io.micronaut.core.type.Argument<?> argument) Description copied from interface:BindableParametersStoredQuery.BinderConvert value using the converter class.- Specified by:
convertin interfaceBindableParametersStoredQuery.Binder- Parameters:
converterClass- The converterClassvalue- The valueargument- The argument- Returns:
- The converted value
-
bindOne
Description copied from interface:BindableParametersStoredQuery.BinderBind the value.- Specified by:
bindOnein interfaceBindableParametersStoredQuery.Binder- Parameters:
binding- The bindingvalue- The value
-
bindMany
Description copied from interface:BindableParametersStoredQuery.BinderBind multiple values.- Specified by:
bindManyin interfaceBindableParametersStoredQuery.Binder- Parameters:
binding- The bindingvalues- The values
-
currentIndex
public int currentIndex()- Specified by:
currentIndexin interfaceBindableParametersStoredQuery.Binder- Returns:
- current index
-