org.datanucleus.store.mapped.mapping
Class SerialisedReferenceMapping
java.lang.Object
org.datanucleus.store.mapped.mapping.JavaTypeMapping
org.datanucleus.store.mapped.mapping.SingleFieldMapping
org.datanucleus.store.mapped.mapping.SerialisedMapping
org.datanucleus.store.mapped.mapping.SerialisedReferenceMapping
public class SerialisedReferenceMapping
- extends SerialisedMapping
Mapping for a serialised reference (Interface/Object) field.
Extends SerialisedMapping since that provides the basic serialisation mechanism,
adding on the addition of StateManagers to the serialised object whenever it is required
(since the object is a PersistenceCapable).
|
Method Summary |
Object |
getObject(ExecutionContext ec,
Object resultSet,
int[] exprIndex)
Method to extract the value of the PersistenceCapable from a ResultSet. |
Object |
getObject(ExecutionContext ec,
Object resultSet,
int[] exprIndex,
ObjectProvider ownerSM,
int fieldNumber)
Method to extract the value of the PersistenceCapable from a ResultSet. |
void |
setObject(ExecutionContext ec,
Object preparedStatement,
int[] exprIndex,
Object value)
Method to populate parameter positions in a PreparedStatement with this object |
void |
setObject(ExecutionContext ec,
Object preparedStatement,
int[] exprIndex,
Object value,
ObjectProvider ownerSM,
int fieldNumber)
Method to populate parameter positions in a PreparedStatement with this object |
| Methods inherited from class org.datanucleus.store.mapped.mapping.SingleFieldMapping |
equals, getBoolean, getByte, getChar, getDefaultLength, getDouble, getFloat, getInt, getLong, getShort, getString, getValidValues, initialize, prepareDatastoreMapping, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setShort, setString |
| Methods inherited from class org.datanucleus.store.mapped.mapping.JavaTypeMapping |
addDatastoreMapping, failureMessage, getAbsoluteFieldNumber, getColumnMetaDataForMember, getDatastoreContainer, getDatastoreMapping, getDatastoreMappings, getMemberMetaData, getNumberOfDatastoreMappings, getReferenceMapping, getRoleForMember, getStoreManager, getType, getValueForDatastoreMapping, hashCode, hasSimpleDatastoreRepresentation, includeInFetchStatement, includeInInsertStatement, includeInUpdateStatement, initialize, isNullable, isSerialised, representableAsStringLiteralInStatement, setAbsFieldNumber, setDatastoreContainer, setMemberMetaData, setReferenceMapping, setRoleForMember |
SerialisedReferenceMapping
public SerialisedReferenceMapping()
setObject
public void setObject(ExecutionContext ec,
Object preparedStatement,
int[] exprIndex,
Object value)
- Method to populate parameter positions in a PreparedStatement with this object
- Overrides:
setObject in class SingleFieldMapping
- Parameters:
ec - execution contextpreparedStatement - The Prepared StatementexprIndex - The parameter positions to populatevalue - The value of the PC to use in populating the parameter positions
setObject
public void setObject(ExecutionContext ec,
Object preparedStatement,
int[] exprIndex,
Object value,
ObjectProvider ownerSM,
int fieldNumber)
- Method to populate parameter positions in a PreparedStatement with this object
- Overrides:
setObject in class JavaTypeMapping
- Parameters:
ec - execution contextpreparedStatement - The Prepared StatementexprIndex - The parameter positions to populatevalue - The value of the PC to use in populating the parameter positionsownerSM - ObjectProvider for the owning objectfieldNumber - field number of this object in the owning object
getObject
public Object getObject(ExecutionContext ec,
Object resultSet,
int[] exprIndex)
- Method to extract the value of the PersistenceCapable from a ResultSet.
- Overrides:
getObject in class SingleFieldMapping
- Parameters:
ec - execution contextresultSet - The ResultSetexprIndex - The parameter positions in the result set to use.
- Returns:
- The (deserialised) PersistenceCapable object
getObject
public Object getObject(ExecutionContext ec,
Object resultSet,
int[] exprIndex,
ObjectProvider ownerSM,
int fieldNumber)
- Method to extract the value of the PersistenceCapable from a ResultSet.
- Overrides:
getObject in class JavaTypeMapping
- Parameters:
ec - execution contextresultSet - The ResultSetexprIndex - The parameter positions in the result set to use.ownerSM - The owning objectfieldNumber - Absolute number of field in owner object
- Returns:
- The (deserialised) PersistenceCapable object
Copyright © 2012. All Rights Reserved.