org.jpox.store.rdbms.mapping
Class SmallIntRDBMSMapping

java.lang.Object
  extended byorg.jpox.store.rdbms.mapping.RDBMSMapping
      extended byorg.jpox.store.rdbms.mapping.ColumnMapping
          extended byorg.jpox.store.rdbms.mapping.SmallIntRDBMSMapping
All Implemented Interfaces:
DatastoreMapping

public class SmallIntRDBMSMapping
extends ColumnMapping

Mapping of a SMALLINT RDBMS type.

Version:
$Revision: 1.11 $

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
  SmallIntRDBMSMapping(JavaTypeMapping mapping, StoreManager storeMgr, DatastoreField field)
          Constructor.
protected SmallIntRDBMSMapping(StoreManager storeMgr, JavaTypeMapping mapping)
          Constructor.
 
Method Summary
 boolean getBoolean(java.lang.Object rs, int param)
          Getter for when we are storing a boolean field as a SMALLINT.
 byte getByte(java.lang.Object rs, int param)
          Obtains a value from resultSet at position specified by exprIndex.
 DatastoreField getDatastoreField()
          Accessor for the datastore field being used.
 int getInt(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.
 short getShort(java.lang.Object rs, int param)
          Obtains a value from resultSet at position specified by exprIndex.
 TypeInfo getTypeInfo()
          Accessor for type info
 void setBoolean(java.lang.Object ps, int param, boolean value)
          Setter for when we are storing a boolean field as a SMALLINT.
 void setByte(java.lang.Object ps, int param, byte 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 setObject(java.lang.Object ps, int param, java.lang.Object value)
          Sets a value into preparedStatement at position specified by paramIndex.
 void setShort(java.lang.Object ps, int param, short 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, getChar, getDatabaseAdapter, getDouble, getFloat, getJavaTypeMapping, getLong, getString, setChar, setDouble, setFloat, setLong, setString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SmallIntRDBMSMapping

protected SmallIntRDBMSMapping(StoreManager storeMgr,
                               JavaTypeMapping mapping)
Constructor.

Parameters:
storeMgr - Store Manager
mapping - Java type mapping

SmallIntRDBMSMapping

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

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

getTypeInfo

public TypeInfo getTypeInfo()
Accessor for type info

Specified by:
getTypeInfo in class ColumnMapping
Returns:
The type info for the datastore mapping

getDatastoreField

public DatastoreField getDatastoreField()
Accessor for the datastore field being used.

Specified by:
getDatastoreField in interface DatastoreMapping
Overrides:
getDatastoreField in class ColumnMapping
Returns:
Datastore field

setBoolean

public void setBoolean(java.lang.Object ps,
                       int param,
                       boolean value)
Setter for when we are storing a boolean field as a SMALLINT.

Specified by:
setBoolean in interface DatastoreMapping
Overrides:
setBoolean in class RDBMSMapping
Parameters:
ps - Prepared Statement
param - Number of the parameter in the statement
value - The boolean value

getBoolean

public boolean getBoolean(java.lang.Object rs,
                          int param)
Getter for when we are storing a boolean field as a SMALLINT.

Specified by:
getBoolean in interface DatastoreMapping
Overrides:
getBoolean in class RDBMSMapping
Parameters:
rs - Result Set from which to get the boolean
param - Number of the parameter in the statement
Returns:
The boolean value

setShort

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

Specified by:
setShort in interface DatastoreMapping
Overrides:
setShort in class RDBMSMapping

getShort

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

Specified by:
getShort in interface DatastoreMapping
Overrides:
getShort in class RDBMSMapping

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

setByte

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

Specified by:
setByte in interface DatastoreMapping
Overrides:
setByte in class RDBMSMapping

getByte

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

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