Package org.jdbi.v3.core.argument
Class CharSequenceArgumentFactory
java.lang.Object
org.jdbi.v3.core.argument.AbstractArgumentFactory<CharSequence>
org.jdbi.v3.core.argument.CharSequenceArgumentFactory
- All Implemented Interfaces:
ArgumentFactory,ArgumentFactory.Preparable
An
ArgumentFactory for arguments that implement CharSequence.
The factory is registered by default in Arguments before other more specific or
user-defined factories such EssentialsArgumentFactory (which has
explicit support for String arguments).
The factory converts arguments to String by calling their toString() method
and treats them as sql type Types.VARCHAR.
- Since:
- 3.30.1
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jdbi.v3.core.argument.ArgumentFactory
ArgumentFactory.Preparable -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Argumentbuild(CharSequence value, ConfigRegistry config) Produce an argument object for the given value.Methods inherited from class org.jdbi.v3.core.argument.AbstractArgumentFactory
build, prepare, prePreparedTypes
-
Constructor Details
-
CharSequenceArgumentFactory
public CharSequenceArgumentFactory()
-
-
Method Details
-
build
Description copied from class:AbstractArgumentFactoryProduce an argument object for the given value. When the implementation class has accepted a given type, it must then produce an argument instance or throw an exception.- Specified by:
buildin classAbstractArgumentFactory<CharSequence>- Parameters:
value- the value to convert to an argumentconfig- the config registry- Returns:
- An
Argumentfor the givenvalue. Must not be null!
-