org.jpox.store.rdbms.mapping
Class DoubleRDBMSMapping

java.lang.Object
  extended byorg.jpox.store.rdbms.mapping.RDBMSMapping
      extended byorg.jpox.store.rdbms.mapping.ColumnMapping
          extended byorg.jpox.store.rdbms.mapping.DoubleRDBMSMapping
All Implemented Interfaces:
DatastoreMapping
Direct Known Subclasses:
FloatRDBMSMapping

public class DoubleRDBMSMapping
extends ColumnMapping

Mapping of a DOUBLE RDBMS type.

Version:
$Revision: 1.7 $

Field Summary
 
Fields inherited from class org.jpox.store.rdbms.mapping.ColumnMapping
column
 
Fields inherited from class org.jpox.store.rdbms.mapping.RDBMSMapping
LOCALISER, LOCALISER_STORE, mapping, storeMgr
 
Constructor Summary
  DoubleRDBMSMapping(JavaTypeMapping mapping, StoreManager storeMgr, DatastoreField field)
          Constructor.
protected DoubleRDBMSMapping(StoreManager storeMgr, JavaTypeMapping mapping)
           
 
Method Summary
 DatastoreField getDatastoreField()
          The datastore field mapped
 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.
 TypeInfo getTypeInfo()
          Returns the TypeInfo (JDBC SQL type) for columns.
 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.jpox.store.rdbms.mapping.ColumnMapping
equals, getColumn, getInsertionInputParameter, getUpdateInputParameter, hashCode, includeInFetchStatement, initTypeInfo, isNullable
 
Methods inherited from class org.jpox.store.rdbms.mapping.RDBMSMapping
failureMessage, getBoolean, getByte, getChar, getDatabaseAdapter, getJavaTypeMapping, getShort, getString, 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(StoreManager storeMgr,
                             JavaTypeMapping mapping)
Parameters:
storeMgr - Store Manager
mapping - The java type mapping

DoubleRDBMSMapping

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

Parameters:
mapping - The java type mapping
storeMgr - Store Manager
field - Field being mapped
Method Detail

getTypeInfo

public TypeInfo getTypeInfo()
Description copied from class: ColumnMapping
Returns the TypeInfo (JDBC SQL type) for columns. This method is capable of returning only one TypeInfo (SQL Type). In that way, it seems adequate for using in 1 column Mapping or many columns that share the same TypeInfo. However adequate in most of uses, Mappings using two or more columns should overwrite the initTypeInfo method to appropriate set differents TypeInfo (SQL type) for all the columns

Specified by:
getTypeInfo in class ColumnMapping
Returns:
The TypeInfo

getDatastoreField

public DatastoreField getDatastoreField()
Description copied from interface: DatastoreMapping
The datastore field mapped

Specified by:
getDatastoreField in interface DatastoreMapping
Overrides:
getDatastoreField in class ColumnMapping

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

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

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

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

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

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

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

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

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

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


Copyright © -2007 . All Rights Reserved.