- All Implemented Interfaces:
Serializable,Binding<LocalDateTime,LocalDateTime>
- Author:
- Lukas Eder
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Converter<LocalDateTime,LocalDateTime> A converter that can convert between the database type and the custom type.final voidGet aResultSet'sOUTvalue.final voidGet aSQLInput'sOUTvalue.final voidGet aCallableStatement'sOUTvalue.final voidRegister aCallableStatement'sOUTparameter.final voidSet aSQLOutput'sINparameter.final voidSet aPreparedStatement'sINparameter.final voidGenerate SQL code for the bind variable.
-
Constructor Details
-
LocalDateAsLocalDateTimeBinding
public LocalDateAsLocalDateTimeBinding()
-
-
Method Details
-
converter
Description copied from interface:BindingA converter that can convert between the database type and the custom type.- Specified by:
converterin interfaceBinding<LocalDateTime,LocalDateTime>
-
sql
Description copied from interface:BindingGenerate SQL code for the bind variable.Implementations should generate SQL code onto
BindingSQLContext.render(), given the context's bind variable located atBindingSQLContext.value(). Examples of such SQL code are:"?": Default implementations can simply generate a question mark.
"123": Implementations may choose to inline bind variables to influence execution plan generation.
Context.paramType()contains information whether inlined bind variables are expected in the current context.
"CAST(? AS DATE)": Cast a database to a more specific type. This can be useful in databases like Oracle, which map bothDATEandTIMESTAMPSQL types toTimestamp.
Context.castMode()may contain some hints about whether casting is suggested in the current context.
"?::json": Vendor-specific bind variables can be supported, e.g.SQLDialect.POSTGRES's JSON data type.
Implementations must provide consistent behaviour between
Binding.sql(BindingSQLContext)andBinding.set(BindingSetStatementContext), i.e. when bind variables are inlined, then they must not be bound to thePreparedStatementinBinding.set(BindingSetStatementContext)- Specified by:
sqlin interfaceBinding<LocalDateTime,LocalDateTime> - Parameters:
ctx- The context object containing all argument objects.- Throws:
SQLException- Implementations are allowed to pass on allSQLExceptions to the caller to be wrapped inDataAccessExceptions.
-
register
Description copied from interface:BindingRegister aCallableStatement'sOUTparameter.- Specified by:
registerin interfaceBinding<LocalDateTime,LocalDateTime> - Parameters:
ctx- The context object containing all argument objects.- Throws:
SQLException- Implementations are allowed to pass on allSQLExceptions to the caller to be wrapped inDataAccessExceptions.
-
set
Description copied from interface:BindingSet aPreparedStatement'sINparameter.- Specified by:
setin interfaceBinding<LocalDateTime,LocalDateTime> - Parameters:
ctx- The context object containing all argument objects.- Throws:
SQLException- Implementations are allowed to pass on allSQLExceptions to the caller to be wrapped inDataAccessExceptions.
-
set
Description copied from interface:BindingSet aSQLOutput'sINparameter.- Specified by:
setin interfaceBinding<LocalDateTime,LocalDateTime> - Parameters:
ctx- The context object containing all argument objects.- Throws:
SQLException- Implementations are allowed to pass on allSQLExceptions to the caller to be wrapped inDataAccessExceptions.
-
get
Description copied from interface:BindingGet aResultSet'sOUTvalue.Implementations are expected to produce a value by calling
BindingGetResultSetContext.value(Object), passing the resulting value to the method.- Specified by:
getin interfaceBinding<LocalDateTime,LocalDateTime> - Parameters:
ctx- The context object containing all argument objects.- Throws:
SQLException- Implementations are allowed to pass on allSQLExceptions to the caller to be wrapped inDataAccessExceptions.
-
get
Description copied from interface:BindingGet aCallableStatement'sOUTvalue.Implementations are expected to produce a value by calling
BindingGetStatementContext.value(Object), passing the resulting value to the method.- Specified by:
getin interfaceBinding<LocalDateTime,LocalDateTime> - Parameters:
ctx- The context object containing all argument objects.- Throws:
SQLException- Implementations are allowed to pass on allSQLExceptions to the caller to be wrapped inDataAccessExceptions.
-
get
Description copied from interface:BindingGet aSQLInput'sOUTvalue.Implementations are expected to produce a value by calling
BindingGetSQLInputContext.value(Object), passing the resulting value to the method.- Specified by:
getin interfaceBinding<LocalDateTime,LocalDateTime> - Parameters:
ctx- The context object containing all argument objects.- Throws:
SQLException- Implementations are allowed to pass on allSQLExceptions to the caller to be wrapped inDataAccessExceptions.
-