Top Description Constructors Methods
org.jooq.impl

public Class NClobBinding

extends Object
implements Binding<String, String>
Class Inheritance
All Implemented Interfaces
org.jooq.Binding, java.io.Serializable
Static Imports
org.jooq.impl.DefaultExecuteContext.localConnection, .DefaultExecuteContext.localTargetConnection, .Tools.asInt

A binding that takes binary values but binds them as NClob to at the JDBC level.

This is useful for workarounds for bugs in Oracle, like ORA-01461: can bind a LONG value only for insert into a LONG column (see [#4091])

Author
Lukas Eder

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public final Converter<String, String>
converter()

Implements org.jooq.Binding.converter.

A converter that can convert between the database type and the custom type.
public final void
get(BindingGetResultSetContext<String>
The context object containing all argument objects.
ctx
)

Implements org.jooq.Binding.get.

Get a ResultSet's OUT value.
public final void
get(BindingGetStatementContext<String>
The context object containing all argument objects.
ctx
)

Implements org.jooq.Binding.get.

Get a CallableStatement's OUT value.
public final void
get(BindingGetSQLInputContext<String>
The context object containing all argument objects.
ctx
)

Implements org.jooq.Binding.get.

Get a SQLInput's OUT value.
pack-priv static final NClob
public final void
register(BindingRegisterContext<String>
The context object containing all argument objects.
ctx
)

Implements org.jooq.Binding.register.

Register a CallableStatement's OUT parameter.
public final void
set(BindingSetStatementContext<String>
The context object containing all argument objects.
ctx
)

Implements org.jooq.Binding.set.

Set a PreparedStatement's IN parameter.
public final void
set(BindingSetSQLOutputContext<String>
The context object containing all argument objects.
ctx
)

Implements org.jooq.Binding.set.

Set a SQLOutput's IN parameter.
public final void
sql(BindingSQLContext<String>
The context object containing all argument objects.
ctx
)

Implements org.jooq.Binding.sql.

Generate SQL code for the bind variable.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

NClobBindingback to summary
public NClobBinding()

Method Detail

converterback to summary
public final Converter<String, String> converter()

Implements org.jooq.Binding.converter.

Doc from org.jooq.Binding.converter.

A converter that can convert between the database type and the custom type.

Annotations
@Override
getback to summary
public final void get(BindingGetResultSetContext<String> ctx) throws SQLException

Implements org.jooq.Binding.get.

Doc from org.jooq.Binding.get.

Get a ResultSet's OUT value.

Implementations are expected to produce a value by calling BindingGetResultSetContext#value(Object), passing the resulting value to the method.

Parameters
ctx:BindingGetResultSetContext<String>

The context object containing all argument objects.

Annotations
@Override
Exceptions
SQLException:
Implementations are allowed to pass on all SQLExceptions to the caller to be wrapped in DataAccessExceptions.
getback to summary
public final void get(BindingGetStatementContext<String> ctx) throws SQLException

Implements org.jooq.Binding.get.

Doc from org.jooq.Binding.get.

Get a CallableStatement's OUT value.

Implementations are expected to produce a value by calling BindingGetStatementContext#value(Object), passing the resulting value to the method.

Parameters
ctx:BindingGetStatementContext<String>

The context object containing all argument objects.

Annotations
@Override
Exceptions
SQLException:
Implementations are allowed to pass on all SQLExceptions to the caller to be wrapped in DataAccessExceptions.
getback to summary
public final void get(BindingGetSQLInputContext<String> ctx) throws SQLException

Implements org.jooq.Binding.get.

Doc from org.jooq.Binding.get.

Get a SQLInput's OUT value.

Implementations are expected to produce a value by calling BindingGetSQLInputContext#value(Object), passing the resulting value to the method.

Parameters
ctx:BindingGetSQLInputContext<String>

The context object containing all argument objects.

Annotations
@Override
Exceptions
SQLException:
Implementations are allowed to pass on all SQLExceptions to the caller to be wrapped in DataAccessExceptions.
newNClobback to summary
pack-priv static final NClob newNClob(ResourceManagingScope scope, String string) throws SQLException
registerback to summary
public final void register(BindingRegisterContext<String> ctx) throws SQLException

Implements org.jooq.Binding.register.

Doc from org.jooq.Binding.register.

Register a CallableStatement's OUT parameter.

Parameters
ctx:BindingRegisterContext<String>

The context object containing all argument objects.

Annotations
@Override
Exceptions
SQLException:
Implementations are allowed to pass on all SQLExceptions to the caller to be wrapped in DataAccessExceptions.
setback to summary
public final void set(BindingSetStatementContext<String> ctx) throws SQLException

Implements org.jooq.Binding.set.

Doc from org.jooq.Binding.set.

Set a PreparedStatement's IN parameter.

Parameters
ctx:BindingSetStatementContext<String>

The context object containing all argument objects.

Annotations
@Override
Exceptions
SQLException:
Implementations are allowed to pass on all SQLExceptions to the caller to be wrapped in DataAccessExceptions.
setback to summary
public final void set(BindingSetSQLOutputContext<String> ctx) throws SQLException

Implements org.jooq.Binding.set.

Doc from org.jooq.Binding.set.

Set a SQLOutput's IN parameter.

Parameters
ctx:BindingSetSQLOutputContext<String>

The context object containing all argument objects.

Annotations
@Override
Exceptions
SQLException:
Implementations are allowed to pass on all SQLExceptions to the caller to be wrapped in DataAccessExceptions.
sqlback to summary
public final void sql(BindingSQLContext<String> ctx) throws SQLException

Implements org.jooq.Binding.sql.

Doc from org.jooq.Binding.sql.

Generate SQL code for the bind variable.

Implementations should generate SQL code onto BindingSQLContext#render(), given the context's bind variable located at BindingSQLContext#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.

    RenderContext#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 both DATE and TIMESTAMP SQL types to Timestamp.

    RenderContext#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 sql(BindingSQLContext) and set(BindingSetStatementContext), i.e. when bind variables are inlined, then they must not be bound to the PreparedStatement in set(BindingSetStatementContext)

Parameters
ctx:BindingSQLContext<String>

The context object containing all argument objects.

Annotations
@Override
Exceptions
SQLException:
Implementations are allowed to pass on all SQLExceptions to the caller to be wrapped in DataAccessExceptions.