public class BooleanColumnMapping extends AbstractColumnMapping
column, mapping, storeMgr
Constructor and Description |
---|
BooleanColumnMapping(JavaTypeMapping mapping,
RDBMSStoreManager storeMgr,
Column col)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getBoolean(ResultSet rs,
int param)
Obtains a value from
resultSet
at position specified by exprIndex . |
int |
getJDBCType()
Method to return the java.sql.Types type that this relates to.
|
Object |
getObject(ResultSet rs,
int param)
Obtains a value from
resultSet
at position specified by exprIndex . |
String |
getString(ResultSet rs,
int param)
Accessor for the value for a boolean field stored as a String datastore type.
|
boolean |
isBooleanBased()
Accessor for whether the mapping is boolean-based.
|
void |
setBoolean(PreparedStatement ps,
int param,
boolean value)
Sets a
value into ps
at position specified by paramIndex . |
void |
setObject(PreparedStatement ps,
int param,
Object value)
Sets a
value into ps
at position specified by paramIndex . |
void |
setString(PreparedStatement ps,
int param,
String value)
Setter for booleans stored as String datastore types.
|
equals, failureMessage, failureMessage, failureMessage, getByte, getChar, getColumn, getDatastoreAdapter, getDouble, getFloat, getInsertionInputParameter, getInt, getJavaTypeMapping, getLong, getShort, getTypeInfo, getUpdateInputParameter, hashCode, includeInFetchStatement, initTypeInfo, insertValuesOnInsert, isBitBased, isDecimalBased, isIntegerBased, isNullable, isStringBased, setByte, setChar, setDouble, setFloat, setInt, setLong, setShort, useDefaultWhenNull
public BooleanColumnMapping(JavaTypeMapping mapping, RDBMSStoreManager storeMgr, Column col)
mapping
- Java type mappingstoreMgr
- Store Managercol
- column to be mappedpublic boolean isBooleanBased()
isBooleanBased
in interface ColumnMapping
isBooleanBased
in class AbstractColumnMapping
public int getJDBCType()
AbstractColumnMapping
getJDBCType
in class AbstractColumnMapping
public void setBoolean(PreparedStatement ps, int param, boolean value)
ColumnMapping
value
into ps
at position specified by paramIndex
.setBoolean
in interface ColumnMapping
setBoolean
in class AbstractColumnMapping
ps
- PreparedStatementparam
- the position of the value in the statementvalue
- the valuepublic boolean getBoolean(ResultSet rs, int param)
ColumnMapping
resultSet
at position specified by exprIndex
.getBoolean
in interface ColumnMapping
getBoolean
in class AbstractColumnMapping
rs
- ResultSetparam
- the position of the value in the resultpublic void setString(PreparedStatement ps, int param, String value)
setString
in interface ColumnMapping
setString
in class AbstractColumnMapping
ps
- PreparedStatementparam
- Number of the fieldvalue
- Value of the booleanpublic String getString(ResultSet rs, int param)
getString
in interface ColumnMapping
getString
in class AbstractColumnMapping
rs
- ResultSetparam
- number of the parameter.public void setObject(PreparedStatement ps, int param, Object value)
ColumnMapping
value
into ps
at position specified by paramIndex
.setObject
in interface ColumnMapping
setObject
in class AbstractColumnMapping
ps
- PreparedStatementparam
- the position of the value in the statementvalue
- the valuepublic Object getObject(ResultSet rs, int param)
ColumnMapping
resultSet
at position specified by exprIndex
.getObject
in interface ColumnMapping
getObject
in class AbstractColumnMapping
rs
- ResultSetparam
- the position of the value in the resultCopyright © 2020. All rights reserved.