org.datanucleus.store.rdbms.mapping
Class BlobRDBMSMapping

java.lang.Object
  extended by org.datanucleus.store.rdbms.mapping.RDBMSMapping
      extended by org.datanucleus.store.rdbms.mapping.AbstractLargeBinaryRDBMSMapping
          extended by org.datanucleus.store.rdbms.mapping.BlobRDBMSMapping
All Implemented Interfaces:
org.datanucleus.store.mapped.mapping.DatastoreMapping

public class BlobRDBMSMapping
extends AbstractLargeBinaryRDBMSMapping

Mapping of a BLOB RDBMS type. A BLOB column can be treated in two ways in terms of storage and retrieval.


Field Summary
 
Fields inherited from class org.datanucleus.store.rdbms.mapping.RDBMSMapping
column, LOCALISER, LOCALISER_STORE, mapping, storeMgr
 
Constructor Summary
  BlobRDBMSMapping(org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping, org.datanucleus.store.mapped.MappedStoreManager storeMgr, org.datanucleus.store.mapped.DatastoreField field)
          Constructor.
protected BlobRDBMSMapping(org.datanucleus.store.mapped.MappedStoreManager storeMgr, org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping)
          Constructor.
 
Method Summary
 java.lang.String getString(java.lang.Object rs, int param)
          Accessor for String value when serialised.
 SQLTypeInfo getTypeInfo()
          Accessor for the RDBMS BLOB type being represented.
 void setString(java.lang.Object ps, int param, java.lang.String value)
          Cater for serialisation of Strings.
 
Methods inherited from class org.datanucleus.store.rdbms.mapping.AbstractLargeBinaryRDBMSMapping
getObject, initialize, setObject
 
Methods inherited from class org.datanucleus.store.rdbms.mapping.RDBMSMapping
equals, failureMessage, getBoolean, getByte, getChar, getColumn, getDatabaseAdapter, getDatastoreField, getDouble, getFloat, getInsertionInputParameter, getInt, getJavaTypeMapping, getLong, getShort, getUpdateInputParameter, hashCode, includeInFetchStatement, initTypeInfo, insertValuesOnInsert, isBitBased, isBooleanBased, isDecimalBased, isIntegerBased, isNullable, isStringBased, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setShort
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlobRDBMSMapping

protected BlobRDBMSMapping(org.datanucleus.store.mapped.MappedStoreManager storeMgr,
                           org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping)
Constructor.

Parameters:
storeMgr - Store Manager
mapping - Java type mapping

BlobRDBMSMapping

public BlobRDBMSMapping(org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping,
                        org.datanucleus.store.mapped.MappedStoreManager storeMgr,
                        org.datanucleus.store.mapped.DatastoreField field)
Constructor.

Parameters:
mapping - Java type mapping
storeMgr - Store Manager
field - Field to be mapped
Method Detail

getTypeInfo

public SQLTypeInfo getTypeInfo()
Accessor for the RDBMS BLOB type being represented.

Specified by:
getTypeInfo in class RDBMSMapping
Returns:
TypeInfo for the BLOB type.

setString

public void setString(java.lang.Object ps,
                      int param,
                      java.lang.String value)
Description copied from class: AbstractLargeBinaryRDBMSMapping
Cater for serialisation of Strings.

Specified by:
setString in interface org.datanucleus.store.mapped.mapping.DatastoreMapping
Overrides:
setString in class AbstractLargeBinaryRDBMSMapping
Parameters:
ps - PreparedStatement
param - param indexes
value - The value of the String

getString

public java.lang.String getString(java.lang.Object rs,
                                  int param)
Description copied from class: AbstractLargeBinaryRDBMSMapping
Accessor for String value when serialised.

Specified by:
getString in interface org.datanucleus.store.mapped.mapping.DatastoreMapping
Overrides:
getString in class AbstractLargeBinaryRDBMSMapping
Parameters:
rs - ResultSet
param - param indexes
Returns:
The String value


Copyright © 2009. All Rights Reserved.