org.datanucleus.store.mapped.mapping
Class SerialisedPCMapping
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.SerialisedPCMapping
- Direct Known Subclasses:
- SerialisedElementPCMapping, SerialisedKeyPCMapping, SerialisedValuePCMapping
public class SerialisedPCMapping
- extends SerialisedMapping
Mapping for a serialised PersistenceCapable object.
Extends ObjectMapping since that provides the basic serialisation mechanism,
adding on the addition of StateManagers to the serialised object whenever it is required.
|
Method Summary |
java.lang.Object |
getObject(ExecutionContext ec,
java.lang.Object resultSet,
int[] exprIndex)
Method to extract the value of the PersistenceCapable from a ResultSet. |
java.lang.Object |
getObject(ExecutionContext ec,
java.lang.Object resultSet,
int[] exprIndex,
ObjectProvider ownerSM,
int fieldNumber)
Method to extract the value of the PersistenceCapable from a ResultSet. |
void |
setObject(ExecutionContext ec,
java.lang.Object preparedStatement,
int[] exprIndex,
java.lang.Object value)
Method to populate parameter positions in a PreparedStatement with this object |
void |
setObject(ExecutionContext ec,
java.lang.Object preparedStatement,
int[] exprIndex,
java.lang.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, getColumnMetaDataForMember, getDatastoreContainer, getDatastoreMapping, getDatastoreMappings, getMemberMetaData, getNumberOfDatastoreMappings, getReferenceMapping, getRoleForMember, getType, getValueForDatastoreMapping, hashCode, hasSimpleDatastoreRepresentation, includeInFetchStatement, includeInInsertStatement, includeInUpdateStatement, initialize, isNullable, isSerialised, setDatastoreContainer, setMemberMetaData, setReferenceMapping, setRoleForMember |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
SerialisedPCMapping
public SerialisedPCMapping()
setObject
public void setObject(ExecutionContext ec,
java.lang.Object preparedStatement,
int[] exprIndex,
java.lang.Object value)
- Method to populate parameter positions in a PreparedStatement with this object
- Overrides:
setObject in class SingleFieldMapping
- Parameters:
ec - The Object ManagerpreparedStatement - 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,
java.lang.Object preparedStatement,
int[] exprIndex,
java.lang.Object value,
ObjectProvider ownerSM,
int fieldNumber)
- Method to populate parameter positions in a PreparedStatement with this object
- Overrides:
setObject in class JavaTypeMapping
- Parameters:
ec - The Object ManagerpreparedStatement - The Prepared StatementexprIndex - The parameter positions to populatevalue - The value of the PC to use in populating the parameter positionsownerSM - State Manager for the owning objectfieldNumber - field number of this object in the owning object
getObject
public java.lang.Object getObject(ExecutionContext ec,
java.lang.Object resultSet,
int[] exprIndex)
- Method to extract the value of the PersistenceCapable from a ResultSet.
- Overrides:
getObject in class SingleFieldMapping
- Parameters:
ec - The ObjectManagerresultSet - The ResultSetexprIndex - The parameter positions in the result set to use.
- Returns:
- The (deserialised) PersistenceCapable object
getObject
public java.lang.Object getObject(ExecutionContext ec,
java.lang.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 - The ObjectManagerresultSet - 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 © 2011. All Rights Reserved.