Class NullMapping
java.lang.Object
org.datanucleus.store.rdbms.mapping.java.JavaTypeMapping
org.datanucleus.store.rdbms.mapping.java.SingleFieldMapping
org.datanucleus.store.rdbms.mapping.java.NullMapping
Simple mapping for a null literal. Only used when the type is not determined
-
Field Summary
Fields inherited from class org.datanucleus.store.rdbms.mapping.java.SingleFieldMapping
EXTENSION_CHECK_CONSTRAINT_VALUES
Fields inherited from class org.datanucleus.store.rdbms.mapping.java.JavaTypeMapping
absFieldNumber, columnMappings, mmd, referenceMapping, roleForMember, storeMgr, table, type
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAccessor for the java type being mapped.Obtains a value fromdatastoreResults
at position specified byexprIndex
.void
setObject
(org.datanucleus.ExecutionContext ec, PreparedStatement ps, int[] exprIndex, Object value) Sets avalue
intodatastoreStatement
at position specified byexprIndex
.Methods inherited from class org.datanucleus.store.rdbms.mapping.java.SingleFieldMapping
getBoolean, getByte, getChar, getDefaultLength, getDouble, getFloat, getInt, getJavaTypeForColumnMapping, getLong, getShort, getString, getValidValues, initialize, prepareColumnMapping, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setShort, setString
Methods inherited from class org.datanucleus.store.rdbms.mapping.java.JavaTypeMapping
addColumnMapping, equals, failureMessage, getAbsoluteFieldNumber, getColumnMapping, getColumnMappings, getColumnMetaDataForMember, getMemberMetaData, getNumberOfColumnMappings, getObject, getReferenceMapping, getRoleForMember, getStoreManager, getTable, getType, getValueForColumnMapping, hashCode, hasSimpleDatastoreRepresentation, includeInFetchStatement, includeInInsertStatement, includeInUpdateStatement, initialize, isNullable, isSerialised, performSetPostProcessing, representableAsStringLiteralInStatement, requiresSetPostProcessing, setAbsFieldNumber, setMemberMetaData, setObject, setReferenceMapping, setRoleForMember, setTable
-
Constructor Details
-
NullMapping
-
-
Method Details
-
getJavaType
Description copied from class:JavaTypeMapping
Accessor for the java type being mapped. This is the java type that the mapping represents. Some examples :- if the field is of type "MyClass" then the mapping will be OIDMapping (or subclass) the javaType will be OID, and the type will be MyClass.
- if the field is of type "int" then the mapping will be IntegerMapping, the javaType will be Integer, and the type will be int.
- Specified by:
getJavaType
in classJavaTypeMapping
- Returns:
- The java type
-
getObject
Description copied from class:JavaTypeMapping
Obtains a value fromdatastoreResults
at position specified byexprIndex
.- Overrides:
getObject
in classSingleFieldMapping
- Parameters:
ec
- ExecutionContextresultSet
- ResultSetexprIndex
- the position of the value in the result- Returns:
- the value
-
setObject
public void setObject(org.datanucleus.ExecutionContext ec, PreparedStatement ps, int[] exprIndex, Object value) Description copied from class:JavaTypeMapping
Sets avalue
intodatastoreStatement
at position specified byexprIndex
.- Overrides:
setObject
in classSingleFieldMapping
- Parameters:
ec
- ExecutionContextps
- PreparedStatementexprIndex
- the position of the value in the statementvalue
- the value
-