org.datanucleus.store.rdbms.mapping
Class RealRDBMSMapping

java.lang.Object
  extended by org.datanucleus.store.rdbms.mapping.RDBMSMapping
      extended by org.datanucleus.store.rdbms.mapping.ColumnMapping
          extended by org.datanucleus.store.rdbms.mapping.RealRDBMSMapping
All Implemented Interfaces:
DatastoreMapping

public class RealRDBMSMapping
extends ColumnMapping

Mapping of a REAL RDBMS type.


Field Summary
 
Fields inherited from class org.datanucleus.store.rdbms.mapping.ColumnMapping
column
 
Fields inherited from class org.datanucleus.store.rdbms.mapping.RDBMSMapping
LOCALISER, LOCALISER_STORE, mapping, storeMgr
 
Constructor Summary
  RealRDBMSMapping(JavaTypeMapping mapping, MappedStoreManager storeMgr, DatastoreField field)
          Constructor.
protected RealRDBMSMapping(MappedStoreManager storeMgr, JavaTypeMapping mapping)
           
 
Method Summary
 float getFloat(java.lang.Object rs, int param)
          Obtains a value from resultSet at position specified by exprIndex.
 java.lang.Object getObject(java.lang.Object rs, int param)
          Obtains a value from resultSet at position specified by exprIndex.
 SQLTypeInfo getTypeInfo()
          Accessor for the (SQL) type info for this datastore type.
 boolean isDecimalBased()
          Accessor for whether the mapping is decimal-based.
 void setFloat(java.lang.Object ps, int param, float value)
          Sets a value into preparedStatement at position specified by paramIndex.
 void setObject(java.lang.Object ps, int param, java.lang.Object value)
          Sets a value into preparedStatement at position specified by paramIndex.
 
Methods inherited from class org.datanucleus.store.rdbms.mapping.ColumnMapping
equals, getColumn, getDatastoreField, getInsertionInputParameter, getUpdateInputParameter, hashCode, includeInFetchStatement, initTypeInfo, isBitBased, isBooleanBased, isIntegerBased, isNullable, isStringBased
 
Methods inherited from class org.datanucleus.store.rdbms.mapping.RDBMSMapping
failureMessage, getBoolean, getByte, getChar, getDatabaseAdapter, getDouble, getInt, getJavaTypeMapping, getLong, getShort, getString, insertValuesOnInsert, setBoolean, setByte, setChar, setDouble, setInt, setLong, setShort, setString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RealRDBMSMapping

protected RealRDBMSMapping(MappedStoreManager storeMgr,
                           JavaTypeMapping mapping)
Parameters:
storeMgr - Store Manager
mapping - java type mapping

RealRDBMSMapping

public RealRDBMSMapping(JavaTypeMapping mapping,
                        MappedStoreManager storeMgr,
                        DatastoreField field)
Constructor.

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

isDecimalBased

public boolean isDecimalBased()
Accessor for whether the mapping is decimal-based.

Specified by:
isDecimalBased in interface DatastoreMapping
Overrides:
isDecimalBased in class ColumnMapping
Returns:
Whether the mapping is decimal based

getTypeInfo

public SQLTypeInfo getTypeInfo()
Description copied from class: RDBMSMapping
Accessor for the (SQL) type info for this datastore type.

Specified by:
getTypeInfo in class RDBMSMapping
Returns:
The type info

setFloat

public void setFloat(java.lang.Object ps,
                     int param,
                     float value)
Description copied from interface: DatastoreMapping
Sets a value into preparedStatement at position specified by paramIndex.

Specified by:
setFloat in interface DatastoreMapping
Overrides:
setFloat in class RDBMSMapping
Parameters:
ps - a datastore object that executes statements in the database
param - the position of the value in the statement
value - the value

getFloat

public float getFloat(java.lang.Object rs,
                      int param)
Description copied from interface: DatastoreMapping
Obtains a value from resultSet at position specified by exprIndex.

Specified by:
getFloat in interface DatastoreMapping
Overrides:
getFloat in class RDBMSMapping
Parameters:
rs - an object returned from the datastore with values
param - the position of the value in the result
Returns:
the value

setObject

public void setObject(java.lang.Object ps,
                      int param,
                      java.lang.Object value)
Description copied from interface: DatastoreMapping
Sets a value into preparedStatement at position specified by paramIndex.

Specified by:
setObject in interface DatastoreMapping
Overrides:
setObject in class RDBMSMapping
Parameters:
ps - a datastore object that executes statements in the database
param - the position of the value in the statement
value - the value

getObject

public java.lang.Object getObject(java.lang.Object rs,
                                  int param)
Description copied from interface: DatastoreMapping
Obtains a value from resultSet at position specified by exprIndex.

Specified by:
getObject in interface DatastoreMapping
Overrides:
getObject in class RDBMSMapping
Parameters:
rs - an object returned from the datastore with values
param - the position of the value in the result
Returns:
the value


Copyright © 2009. All Rights Reserved.