org.datanucleus.store.rdbms.mapping
Class SmallIntRDBMSMapping

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

public class SmallIntRDBMSMapping
extends RDBMSMapping

Mapping of a SMALLINT RDBMS type.


Field Summary
 
Fields inherited from class org.datanucleus.store.rdbms.mapping.RDBMSMapping
column, LOCALISER, LOCALISER_STORE, mapping, storeMgr
 
Constructor Summary
  SmallIntRDBMSMapping(org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping, org.datanucleus.store.mapped.MappedStoreManager storeMgr, org.datanucleus.store.mapped.DatastoreField field)
          Constructor.
protected SmallIntRDBMSMapping(org.datanucleus.store.mapped.MappedStoreManager storeMgr, org.datanucleus.store.mapped.mapping.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)
           
 int getInt(java.lang.Object rs, int param)
           
 long getLong(java.lang.Object rs, int param)
           
 java.lang.Object getObject(java.lang.Object rs, int param)
           
 short getShort(java.lang.Object rs, int param)
           
 SQLTypeInfo getTypeInfo()
          Accessor for type info
 boolean isIntegerBased()
          Accessor for whether the mapping is integer-based.
 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)
           
 void setInt(java.lang.Object ps, int param, int value)
           
 void setLong(java.lang.Object ps, int param, long value)
           
 void setObject(java.lang.Object ps, int param, java.lang.Object value)
           
 void setShort(java.lang.Object ps, int param, short value)
           
 
Methods inherited from class org.datanucleus.store.rdbms.mapping.RDBMSMapping
equals, failureMessage, getChar, getColumn, getDatabaseAdapter, getDatastoreField, getDouble, getFloat, getInsertionInputParameter, getJavaTypeMapping, getString, getUpdateInputParameter, hashCode, includeInFetchStatement, initTypeInfo, insertValuesOnInsert, isBitBased, isBooleanBased, isDecimalBased, isNullable, isStringBased, setChar, setDouble, setFloat, setString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SmallIntRDBMSMapping

protected SmallIntRDBMSMapping(org.datanucleus.store.mapped.MappedStoreManager storeMgr,
                               org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping)
Constructor.

Parameters:
storeMgr - Store Manager
mapping - Java type mapping

SmallIntRDBMSMapping

public SmallIntRDBMSMapping(org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping,
                            org.datanucleus.store.mapped.MappedStoreManager storeMgr,
                            org.datanucleus.store.mapped.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 org.datanucleus.store.mapped.mapping.DatastoreMapping
Overrides:
isIntegerBased in class RDBMSMapping
Returns:
Whether the mapping is integer based

getTypeInfo

public SQLTypeInfo getTypeInfo()
Accessor for type info

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

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 org.datanucleus.store.mapped.mapping.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 org.datanucleus.store.mapped.mapping.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)
Specified by:
setShort in interface org.datanucleus.store.mapped.mapping.DatastoreMapping
Overrides:
setShort in class RDBMSMapping

getShort

public short getShort(java.lang.Object rs,
                      int param)
Specified by:
getShort in interface org.datanucleus.store.mapped.mapping.DatastoreMapping
Overrides:
getShort in class RDBMSMapping

setInt

public void setInt(java.lang.Object ps,
                   int param,
                   int value)
Specified by:
setInt in interface org.datanucleus.store.mapped.mapping.DatastoreMapping
Overrides:
setInt in class RDBMSMapping

getInt

public int getInt(java.lang.Object rs,
                  int param)
Specified by:
getInt in interface org.datanucleus.store.mapped.mapping.DatastoreMapping
Overrides:
getInt in class RDBMSMapping

setLong

public void setLong(java.lang.Object ps,
                    int param,
                    long value)
Specified by:
setLong in interface org.datanucleus.store.mapped.mapping.DatastoreMapping
Overrides:
setLong in class RDBMSMapping

getLong

public long getLong(java.lang.Object rs,
                    int param)
Specified by:
getLong in interface org.datanucleus.store.mapped.mapping.DatastoreMapping
Overrides:
getLong in class RDBMSMapping

setByte

public void setByte(java.lang.Object ps,
                    int param,
                    byte value)
Specified by:
setByte in interface org.datanucleus.store.mapped.mapping.DatastoreMapping
Overrides:
setByte in class RDBMSMapping

getByte

public byte getByte(java.lang.Object rs,
                    int param)
Specified by:
getByte in interface org.datanucleus.store.mapped.mapping.DatastoreMapping
Overrides:
getByte in class RDBMSMapping

setObject

public void setObject(java.lang.Object ps,
                      int param,
                      java.lang.Object value)
Specified by:
setObject in interface org.datanucleus.store.mapped.mapping.DatastoreMapping
Overrides:
setObject in class RDBMSMapping

getObject

public java.lang.Object getObject(java.lang.Object rs,
                                  int param)
Specified by:
getObject in interface org.datanucleus.store.mapped.mapping.DatastoreMapping
Overrides:
getObject in class RDBMSMapping


Copyright © 2009. All Rights Reserved.