public class ComhandleUserType extends AbstractWrapperUserType
P2J COM object wrapper
. This permits Hibernate to
convert this data type to and from the SQL VARCHAR data type. The unknown value is mapped to
SQL NULL.Modifier and Type | Field and Description |
---|---|
private static int[] |
SQL_TYPES
Single element array containing the SQL type constant being mapped
|
LOG, LOG_TRACE
Constructor and Description |
---|
ComhandleUserType() |
Modifier and Type | Method and Description |
---|---|
protected void |
bindNonNull(java.sql.PreparedStatement ps,
BaseDataType value,
int index)
Set a
String value into the given prepared statement, based upon the
comhandle instance value . |
java.lang.Object |
deepCopy(java.lang.Object value)
Create and return a deep copy of the given
comhandle instance. |
protected java.lang.Object |
getBaseValue(java.sql.ResultSet rs,
java.lang.String column)
Extract a
String value from a result set at a particular
column. |
protected BaseDataType |
instantiateRegular(java.lang.Object value)
Construct and return an instance of
comhandle which wraps value . |
protected BaseDataType |
instantiateUnknown()
Construct and return an instance of
comhandle which is initialized to the
unknown value. |
java.lang.Class |
returnedClass()
Gets the Java data type class mapped by this custom type.
|
int[] |
sqlTypes()
Get the array of SQL data type constants (in this case only a single constant), which this
classes uses to map a com handle to/from a database record.
|
assemble, disassemble, equals, hashCode, isMutable, nullSafeGet, nullSafeSet, replace, toString
private static final int[] SQL_TYPES
public int[] sqlTypes()
public final java.lang.Class returnedClass()
P2J COM handle
class.public final java.lang.Object deepCopy(java.lang.Object value)
comhandle
instance.value
- The comhandle
instance to be copied.comhandle
which contains the same internal value as
value
.protected final java.lang.Object getBaseValue(java.sql.ResultSet rs, java.lang.String column) throws java.sql.SQLException
String
value from a result set at a particular
column.getBaseValue
in class AbstractWrapperUserType
rs
- Result set containing data to be extracted.column
- Name of the column at which data will be extracted.null
.java.sql.SQLException
- if a database access error occurs.protected final BaseDataType instantiateUnknown()
comhandle
which is initialized to the
unknown value.instantiateUnknown
in class AbstractWrapperUserType
comhandle
instance which represents the unknown
value.protected final BaseDataType instantiateRegular(java.lang.Object value)
comhandle
which wraps value
.instantiateRegular
in class AbstractWrapperUserType
value
- String value to be wrapped by a comhandle
; will not be
null
.value
wrapped in a comhandle
.protected final void bindNonNull(java.sql.PreparedStatement ps, BaseDataType value, int index) throws java.sql.SQLException
String
value into the given prepared statement, based upon the
comhandle
instance value
.bindNonNull
in class AbstractWrapperUserType
ps
- Prepared statement into which we will set our data.value
- A comhandle
instance.index
- Index in the statement at which to write the data.java.sql.SQLException
- if an error occurs setting data into the statement.