Class LobCoercion
java.lang.Object
io.github.connellite.util.internal.LobCoercion
JDBC LOB coercion used by
TypeCoercionUtil.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringblobToString(Blob blob) UTF-8 text ofblob.static StringclobToString(Clob clob) Full text ofclob, ornullifclobisnull.static <T> TCoercesrawtoward a LOBtargetType.static boolean
-
Constructor Details
-
LobCoercion
public LobCoercion()
-
-
Method Details
-
supports
- Parameters:
targetType- desired type, nevernull- Returns:
truefor a LOB target
-
coerce
Coercesrawtoward a LOBtargetType.supports(Class)istruefortargetType. An incompatible value yieldsnull.- Type Parameters:
T- target type- Parameters:
raw- source value, nevernulltargetType- LOB type to coerce toward- Returns:
- coerced LOB, or
nullwhenrawdoes not matchtargetType - Throws:
TypeCoercionException- when a matching value cannot be stored in a LOB
-
clobToString
Full text ofclob, ornullifclobisnull. -
blobToString
UTF-8 text ofblob.
-