Java SDK Documentation  24.2.0
com.vertica.sdk.TypeCoercionException Class Reference
Inheritance diagram for com.vertica.sdk.TypeCoercionException:
Inheritance graph
Collaboration diagram for com.vertica.sdk.TypeCoercionException:
Collaboration graph

Public Member Functions

 TypeCoercionException ()
 
 TypeCoercionException (Object value, VerticaType type, TypeCoercionPolicy policyViolated)
 
TypeCoercionPolicy getPolicy ()
 
VerticaType getType ()
 
Object getValue ()
 

Detailed Description

Indicates that a given object value could not be coerced to a particular VerticaType.

Constructor & Destructor Documentation

◆ TypeCoercionException() [1/2]

com.vertica.sdk.TypeCoercionException.TypeCoercionException ( )

A new empty exception.

◆ TypeCoercionException() [2/2]

com.vertica.sdk.TypeCoercionException.TypeCoercionException ( Object  value,
VerticaType  type,
TypeCoercionPolicy  policyViolated 
)

A TypeCoercion exception generated by attempting to coerce value to type, but failed due to policyViolated.

Parameters
valueThe value being coerced.
typeThe target Vertica type.
policyViolatedThe policy that caused the error.

Member Function Documentation

◆ getPolicy()

TypeCoercionPolicy com.vertica.sdk.TypeCoercionException.getPolicy ( )

Get the policy which was violated

Returns
The policy that caused the exception.

◆ getType()

VerticaType com.vertica.sdk.TypeCoercionException.getType ( )

Get the VerticaType

Returns
The target Vertica type.

◆ getValue()

Object com.vertica.sdk.TypeCoercionException.getValue ( )

Get the value that caused the exception.

Returns
The value being coerced.