Class NCharColumnMapping
- java.lang.Object
-
- org.datanucleus.store.rdbms.mapping.column.AbstractColumnMapping
-
- org.datanucleus.store.rdbms.mapping.column.CharColumnMapping
-
- org.datanucleus.store.rdbms.mapping.column.NCharColumnMapping
-
- All Implemented Interfaces:
ColumnMapping
- Direct Known Subclasses:
NVarcharColumnMapping
public class NCharColumnMapping extends CharColumnMapping
Mapping of a NCHAR column. Copied from CharColumnMapping but uses setNString/getNString instead of setString/getString.
-
-
Field Summary
-
Fields inherited from class org.datanucleus.store.rdbms.mapping.column.AbstractColumnMapping
column, mapping, storeMgr
-
-
Constructor Summary
Constructors Constructor Description NCharColumnMapping(JavaTypeMapping mapping, RDBMSStoreManager storeMgr, Column col)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getBoolean(ResultSet rs, int param)
Method to extract a boolean from the ResultSet at the specified positionchar
getChar(ResultSet rs, int param)
Method to extract a character from the ResultSet at the specified positionint
getJDBCType()
Method to return the java.sql.Types type that this relates to.Object
getObject(ResultSet rs, int param)
Method to extract an object from the ResultSet at the specified positionString
getString(ResultSet rs, int param)
Method to extract a String from the ResultSet at the specified positionvoid
setBoolean(PreparedStatement ps, int param, boolean value)
Method to set a boolean at the specified position in the JDBC PreparedStatement.void
setChar(PreparedStatement ps, int param, char value)
Method to set a character at the specified position in the JDBC PreparedStatement.void
setObject(PreparedStatement ps, int param, Object value)
Method to set an object at the specified position in the JDBC PreparedStatement.void
setString(PreparedStatement 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.column.CharColumnMapping
getJavaUtilDateFormat, initialize, isStringBased
-
Methods inherited from class org.datanucleus.store.rdbms.mapping.column.AbstractColumnMapping
equals, failureMessage, failureMessage, failureMessage, getByte, getColumn, getDatastoreAdapter, getDouble, getFloat, getInsertionInputParameter, getInt, getJavaTypeMapping, getLong, getShort, getTypeInfo, getUpdateInputParameter, hashCode, includeInFetchStatement, initTypeInfo, insertValuesOnInsert, isBitBased, isBooleanBased, isDecimalBased, isIntegerBased, isNullable, setByte, setDouble, setFloat, setInt, setLong, setShort, useDefaultWhenNull
-
-
-
-
Constructor Detail
-
NCharColumnMapping
public NCharColumnMapping(JavaTypeMapping mapping, RDBMSStoreManager storeMgr, Column col)
-
-
Method Detail
-
getJDBCType
public int getJDBCType()
Description copied from class:AbstractColumnMapping
Method to return the java.sql.Types type that this relates to.- Overrides:
getJDBCType
in classCharColumnMapping
- Returns:
- The JDBC "type"
-
setChar
public void setChar(PreparedStatement ps, int param, char value)
Method to set a character at the specified position in the JDBC PreparedStatement.- Specified by:
setChar
in interfaceColumnMapping
- Overrides:
setChar
in classCharColumnMapping
- Parameters:
ps
- The PreparedStatementparam
- Parameter positionvalue
- The value to set
-
getChar
public char getChar(ResultSet rs, int param)
Method to extract a character from the ResultSet at the specified position- Specified by:
getChar
in interfaceColumnMapping
- Overrides:
getChar
in classCharColumnMapping
- Parameters:
rs
- The Result Setparam
- The parameter position- Returns:
- the character
-
setString
public void setString(PreparedStatement ps, int param, String value)
Method to set a String at the specified position in the JDBC PreparedStatement.- Specified by:
setString
in interfaceColumnMapping
- Overrides:
setString
in classCharColumnMapping
- Parameters:
ps
- The PreparedStatementparam
- Parameter positionvalue
- The value to set
-
getString
public String getString(ResultSet rs, int param)
Method to extract a String from the ResultSet at the specified position- Specified by:
getString
in interfaceColumnMapping
- Overrides:
getString
in classCharColumnMapping
- Parameters:
rs
- The Result Setparam
- The parameter position- Returns:
- the String
-
setBoolean
public void setBoolean(PreparedStatement ps, int param, boolean value)
Method to set a boolean at the specified position in the JDBC PreparedStatement.- Specified by:
setBoolean
in interfaceColumnMapping
- Overrides:
setBoolean
in classCharColumnMapping
- Parameters:
ps
- The PreparedStatementparam
- Parameter positionvalue
- The value to set
-
getBoolean
public boolean getBoolean(ResultSet rs, int param)
Method to extract a boolean from the ResultSet at the specified position- Specified by:
getBoolean
in interfaceColumnMapping
- Overrides:
getBoolean
in classCharColumnMapping
- Parameters:
rs
- The Result Setparam
- The parameter position- Returns:
- the boolean
-
setObject
public void setObject(PreparedStatement ps, int param, Object value)
Method to set an object at the specified position in the JDBC PreparedStatement.- Specified by:
setObject
in interfaceColumnMapping
- Overrides:
setObject
in classCharColumnMapping
- Parameters:
ps
- The PreparedStatementparam
- Parameter positionvalue
- The value to set
-
getObject
public Object getObject(ResultSet rs, int param)
Method to extract an object from the ResultSet at the specified position- Specified by:
getObject
in interfaceColumnMapping
- Overrides:
getObject
in classCharColumnMapping
- Parameters:
rs
- The Result Setparam
- The parameter position- Returns:
- the object
-
-