org.datanucleus.store.rdbms.mapping
Class NCharRDBMSMapping

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.CharRDBMSMapping
              extended by org.datanucleus.store.rdbms.mapping.NCharRDBMSMapping
All Implemented Interfaces:
org.datanucleus.store.mapped.mapping.DatastoreMapping
Direct Known Subclasses:
NVarcharRDBMSMapping

public class NCharRDBMSMapping
extends CharRDBMSMapping

Mapping of a NCHAR RDBMS type. Copied from CharRDBMSMapping but uses setNString/getNString instead of setString/getString.


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
NCharRDBMSMapping(org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping, org.datanucleus.store.mapped.MappedStoreManager storeMgr, org.datanucleus.store.mapped.DatastoreField field)
           
NCharRDBMSMapping(org.datanucleus.store.mapped.MappedStoreManager storeMgr, org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping)
           
 
Method Summary
 boolean getBoolean(Object rs, int param)
          Method to extract a boolean from the ResultSet at the specified position
 char getChar(Object rs, int param)
          Method to extract a character from the ResultSet at the specified position
 Object getObject(Object rs, int param)
          Method to extract an object from the ResultSet at the specified position
 String getString(Object rs, int param)
          Method to extract a String from the ResultSet at the specified position
 SQLTypeInfo getTypeInfo()
          Accessor for the (SQL) type info for this datastore type.
 void setBoolean(Object ps, int param, boolean value)
          Method to set a boolean at the specified position in the JDBC PreparedStatement.
 void setChar(Object ps, int param, char value)
          Method to set a character at the specified position in the JDBC PreparedStatement.
 void setObject(Object ps, int param, Object value)
          Method to set an object at the specified position in the JDBC PreparedStatement.
 void setString(Object ps, int param, String value)
          Method to set a String at the specified position in the JDBC PreparedStatement.
 
Methods inherited from class org.datanucleus.store.rdbms.mapping.CharRDBMSMapping
getJavaUtilDateFormat, initialize, isStringBased
 
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, getByte, getDouble, getFloat, getInt, getJavaTypeMapping, getLong, getShort, isBitBased, isBooleanBased, isDecimalBased, isIntegerBased, setByte, setDouble, setFloat, setInt, setLong, setShort
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NCharRDBMSMapping

public NCharRDBMSMapping(org.datanucleus.store.mapped.MappedStoreManager storeMgr,
                         org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping)
Parameters:
storeMgr -
mapping -

NCharRDBMSMapping

public NCharRDBMSMapping(org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping,
                         org.datanucleus.store.mapped.MappedStoreManager storeMgr,
                         org.datanucleus.store.mapped.DatastoreField field)
Parameters:
mapping -
storeMgr -
field -
Method Detail

getTypeInfo

public SQLTypeInfo getTypeInfo()
Description copied from class: RDBMSMapping
Accessor for the (SQL) type info for this datastore type.

Overrides:
getTypeInfo in class CharRDBMSMapping
Returns:
The type info

setChar

public void setChar(Object ps,
                    int param,
                    char value)
Method to set a character at the specified position in the JDBC PreparedStatement.

Specified by:
setChar in interface org.datanucleus.store.mapped.mapping.DatastoreMapping
Overrides:
setChar in class CharRDBMSMapping
Parameters:
ps - The PreparedStatement
param - Parameter position
value - The value to set

getChar

public char getChar(Object rs,
                    int param)
Method to extract a character from the ResultSet at the specified position

Specified by:
getChar in interface org.datanucleus.store.mapped.mapping.DatastoreMapping
Overrides:
getChar in class CharRDBMSMapping
Parameters:
rs - The Result Set
param - The parameter position
Returns:
the character

setString

public void setString(Object ps,
                      int param,
                      String value)
Method to set a String at the specified position in the JDBC PreparedStatement.

Specified by:
setString in interface org.datanucleus.store.mapped.mapping.DatastoreMapping
Overrides:
setString in class CharRDBMSMapping
Parameters:
ps - The PreparedStatement
param - Parameter position
value - The value to set

getString

public String getString(Object rs,
                        int param)
Method to extract a String from the ResultSet at the specified position

Specified by:
getString in interface org.datanucleus.store.mapped.mapping.DatastoreMapping
Overrides:
getString in class CharRDBMSMapping
Parameters:
rs - The Result Set
param - The parameter position
Returns:
the String

setBoolean

public void setBoolean(Object ps,
                       int param,
                       boolean value)
Method to set a boolean at the specified position in the JDBC PreparedStatement.

Specified by:
setBoolean in interface org.datanucleus.store.mapped.mapping.DatastoreMapping
Overrides:
setBoolean in class CharRDBMSMapping
Parameters:
ps - The PreparedStatement
param - Parameter position
value - The value to set

getBoolean

public boolean getBoolean(Object rs,
                          int param)
Method to extract a boolean from the ResultSet at the specified position

Specified by:
getBoolean in interface org.datanucleus.store.mapped.mapping.DatastoreMapping
Overrides:
getBoolean in class CharRDBMSMapping
Parameters:
rs - The Result Set
param - The parameter position
Returns:
the boolean

setObject

public void setObject(Object ps,
                      int param,
                      Object value)
Method to set an object at the specified position in the JDBC PreparedStatement.

Specified by:
setObject in interface org.datanucleus.store.mapped.mapping.DatastoreMapping
Overrides:
setObject in class CharRDBMSMapping
Parameters:
ps - The PreparedStatement
param - Parameter position
value - The value to set

getObject

public Object getObject(Object rs,
                        int param)
Method to extract an object from the ResultSet at the specified position

Specified by:
getObject in interface org.datanucleus.store.mapped.mapping.DatastoreMapping
Overrides:
getObject in class CharRDBMSMapping
Parameters:
rs - The Result Set
param - The parameter position
Returns:
the object


Copyright © 2012. All Rights Reserved.