Module org.eclipse.persistence.core
Class SerializedObjectPolicyWrapper
java.lang.Object
org.eclipse.persistence.internal.descriptors.AbstractSerializedObjectPolicy
org.eclipse.persistence.internal.descriptors.SerializedObjectPolicyWrapper
- All Implemented Interfaces:
Serializable,Cloneable,SerializedObjectPolicy
It's a transition class that holds SerializedObjectPolicy class name
and field obtained from matadata before it can be instantiated.
- Since:
- EclipseLink 2.5.1
- See Also:
-
Field Summary
FieldsFields inherited from class org.eclipse.persistence.internal.descriptors.AbstractSerializedObjectPolicy
descriptor, field -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Lists the database fields that should be read by the query using the policy, in case all inherited objects are read using outer joining.getObjectFromRow(AbstractRecord databaseRow, AbstractSession session, ObjectLevelReadQuery query) Deserialize the object from the value corresponding to the policy field, nullify that value, set the object into the row using setSopObject, also return it.Lists the database fields that should be read by the query using the policy.voidinitialize(AbstractSession session) initialize the policyvoidinitializeField(AbstractSession session) unless the field is already initialized by parent descriptor, add the field to the owning descriptor and set field's typeinstantiate policy for child descriptorvoidpostInitialize(AbstractSession session) postinitialize the policy: determine which mappings are included, which fields should be selectedvoidputObjectIntoRow(AbstractRecord databaseRow, Object object, AbstractSession session) Serialize the object and put the result into the row as a value corresponding to the policy fieldMethods inherited from class org.eclipse.persistence.internal.descriptors.AbstractSerializedObjectPolicy
getDescriptor, getField, setDescriptor, setField
-
Field Details
-
serializedObjectPolicyClassName
-
-
Constructor Details
-
SerializedObjectPolicyWrapper
-
-
Method Details
-
getSerializedObjectPolicyClassName
-
clone
- Specified by:
clonein interfaceSerializedObjectPolicy- Overrides:
clonein classAbstractSerializedObjectPolicy
-
instantiateChild
Description copied from interface:SerializedObjectPolicyinstantiate policy for child descriptor -
initializeField
Description copied from interface:SerializedObjectPolicyunless the field is already initialized by parent descriptor, add the field to the owning descriptor and set field's type- Specified by:
initializeFieldin interfaceSerializedObjectPolicy- Overrides:
initializeFieldin classAbstractSerializedObjectPolicy
-
initialize
Description copied from interface:SerializedObjectPolicyinitialize the policy -
postInitialize
Description copied from interface:SerializedObjectPolicypostinitialize the policy: determine which mappings are included, which fields should be selected -
putObjectIntoRow
Description copied from interface:SerializedObjectPolicySerialize the object and put the result into the row as a value corresponding to the policy field -
getObjectFromRow
public Object getObjectFromRow(AbstractRecord databaseRow, AbstractSession session, ObjectLevelReadQuery query) Description copied from interface:SerializedObjectPolicyDeserialize the object from the value corresponding to the policy field, nullify that value, set the object into the row using setSopObject, also return it. If the object is null or invalid, behaviour depend on whether the policy allows the query to recover or not (see comments to getFieldsToSelect and getAllFieldsToSelect methods): if recovery is possible then the method should return null, otherwise throw QueryException (query is a parameter of this method only because it's required by QueryException). -
getSelectionFields
Description copied from interface:SerializedObjectPolicyLists the database fields that should be read by the query using the policy. To allow recovery in case of null or invalid sopObject, then this method should return all the fields define by descriptor (descriptor.getFields()). -
getAllSelectionFields
Description copied from interface:SerializedObjectPolicyLists the database fields that should be read by the query using the policy, in case all inherited objects are read using outer joining. To allow recovery in case of null or invalid sopObject, then this method should return all the fields define by descriptor (descriptor.getAllFields()).
-