Class DB2ResultColumn
- java.lang.Object
-
- com.feedzai.commons.sql.abstraction.dml.result.ResultColumn
-
- com.feedzai.commons.sql.abstraction.dml.result.DB2ResultColumn
-
- All Implemented Interfaces:
Serializable
public class DB2ResultColumn extends ResultColumn
The DB2 column result implementation. ATTENTION: Blob columns must be processed at instantiation because the engine closes the result set and the data won't be accessible hence theprocessObject(Object)implementation.- Since:
- 2.0.0
- Author:
- Rui Vilao (rui.vilao@feedzai.com)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.feedzai.commons.sql.abstraction.dml.result.ResultColumn
name, val
-
-
Constructor Summary
Constructors Constructor Description DB2ResultColumn(String name, Object val)Creates a new instance ofDB2ResultColumn.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ObjectprocessObject(Object o)Processes an object.<T> TtoBlob()Converts this result (in the form of blob) to the specified object type.BooleantoBoolean()StringtoString()
-
-
-
Constructor Detail
-
DB2ResultColumn
public DB2ResultColumn(String name, Object val)
Creates a new instance ofDB2ResultColumn.- Parameters:
name- The column name.val- The value.
-
-
Method Detail
-
processObject
protected Object processObject(Object o)
Description copied from class:ResultColumnProcesses an object. This method is to be overwritten by implementations that need to do some processing before theResultSetcloses.- Overrides:
processObjectin classResultColumn- Parameters:
o- The object in need of some kind of processing before being set.- Returns:
- The processed object.
- See Also:
DB2ResultColumn
-
toBoolean
public Boolean toBoolean()
- Overrides:
toBooleanin classResultColumn- Returns:
- This value in the form of a Boolean.
-
toBlob
public <T> T toBlob() throws DatabaseEngineRuntimeExceptionDescription copied from class:ResultColumnConverts this result (in the form of blob) to the specified object type.- Overrides:
toBlobin classResultColumn- Type Parameters:
T- The type to convert.- Returns:
- The instance that was in the form of blob.
- Throws:
DatabaseEngineRuntimeException- If the value is not a blob or if something goes wrong when reading the object.
-
toString
public String toString()
- Overrides:
toStringin classResultColumn- Returns:
- This value in the form of a String.
-
-