org.datanucleus.store.rdbms.mapping
Class IntegerRDBMSMapping

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.IntegerRDBMSMapping
All Implemented Interfaces:
DatastoreMapping

public class IntegerRDBMSMapping
extends ColumnMapping

Mapping of a INTEGER 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
  IntegerRDBMSMapping(JavaTypeMapping mapping, MappedStoreManager storeMgr, DatastoreField field)
          Constructor.
protected IntegerRDBMSMapping(MappedStoreManager storeMgr, JavaTypeMapping mapping)
           
 
Method Summary
 char getChar(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 isIntegerBased()
          Accessor for whether the mapping is integer-based.
 void setChar(java.lang.Object ps, int param, char 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, isDecimalBased, isNullable, isStringBased
 
Methods inherited from class org.datanucleus.store.rdbms.mapping.RDBMSMapping
failureMessage, getBoolean, getByte, getDatabaseAdapter, getDouble, getFloat, getJavaTypeMapping, getShort, getString, insertValuesOnInsert, setBoolean, setByte, setDouble, setFloat, setShort, setString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntegerRDBMSMapping

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

IntegerRDBMSMapping

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

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

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

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

setChar

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

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

getChar

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

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

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

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.