org.datanucleus.store.rdbms.mapping
Class DoubleRDBMSMapping

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.DoubleRDBMSMapping
All Implemented Interfaces:
DatastoreMapping
Direct Known Subclasses:
FloatRDBMSMapping

public class DoubleRDBMSMapping
extends ColumnMapping

Mapping of a DOUBLE 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
  DoubleRDBMSMapping(JavaTypeMapping mapping, MappedStoreManager storeMgr, DatastoreField field)
          Constructor.
protected DoubleRDBMSMapping(MappedStoreManager storeMgr, JavaTypeMapping mapping)
           
 
Method Summary
 double getDouble(java.lang.Object rs, int param)
          Obtains a value from resultSet at position specified by exprIndex.
 float getFloat(java.lang.Object rs, int param)
          Obtains a value from resultSet at position specified by exprIndex.
 int getInt(java.lang.Object rs, int param)
          Obtains a value from resultSet at position specified by exprIndex.
 long getLong(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.
 boolean isIntegerBased()
          Accessor for whether the mapping is integer-based.
 boolean isStringBased()
          Accessor for whether the mapping is string-based.
 void setDouble(java.lang.Object ps, int param, double value)
          Sets a value into preparedStatement at position specified by paramIndex.
 void setFloat(java.lang.Object ps, int param, float value)
          Sets a value into preparedStatement at position specified by paramIndex.
 void setInt(java.lang.Object ps, int param, int value)
          Sets a value into preparedStatement at position specified by paramIndex.
 void setLong(java.lang.Object ps, int param, long 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, isNullable
 
Methods inherited from class org.datanucleus.store.rdbms.mapping.RDBMSMapping
failureMessage, getBoolean, getByte, getChar, getDatabaseAdapter, getJavaTypeMapping, getShort, getString, insertValuesOnInsert, setBoolean, setByte, setChar, setShort, setString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoubleRDBMSMapping

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

DoubleRDBMSMapping

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

Parameters:
mapping - The java type mapping
storeMgr - Store Manager
field - Field being 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

isIntegerBased

public boolean isIntegerBased()
Accessor for whether the mapping is integer-based.

Specified by:
isIntegerBased in interface DatastoreMapping
Overrides:
isIntegerBased in class ColumnMapping
Returns:
Whether the mapping is integer based

isStringBased

public boolean isStringBased()
Accessor for whether the mapping is string-based.

Specified by:
isStringBased in interface DatastoreMapping
Overrides:
isStringBased in class ColumnMapping
Returns:
Whether the mapping is string 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

setInt

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

Specified by:
setInt in interface DatastoreMapping
Overrides:
setInt 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

getInt

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

Specified by:
getInt in interface DatastoreMapping
Overrides:
getInt 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

setLong

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

Specified by:
setLong in interface DatastoreMapping
Overrides:
setLong 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

getLong

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

Specified by:
getLong in interface DatastoreMapping
Overrides:
getLong 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

setDouble

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

Specified by:
setDouble in interface DatastoreMapping
Overrides:
setDouble 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

getDouble

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

Specified by:
getDouble in interface DatastoreMapping
Overrides:
getDouble 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

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

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

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.