org.datanucleus.store.rdbms.mapping
Class BooleanRDBMSMapping

java.lang.Object
  extended by org.datanucleus.store.rdbms.mapping.RDBMSMapping
      extended by org.datanucleus.store.rdbms.mapping.BooleanRDBMSMapping
All Implemented Interfaces:
org.datanucleus.store.mapped.mapping.DatastoreMapping
Direct Known Subclasses:
BitRDBMSMapping

public class BooleanRDBMSMapping
extends RDBMSMapping

Mapping of a BOOLEAN RDBMS type.


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

Constructor Detail

BooleanRDBMSMapping

protected BooleanRDBMSMapping(org.datanucleus.store.mapped.MappedStoreManager storeMgr,
                              org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping)
Parameters:
storeMgr - Store Manager
mapping - The java type mapping

BooleanRDBMSMapping

public BooleanRDBMSMapping(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

isBooleanBased

public boolean isBooleanBased()
Accessor for whether the mapping is boolean-based.

Specified by:
isBooleanBased in interface org.datanucleus.store.mapped.mapping.DatastoreMapping
Overrides:
isBooleanBased in class RDBMSMapping
Returns:
Whether the mapping is boolean 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(java.lang.Object ps,
                       int param,
                       boolean value)
Specified by:
setBoolean in interface org.datanucleus.store.mapped.mapping.DatastoreMapping
Overrides:
setBoolean in class RDBMSMapping

getBoolean

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

setString

public void setString(java.lang.Object ps,
                      int param,
                      java.lang.String value)
Setter for booleans stored as String datastore types.

Specified by:
setString in interface org.datanucleus.store.mapped.mapping.DatastoreMapping
Overrides:
setString in class RDBMSMapping
Parameters:
ps - PreparedStatement
param - Number of the field
value - Value of the boolean

getString

public java.lang.String getString(java.lang.Object rs,
                                  int param)
Accessor for the value for a boolean field stored as a String datastore type.

Specified by:
getString in interface org.datanucleus.store.mapped.mapping.DatastoreMapping
Overrides:
getString in class RDBMSMapping
Parameters:
rs - ResultSet
param - number of the parameter.
Returns:
The value

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.