Class SerialisedPCMapping
- java.lang.Object
-
- org.datanucleus.store.rdbms.mapping.java.JavaTypeMapping
-
- org.datanucleus.store.rdbms.mapping.java.SingleFieldMapping
-
- org.datanucleus.store.rdbms.mapping.java.SerialisedMapping
-
- org.datanucleus.store.rdbms.mapping.java.SerialisedPCMapping
-
- Direct Known Subclasses:
OracleSerialisedPCMapping,SerialisedElementPCMapping,SerialisedKeyPCMapping,SerialisedValuePCMapping
public class SerialisedPCMapping extends SerialisedMapping
Mapping for a serialised persistable object. Extends ObjectMapping since that provides the basic serialisation mechanism, adding on the addition of StateManagers to the serialised object whenever it is required.
-
-
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 Constructor Description SerialisedPCMapping()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetObject(org.datanucleus.ExecutionContext ec, ResultSet resultSet, int[] exprIndex)Method to extract the value of the persistable from a ResultSet.ObjectgetObject(org.datanucleus.ExecutionContext ec, ResultSet resultSet, int[] exprIndex, org.datanucleus.state.DNStateManager ownerSM, int fieldNumber)Method to extract the value of the persistable from a ResultSet.voidsetObject(org.datanucleus.ExecutionContext ec, PreparedStatement ps, int[] exprIndex, Object value)Method to populate parameter positions in a PreparedStatement with this objectvoidsetObject(org.datanucleus.ExecutionContext ec, PreparedStatement ps, int[] exprIndex, Object value, org.datanucleus.state.DNStateManager ownerSM, int fieldNumber)Method to populate parameter positions in a PreparedStatement with this object-
Methods inherited from class org.datanucleus.store.rdbms.mapping.java.SerialisedMapping
getJavaType, getJavaTypeForColumnMapping
-
Methods inherited from class org.datanucleus.store.rdbms.mapping.java.SingleFieldMapping
getBoolean, getByte, getChar, getDefaultLength, getDouble, getFloat, getInt, 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, getReferenceMapping, getRoleForMember, getStoreManager, getTable, getType, getValueForColumnMapping, hashCode, hasSimpleDatastoreRepresentation, includeInFetchStatement, includeInInsertStatement, includeInUpdateStatement, initialize, isNullable, isSerialised, performSetPostProcessing, representableAsStringLiteralInStatement, requiresSetPostProcessing, setAbsFieldNumber, setMemberMetaData, setReferenceMapping, setRoleForMember, setTable
-
-
-
-
Method Detail
-
setObject
public void setObject(org.datanucleus.ExecutionContext ec, PreparedStatement ps, int[] exprIndex, Object value)Method to populate parameter positions in a PreparedStatement with this object- Overrides:
setObjectin classSingleFieldMapping- Parameters:
ec- The ExecutionContextps- The Prepared StatementexprIndex- The parameter positions to populatevalue- The value of the PC to use in populating the parameter positions
-
setObject
public void setObject(org.datanucleus.ExecutionContext ec, PreparedStatement ps, int[] exprIndex, Object value, org.datanucleus.state.DNStateManager ownerSM, int fieldNumber)Method to populate parameter positions in a PreparedStatement with this object- Overrides:
setObjectin classJavaTypeMapping- Parameters:
ec- The ExecutionContextps- The Prepared StatementexprIndex- The parameter positions to populatevalue- The value of the PC to use in populating the parameter positionsownerSM- StateManager for the owning objectfieldNumber- field number of this object in the owning object
-
getObject
public Object getObject(org.datanucleus.ExecutionContext ec, ResultSet resultSet, int[] exprIndex)
Method to extract the value of the persistable from a ResultSet.- Overrides:
getObjectin classSingleFieldMapping- Parameters:
ec- The ExecutionContextresultSet- The ResultSetexprIndex- The parameter positions in the result set to use.- Returns:
- The (deserialised) persistable object
-
getObject
public Object getObject(org.datanucleus.ExecutionContext ec, ResultSet resultSet, int[] exprIndex, org.datanucleus.state.DNStateManager ownerSM, int fieldNumber)
Method to extract the value of the persistable from a ResultSet.- Overrides:
getObjectin classJavaTypeMapping- Parameters:
ec- The ExecutionContextexprIndex- The parameter positions in the result set to use.ownerSM- StateManager for the owning objectresultSet- The ResultSetfieldNumber- Absolute number of field in owner object- Returns:
- The (deserialised) persistable object
-
-