org.datanucleus.store.rdbms.mapping
Class AbstractLargeBinaryRDBMSMapping

java.lang.Object
  extended by org.datanucleus.store.rdbms.mapping.RDBMSMapping
      extended by org.datanucleus.store.rdbms.mapping.AbstractLargeBinaryRDBMSMapping
All Implemented Interfaces:
org.datanucleus.store.mapped.mapping.DatastoreMapping
Direct Known Subclasses:
BlobRDBMSMapping, LongVarBinaryRDBMSMapping, VarBinaryRDBMSMapping

public abstract class AbstractLargeBinaryRDBMSMapping
extends RDBMSMapping

Mapping of a large binary (e.g BLOB, LONGVARBINARY) RDBMS type. A large binary 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
  AbstractLargeBinaryRDBMSMapping(org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping, org.datanucleus.store.mapped.MappedStoreManager storeMgr, org.datanucleus.store.mapped.DatastoreField field)
          Constructor.
protected AbstractLargeBinaryRDBMSMapping(org.datanucleus.store.mapped.MappedStoreManager storeMgr, org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping)
          Constructor.
 
Method Summary
 java.lang.Object getObject(java.lang.Object rs, int param)
          Method to retrieve the object from the large binary column.
 java.lang.String getString(java.lang.Object resultSet, int exprIndex)
          Accessor for String value when serialised.
protected  void initialize()
          Initialisation method, initialising the type info.
 void setObject(java.lang.Object ps, int param, java.lang.Object value)
          Method to store a field into a BLOB column.
 void setString(java.lang.Object preparedStatement, int exprIndex, java.lang.String value)
          Cater for serialisation of Strings.
 
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, getTypeInfo, 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

AbstractLargeBinaryRDBMSMapping

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

Parameters:
storeMgr - Store Manager
mapping - Java type mapping

AbstractLargeBinaryRDBMSMapping

public AbstractLargeBinaryRDBMSMapping(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

initialize

protected void initialize()
Initialisation method, initialising the type info.


setObject

public void setObject(java.lang.Object ps,
                      int param,
                      java.lang.Object value)
Method to store a field into a BLOB column.

Specified by:
setObject in interface org.datanucleus.store.mapped.mapping.DatastoreMapping
Overrides:
setObject in class RDBMSMapping
Parameters:
ps - The PreparedStatement
param - Parameter position in the statement
value - The value to store

getObject

public java.lang.Object getObject(java.lang.Object rs,
                                  int param)
Method to retrieve the object from the large binary column.

Specified by:
getObject in interface org.datanucleus.store.mapped.mapping.DatastoreMapping
Overrides:
getObject in class RDBMSMapping
Parameters:
rs - The ResultSet
param - The parameter position
Returns:
The object

setString

public void setString(java.lang.Object preparedStatement,
                      int exprIndex,
                      java.lang.String value)
Cater for serialisation of Strings.

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

getString

public java.lang.String getString(java.lang.Object resultSet,
                                  int exprIndex)
Accessor for String value when serialised.

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


Copyright © 2009. All Rights Reserved.