Top Description Fields Constructors Methods
org.eclipse.persistence.internal.descriptors

public Class CascadeLockingPolicy

extends Object
Class Inheritance
Imports
java.util.HashMap, .List, .Map, .Iterator, org.eclipse.persistence.descriptors.ClassDescriptor, .InheritancePolicy, org.eclipse.persistence.expressions.Expression, .ExpressionBuilder, org.eclipse.persistence.mappings.DatabaseMapping, org.eclipse.persistence.internal.expressions.SQLSelectStatement, org.eclipse.persistence.internal.helper.DatabaseField, org.eclipse.persistence.queries.ReadObjectQuery, .DataReadQuery, org.eclipse.persistence.sessions.DatabaseRecord, org.eclipse.persistence.internal.sessions.AbstractRecord, .ObjectChangeSet, .UnitOfWorkChangeSet, .UnitOfWorkImpl

INTERNAL:

Field Summary

Modifier and TypeField and Description
protected ClassDescriptor
protected boolean
protected boolean
protected Map<DatabaseField, DatabaseField>
protected Class<?>
protected ClassDescriptor
protected DatabaseMapping
protected ReadObjectQuery
protected Map<DatabaseField, DatabaseField>
protected boolean
protected DataReadQuery
protected Map<DatabaseField, DatabaseField>

Constructor Summary

AccessConstructor and Description
public
CascadeLockingPolicy(ClassDescriptor parentDescriptor, ClassDescriptor descriptor)

INTERNAL:

Method Summary

Modifier and TypeMethod and Description
protected AbstractRecord
getMappedTranslationRow(Object changedObj, UnitOfWorkImpl uow)

INTERNAL:

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.

protected DatabaseMapping
getParentMapping()

INTERNAL:

protected ReadObjectQuery
getQuery()

INTERNAL:

protected AbstractRecord
public void
initUnmappedFields(UnitOfWorkImpl uow)

INTERNAL: Identify mapped and not mapped fields (should be done once).

public void
initUnmappedFieldsQuery(UnitOfWorkImpl uow)

INTERNAL: This method called in case there are m_unmappedQueryKeyFields.

public void
public void
setQueryKeyFields(Map<DatabaseField, DatabaseField> queryKeyFields)

INTERNAL:

public void
setQueryKeyFields(Map<DatabaseField, DatabaseField> queryKeyFields, boolean lookForParentMapping)

INTERNAL:

public void
setShouldHandleUnmappedFields(boolean shouldHandleUnmappedFields)

INTERNAL: Indicates whether to expect unmapped fields.

public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

m_descriptorback to summary
protected ClassDescriptor m_descriptor
m_hasCheckedForUnmappedFieldsback to summary
protected boolean m_hasCheckedForUnmappedFields
m_lookForParentMappingback to summary
protected boolean m_lookForParentMapping
m_mappedQueryKeyFieldsback to summary
protected Map<DatabaseField, DatabaseField> m_mappedQueryKeyFields
m_parentClassback to summary
protected Class<?> m_parentClass
m_parentDescriptorback to summary
protected ClassDescriptor m_parentDescriptor
m_parentMappingback to summary
protected DatabaseMapping m_parentMapping
m_queryback to summary
protected ReadObjectQuery m_query
m_queryKeyFieldsback to summary
protected Map<DatabaseField, DatabaseField> m_queryKeyFields
m_shouldHandleUnmappedFieldsback to summary
protected boolean m_shouldHandleUnmappedFields
m_unmappedFieldsQueryback to summary
protected DataReadQuery m_unmappedFieldsQuery
m_unmappedQueryKeyFieldsback to summary
protected Map<DatabaseField, DatabaseField> m_unmappedQueryKeyFields

Constructor Detail

CascadeLockingPolicyback to summary
public CascadeLockingPolicy(ClassDescriptor parentDescriptor, ClassDescriptor descriptor)

INTERNAL:

Method Detail

getMappedTranslationRowback to summary
protected AbstractRecord getMappedTranslationRow(Object changedObj, UnitOfWorkImpl uow)

INTERNAL:

getParentDescriptorFromInheritancePolicyback to summary
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

getParentMappingback to summary
protected DatabaseMapping getParentMapping()

INTERNAL:

getQueryback to summary
protected ReadObjectQuery getQuery()

INTERNAL:

getUnmappedTranslationRowback to summary
protected AbstractRecord getUnmappedTranslationRow(Object changedObj, UnitOfWorkImpl uow)

INTERNAL:

initUnmappedFieldsback to summary
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.

initUnmappedFieldsQueryback to summary
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.

lockNotifyParentback to summary
public void lockNotifyParent(Object obj, UnitOfWorkChangeSet changeSet, UnitOfWorkImpl uow)

INTERNAL:

setQueryKeyFieldsback to summary
public void setQueryKeyFields(Map<DatabaseField, DatabaseField> queryKeyFields)

INTERNAL:

setQueryKeyFieldsback to summary
public void setQueryKeyFields(Map<DatabaseField, DatabaseField> queryKeyFields, boolean lookForParentMapping)

INTERNAL:

setShouldHandleUnmappedFieldsback to summary
public void setShouldHandleUnmappedFields(boolean shouldHandleUnmappedFields)

INTERNAL: Indicates whether to expect unmapped fields. That should be set to true for UnidirectionalOneToManyMapping.

shouldHandleUnmappedFieldsback to summary
public boolean shouldHandleUnmappedFields()

INTERNAL: