public class JDBC42ObjectConverter
extends java.lang.Object
ObjectConverter
to support JDBC 4.2 type conversions.Constructor and Description |
---|
JDBC42ObjectConverter() |
Modifier and Type | Method and Description |
---|---|
<T> T |
getObject(FBField field,
java.lang.Class<T> type)
Get object with the specified type.
|
boolean |
setObject(FBField field,
java.lang.Object object)
If the
object type is supported, and the object (or its conversion) is allowed by JDBC, it sets the
field with the (converted) object. |
public boolean setObject(FBField field, java.lang.Object object) throws java.sql.SQLException
object
type is supported, and the object (or its conversion) is allowed by JDBC, it sets the
field
with the (converted) object.
As this method is - for the time being - intended as a workaround for JDBC 4.2, it specifically only supports new conversions in JDBC 4.2. It will return false for any other object type.
field
- FBField implementation to setobject
- The object value to settrue
when a conversion was applied, false
when there is no conversion for the object and fieldjava.sql.SQLException
- For exceptions when setting the object on the field (eg unsupported conversion).public <T> T getObject(FBField field, java.lang.Class<T> type) throws java.sql.SQLException
As this method is - for the time being - intended as a workaround for JDBC 4.2, it specifically only supports new conversions in JDBC 4.2. It will return false for any other object type.
T
- Type parameterfield
- FBField implementation to settype
- Type conversion to getnull
when null.java.sql.SQLException
- For conversion errors and unsupported types.Copyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.