Package org.apache.ofbiz.entity.jdbc
Class JdbcValueHandler.BlobJdbcValueHandler
java.lang.Object
org.apache.ofbiz.entity.jdbc.JdbcValueHandler<Object>
org.apache.ofbiz.entity.jdbc.JdbcValueHandler.BlobJdbcValueHandler
- Enclosing class:
- JdbcValueHandler<T>
A
java.sql.Blob
JDBC value handler.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.ofbiz.entity.jdbc.JdbcValueHandler
JdbcValueHandler.ArrayJdbcValueHandler, JdbcValueHandler.BigDecimalJdbcValueHandler, JdbcValueHandler.BlobJdbcValueHandler, JdbcValueHandler.BooleanJdbcValueHandler, JdbcValueHandler.ByteArrayJdbcValueHandler, JdbcValueHandler.ClobJdbcValueHandler, JdbcValueHandler.DateJdbcValueHandler, JdbcValueHandler.DoubleJdbcValueHandler, JdbcValueHandler.FloatJdbcValueHandler, JdbcValueHandler.IntegerJdbcValueHandler, JdbcValueHandler.LongJdbcValueHandler, JdbcValueHandler.ObjectJdbcValueHandler, JdbcValueHandler.RowIdJdbcValueHandler, JdbcValueHandler.ShortJdbcValueHandler, JdbcValueHandler.StringJdbcValueHandler, JdbcValueHandler.TimeJdbcValueHandler, JdbcValueHandler.TimestampJdbcValueHandler
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
castAndSetValue
(PreparedStatement ps, int parameterIndex, Object obj) Sets a value in aPreparedStatement
.Returns a value from aResultSet
.protected JdbcValueHandler<Object>
newInstance
(int sqlType) Returns a new instance of the object - initialized with the specified SQL type.Methods inherited from class org.apache.ofbiz.entity.jdbc.JdbcValueHandler
create, getInstance, getSqlType, parseSqlType, serializeObject, setValue
-
Constructor Details
-
BlobJdbcValueHandler
protected BlobJdbcValueHandler(int jdbcType)
-
-
Method Details
-
getJavaClass
- Specified by:
getJavaClass
in classJdbcValueHandler<Object>
-
castAndSetValue
protected void castAndSetValue(PreparedStatement ps, int parameterIndex, Object obj) throws SQLException Description copied from class:JdbcValueHandler
Sets a value in aPreparedStatement
. Theobj
argument is converted to the correct data type. Subclasses override this method to castobj
to the correct data type and call the appropriatePreparedStatement.setXxx
method.- Specified by:
castAndSetValue
in classJdbcValueHandler<Object>
- Throws:
SQLException
-
getValue
Description copied from class:JdbcValueHandler
Returns a value from aResultSet
. The returned object is converted to the Java data type specified in the fieldtype file.- Specified by:
getValue
in classJdbcValueHandler<Object>
- Parameters:
rs
- the ResultSet objectcolumnIndex
- the column index- Returns:
- get value from result set
- Throws:
SQLException
-
newInstance
Description copied from class:JdbcValueHandler
Returns a new instance of the object - initialized with the specified SQL type.- Specified by:
newInstance
in classJdbcValueHandler<Object>
- Parameters:
sqlType
- the sql type- Returns:
- returns a new instance
-