Class OracleBlobColumnMapping
- java.lang.Object
-
- org.datanucleus.store.rdbms.mapping.column.AbstractColumnMapping
-
- org.datanucleus.store.rdbms.mapping.column.OracleBlobColumnMapping
-
- All Implemented Interfaces:
ColumnMapping,ColumnMappingPostSet
public class OracleBlobColumnMapping extends AbstractColumnMapping implements ColumnMappingPostSet
Mapping for an Oracle BLOB column. Extends the standard JDBC handler so that we can insert an empty BLOB, and then update it (Oracle non-standard behaviour).
-
-
Field Summary
-
Fields inherited from class org.datanucleus.store.rdbms.mapping.column.AbstractColumnMapping
column, mapping, storeMgr
-
-
Constructor Summary
Constructors Modifier Constructor Description OracleBlobColumnMapping(JavaTypeMapping mapping, RDBMSStoreManager storeMgr, Column col)Constructor.protectedOracleBlobColumnMapping(RDBMSStoreManager storeMgr, JavaTypeMapping mapping)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetInsertionInputParameter()Accessor for the string to put in any retrieval datastore statement for this field.intgetJDBCType()Method to return the java.sql.Types type that this relates to.ObjectgetObject(ResultSet rs, int param)Returns the object to be loaded from the Orale BLOB.StringgetString(ResultSet resultSet, int exprIndex)Obtains a value fromresultSetat position specified byexprIndex.StringgetUpdateInputParameter()Accessor for the string to put in any update datastore statements for this field.booleanincludeInSQLFetchStatement()Whether to include this mapping in a fetch statement.booleaninsertValuesOnInsert()Accessor for whether this mapping requires values inserting on an INSERT.voidsetPostProcessing(org.datanucleus.state.DNStateManager sm, Object value)Perform any post "set" processing on this column, using the provided value.-
Methods inherited from class org.datanucleus.store.rdbms.mapping.column.AbstractColumnMapping
equals, failureMessage, failureMessage, failureMessage, getBoolean, getByte, getChar, getColumn, getDatastoreAdapter, getDouble, getFloat, getInt, getJavaTypeMapping, getLong, getShort, getTypeInfo, hashCode, includeInFetchStatement, initTypeInfo, isBitBased, isBooleanBased, isDecimalBased, isIntegerBased, isNullable, isStringBased, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setObject, setShort, setString, useDefaultWhenNull
-
-
-
-
Constructor Detail
-
OracleBlobColumnMapping
public OracleBlobColumnMapping(JavaTypeMapping mapping, RDBMSStoreManager storeMgr, Column col)
Constructor.- Parameters:
mapping- The Java mappingstoreMgr- Store Manager in usecol- Column
-
OracleBlobColumnMapping
protected OracleBlobColumnMapping(RDBMSStoreManager storeMgr, JavaTypeMapping mapping)
Constructor.- Parameters:
storeMgr- Store Managermapping- The Java mapping
-
-
Method Detail
-
getInsertionInputParameter
public String getInsertionInputParameter()
Description copied from class:AbstractColumnMappingAccessor for the string to put in any retrieval datastore statement for this field. In RDBMS, this is typically a ? to be used in JDBC statements.- Specified by:
getInsertionInputParameterin interfaceColumnMapping- Overrides:
getInsertionInputParameterin classAbstractColumnMapping- Returns:
- The input parameter
- See Also:
AbstractColumnMapping.getInsertionInputParameter()
-
insertValuesOnInsert
public boolean insertValuesOnInsert()
Accessor for whether this mapping requires values inserting on an INSERT.- Specified by:
insertValuesOnInsertin interfaceColumnMapping- Overrides:
insertValuesOnInsertin classAbstractColumnMapping- Returns:
- Whether values are to be inserted into this mapping on an INSERT
-
getObject
public Object getObject(ResultSet rs, int param)
Returns the object to be loaded from the Orale BLOB.- Specified by:
getObjectin interfaceColumnMapping- Overrides:
getObjectin classAbstractColumnMapping- Parameters:
rs- the ResultSet from the queryparam- the index in the query- Returns:
- the object loaded as a byte[]
- Throws:
org.datanucleus.exceptions.NucleusDataStoreException- Thrown if an error occurs in datastore communication
-
getString
public String getString(ResultSet resultSet, int exprIndex)
Description copied from interface:ColumnMappingObtains a value fromresultSetat position specified byexprIndex.- Specified by:
getStringin interfaceColumnMapping- Overrides:
getStringin classAbstractColumnMapping- Parameters:
resultSet- ResultSetexprIndex- the position of the value in the result- Returns:
- the value
- See Also:
AbstractColumnMapping.getString(ResultSet, int)
-
getJDBCType
public int getJDBCType()
Description copied from class:AbstractColumnMappingMethod to return the java.sql.Types type that this relates to.- Specified by:
getJDBCTypein classAbstractColumnMapping- Returns:
- The JDBC "type"
-
getUpdateInputParameter
public String getUpdateInputParameter()
Description copied from class:AbstractColumnMappingAccessor for the string to put in any update datastore statements for this field. In RDBMS, this is typically a ? to be used in JDBC statements.- Specified by:
getUpdateInputParameterin interfaceColumnMapping- Overrides:
getUpdateInputParameterin classAbstractColumnMapping- Returns:
- The input parameter.
- See Also:
AbstractColumnMapping.getUpdateInputParameter()
-
includeInSQLFetchStatement
public boolean includeInSQLFetchStatement()
Whether to include this mapping in a fetch statement.- Returns:
- Whether to include it when fetching the object
-
setPostProcessing
public void setPostProcessing(org.datanucleus.state.DNStateManager sm, Object value)Description copied from interface:ColumnMappingPostSetPerform any post "set" processing on this column, using the provided value.- Specified by:
setPostProcessingin interfaceColumnMappingPostSet- Parameters:
sm- StateManager for object being setvalue- The value to use on the set
-
-