Module org.eclipse.persistence.core
Class CascadeLockingPolicy
- java.lang.Object
-
- org.eclipse.persistence.internal.descriptors.CascadeLockingPolicy
-
public class CascadeLockingPolicy extends Object
INTERNAL:
-
-
Field Summary
Fields Modifier and Type Field Description protected ClassDescriptorm_descriptorprotected booleanm_hasCheckedForUnmappedFieldsprotected booleanm_lookForParentMappingprotected Map<DatabaseField,DatabaseField>m_mappedQueryKeyFieldsprotected Class<?>m_parentClassprotected ClassDescriptorm_parentDescriptorprotected DatabaseMappingm_parentMappingprotected ReadObjectQuerym_queryprotected Map<DatabaseField,DatabaseField>m_queryKeyFieldsprotected booleanm_shouldHandleUnmappedFieldsprotected DataReadQuerym_unmappedFieldsQueryprotected Map<DatabaseField,DatabaseField>m_unmappedQueryKeyFields
-
Constructor Summary
Constructors Constructor Description CascadeLockingPolicy(ClassDescriptor parentDescriptor, ClassDescriptor descriptor)INTERNAL:
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AbstractRecordgetMappedTranslationRow(Object changedObj, UnitOfWorkImpl uow)INTERNAL:protected ClassDescriptorgetParentDescriptorFromInheritancePolicy(Object parentObj)Get the descriptor that really represents this object In the case of inheritance, the object may represent a subclass of class the descriptor represents.protected DatabaseMappinggetParentMapping()INTERNAL:protected ReadObjectQuerygetQuery()INTERNAL:protected AbstractRecordgetUnmappedTranslationRow(Object changedObj, UnitOfWorkImpl uow)INTERNAL:voidinitUnmappedFields(UnitOfWorkImpl uow)INTERNAL: Identify mapped and not mapped fields (should be done once).voidinitUnmappedFieldsQuery(UnitOfWorkImpl uow)INTERNAL: This method called in case there are m_unmappedQueryKeyFields.voidlockNotifyParent(Object obj, UnitOfWorkChangeSet changeSet, UnitOfWorkImpl uow)INTERNAL:voidsetQueryKeyFields(Map<DatabaseField,DatabaseField> queryKeyFields)INTERNAL:voidsetQueryKeyFields(Map<DatabaseField,DatabaseField> queryKeyFields, boolean lookForParentMapping)INTERNAL:voidsetShouldHandleUnmappedFields(boolean shouldHandleUnmappedFields)INTERNAL: Indicates whether to expect unmapped fields.booleanshouldHandleUnmappedFields()INTERNAL:
-
-
-
Field Detail
-
m_parentClass
protected Class<?> m_parentClass
-
m_query
protected ReadObjectQuery m_query
-
m_descriptor
protected ClassDescriptor m_descriptor
-
m_parentDescriptor
protected ClassDescriptor m_parentDescriptor
-
m_queryKeyFields
protected Map<DatabaseField,DatabaseField> m_queryKeyFields
-
m_mappedQueryKeyFields
protected Map<DatabaseField,DatabaseField> m_mappedQueryKeyFields
-
m_unmappedQueryKeyFields
protected Map<DatabaseField,DatabaseField> m_unmappedQueryKeyFields
-
m_parentMapping
protected DatabaseMapping m_parentMapping
-
m_lookForParentMapping
protected boolean m_lookForParentMapping
-
m_shouldHandleUnmappedFields
protected boolean m_shouldHandleUnmappedFields
-
m_hasCheckedForUnmappedFields
protected boolean m_hasCheckedForUnmappedFields
-
m_unmappedFieldsQuery
protected DataReadQuery m_unmappedFieldsQuery
-
-
Constructor Detail
-
CascadeLockingPolicy
public CascadeLockingPolicy(ClassDescriptor parentDescriptor, ClassDescriptor descriptor)
INTERNAL:
-
-
Method Detail
-
getQuery
protected ReadObjectQuery getQuery()
INTERNAL:
-
getParentMapping
protected DatabaseMapping getParentMapping()
INTERNAL:
-
getParentDescriptorFromInheritancePolicy
protected ClassDescriptor getParentDescriptorFromInheritancePolicy(Object parentObj)
Get the descriptor that really represents this object In the case of inheritance, the object may represent a subclass of class the descriptor represents. If there is no InheritancePolicy, we return our parentDescriptor If there is inheritance we will search for a descriptor that represents parentObj and return that descriptor
-
getMappedTranslationRow
protected AbstractRecord getMappedTranslationRow(Object changedObj, UnitOfWorkImpl uow)
INTERNAL:
-
getUnmappedTranslationRow
protected AbstractRecord getUnmappedTranslationRow(Object changedObj, UnitOfWorkImpl uow)
INTERNAL:
-
initUnmappedFields
public void initUnmappedFields(UnitOfWorkImpl uow)
INTERNAL: Identify mapped and not mapped fields (should be done once). The result - either two non-empty Maps m_unmappedQueryKeyFields and m_mappedQueryKeyFields, or m_unmappedQueryKeyFields == null and m_mappedQueryKeyFields == m_queryKeyFields.
-
initUnmappedFieldsQuery
public void initUnmappedFieldsQuery(UnitOfWorkImpl uow)
INTERNAL: This method called in case there are m_unmappedQueryKeyFields. It creates a query that would fetch the values for this fields from the db.
-
lockNotifyParent
public void lockNotifyParent(Object obj, UnitOfWorkChangeSet changeSet, UnitOfWorkImpl uow)
INTERNAL:
-
setQueryKeyFields
public void setQueryKeyFields(Map<DatabaseField,DatabaseField> queryKeyFields)
INTERNAL:
-
setQueryKeyFields
public void setQueryKeyFields(Map<DatabaseField,DatabaseField> queryKeyFields, boolean lookForParentMapping)
INTERNAL:
-
setShouldHandleUnmappedFields
public void setShouldHandleUnmappedFields(boolean shouldHandleUnmappedFields)
INTERNAL: Indicates whether to expect unmapped fields. That should be set to true for UnidirectionalOneToManyMapping.
-
shouldHandleUnmappedFields
public boolean shouldHandleUnmappedFields()
INTERNAL:
-
-