org.datanucleus.store.rdbms.mapping
Class TinyIntRDBMSMapping

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

public class TinyIntRDBMSMapping
extends RDBMSMapping

Mapping of a TINYINT RDBMS type.


Field Summary
 
Fields inherited from class org.datanucleus.store.rdbms.mapping.RDBMSMapping
column, LOCALISER_RDBMS, storeMgr
 
Fields inherited from class org.datanucleus.store.mapped.mapping.AbstractDatastoreMapping
LOCALISER, mapping
 
Constructor Summary
  TinyIntRDBMSMapping(org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping, org.datanucleus.store.mapped.MappedStoreManager storeMgr, org.datanucleus.store.mapped.DatastoreField field)
          Constructor.
protected TinyIntRDBMSMapping(org.datanucleus.store.mapped.MappedStoreManager storeMgr, org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping)
           
 
Method Summary
 boolean getBoolean(Object rs, int param)
          Getter for when we are storing a boolean field as a TINYINT.
 byte getByte(Object rs, int param)
           
 int getInt(Object rs, int param)
           
 long getLong(Object rs, int param)
           
 Object getObject(Object rs, int param)
           
 SQLTypeInfo getTypeInfo()
          Accessor for the (SQL) type info for this datastore type.
 boolean isIntegerBased()
          Accessor for whether the mapping is integer-based.
 void setBoolean(Object ps, int param, boolean value)
          Setter for when we are storing a boolean field as a TINYINT.
 void setByte(Object ps, int param, byte value)
           
 void setInt(Object ps, int param, int value)
           
 void setLong(Object ps, int param, long value)
           
 void setObject(Object ps, int param, Object value)
           
 
Methods inherited from class org.datanucleus.store.rdbms.mapping.RDBMSMapping
equals, failureMessage, failureMessage, getDatabaseAdapter, getDatastoreField, getInsertionInputParameter, getUpdateInputParameter, hashCode, includeInFetchStatement, initTypeInfo, insertValuesOnInsert, isNullable
 
Methods inherited from class org.datanucleus.store.mapped.mapping.AbstractDatastoreMapping
failureMessage, getChar, getDouble, getFloat, getJavaTypeMapping, getShort, getString, isBitBased, isBooleanBased, isDecimalBased, isStringBased, setChar, setDouble, setFloat, setShort, setString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TinyIntRDBMSMapping

protected TinyIntRDBMSMapping(org.datanucleus.store.mapped.MappedStoreManager storeMgr,
                              org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping)
Parameters:
storeMgr - Store Manager
mapping - Java type mapping

TinyIntRDBMSMapping

public TinyIntRDBMSMapping(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 org.datanucleus.store.mapped.mapping.AbstractDatastoreMapping
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

setBoolean

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

Specified by:
setBoolean in interface org.datanucleus.store.mapped.mapping.DatastoreMapping
Overrides:
setBoolean in class org.datanucleus.store.mapped.mapping.AbstractDatastoreMapping
Parameters:
ps - Prepared Statement
param - Number of the parameter in the statement
value - The boolean value

getBoolean

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

Specified by:
getBoolean in interface org.datanucleus.store.mapped.mapping.DatastoreMapping
Overrides:
getBoolean in class org.datanucleus.store.mapped.mapping.AbstractDatastoreMapping
Parameters:
rs - Result Set from which to get the boolean
param - Number of the parameter in the statement
Returns:
The boolean value

setInt

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

getInt

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

setLong

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

getLong

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

setByte

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

getByte

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

setObject

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

getObject

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


Copyright © 2012. All Rights Reserved.