|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsf.qof.adapter.BlobAdapter
public class BlobAdapter
BlobAdapter is a generator mapping adapter for SQL Blob data types.
It maps Blob
columns to byte[]
and vice versa.
Blob
Constructor Summary | |
---|---|
BlobAdapter()
|
Method Summary | |
---|---|
void |
generateFromResult(ResultMapping resultMapping,
net.sf.cglib.core.CodeEmitter co,
net.sf.cglib.core.Local result,
int[] indexes)
Method to map the current record of a result set or the result of a callable statement to an object on the stack. |
void |
generateFromResultSet(ResultMapping resultMapping,
net.sf.cglib.core.CodeEmitter co,
net.sf.cglib.core.Local resultSet,
String[] columns)
Method to map the current record of a result set to an object on the stack. |
void |
generateRegisterOutputParameters(ResultMapping resultMapping,
net.sf.cglib.core.CodeEmitter co,
net.sf.cglib.core.Local callableStatement,
int[] indexes)
Method to register an output parameter in a callable statement. |
void |
generateToPreparedStatement(ParameterMapping parameterMapping,
net.sf.cglib.core.CodeEmitter co,
net.sf.cglib.core.Local preparedStatement,
int[] indexes,
net.sf.cglib.core.Local indexOffset)
Method to map the object on top of the stack to a prepared statement. |
int |
getNumberOfColumns()
Returns the number of mapped columns. |
Set<Class<?>> |
getTypes()
Returns the set of mappable Java types. |
static void |
register()
Register the mapping adapter with the default name "blob". |
static void |
register(String typeName)
Register the mapping adapter with the specified name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BlobAdapter()
Method Detail |
---|
public void generateFromResult(ResultMapping resultMapping, net.sf.cglib.core.CodeEmitter co, net.sf.cglib.core.Local result, int[] indexes)
GeneratorMappingAdapter
indexes
defines the SQL indexes for the result set
to be used in functions such a getInt(index)
.
generateFromResult
in interface GeneratorMappingAdapter
resultMapping
- the result mappingco
- code emitterresult
- ResultSet
or CallableStatement
local variableindexes
- array of SQL indexespublic void generateFromResultSet(ResultMapping resultMapping, net.sf.cglib.core.CodeEmitter co, net.sf.cglib.core.Local resultSet, String[] columns)
GeneratorMappingAdapter
columns
defines the SQL column name for the result set to be used
in functions such a getInt(name)
.
generateFromResultSet
in interface GeneratorMappingAdapter
resultMapping
- the result mappingco
- code emitterresultSet
- ResultSet
local variablecolumns
- array of SQL column namespublic void generateToPreparedStatement(ParameterMapping parameterMapping, net.sf.cglib.core.CodeEmitter co, net.sf.cglib.core.Local preparedStatement, int[] indexes, net.sf.cglib.core.Local indexOffset)
GeneratorMappingAdapter
indexes
defines the SQL index for the prepared statement to be used
in functions such a setInt(index, value)
.
generateToPreparedStatement
in interface GeneratorMappingAdapter
parameterMapping
- the parameter mappingco
- code emitterpreparedStatement
- prepared statement local variableindexes
- array of SQL indexesindexOffset
- offset to be added to the indexes if not nullpublic int getNumberOfColumns()
MappingAdapter
getNumberOfColumns
in interface MappingAdapter
public Set<Class<?>> getTypes()
MappingAdapter
getTypes
in interface MappingAdapter
public static void register()
public static void register(String typeName)
typeName
- type namepublic void generateRegisterOutputParameters(ResultMapping resultMapping, net.sf.cglib.core.CodeEmitter co, net.sf.cglib.core.Local callableStatement, int[] indexes)
GeneratorMappingAdapter
generateRegisterOutputParameters
in interface GeneratorMappingAdapter
resultMapping
- the result mappingco
- code emittercallableStatement
- callable statement local variableindexes
- array of SQL indexes
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |