public class TablePerClassPolicy extends InterfacePolicy implements java.io.Serializable, java.lang.Cloneable
Purpose: Provides the functionality to support a TABLE_PER_CLASS inheritance strategy. Resolves relational mappings and querying.
Modifier and Type | Field and Description |
---|---|
protected java.util.HashMap<DatabaseMapping,DatabaseQuery> |
selectionQueriesForAllObjects
Selection queries from read all mappings will be cached and re-used.
|
childDescriptors, descriptor, implementorDescriptor, implementorDescriptorClassName, parentDescriptors, parentInterfaceNames, parentInterfaces
Constructor and Description |
---|
TablePerClassPolicy(ClassDescriptor descriptor)
INTERNAL:
Create a new policy.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addSelectionQuery(ForeignReferenceMapping cloneMapping,
ForeignReferenceMapping sourceMapping,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
|
boolean |
isTablePerClassPolicy()
INTERNAL:
|
void |
prepareChildrenSelectionQuery(DatabaseMapping sourceMapping,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
This method is called from individual mappings during their
initialization.
|
protected void |
prepareManyToManySelectionQuery(ManyToManyMapping sourceMapping,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
|
protected void |
prepareOneToManySelectionQuery(OneToManyMapping sourceMapping,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
|
protected void |
prepareOneToOneSelectionQuery(OneToOneMapping sourceMapping,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
|
protected void |
prepareSelectionQuery(DatabaseMapping sourceMapping,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
The selection queries are created by cloning the source mapping,
updating the necessary database fields on the mapping and then
initializing the mapping to create the internal selection query.
|
protected java.lang.Object |
selectAllObjects(ReadAllQuery query)
INTERNAL:
Select all objects for a concrete descriptor.
|
protected java.lang.Object |
selectOneObject(ReadObjectQuery query)
INTERNAL:
Select one object of any concrete subclass.
|
addChildDescriptor, addParentDescriptor, addParentInterface, addParentInterfaceName, convertClassNamesToClasses, getChildDescriptors, getDescriptor, getImplementorDescriptor, getImplementorDescriptorClassName, getParentDescriptors, getParentInterfaceNames, getParentInterfaces, hasChild, initialize, isInterfaceChildDescriptor, selectAllObjectsUsingMultipleTableSubclassRead, selectOneObjectUsingMultipleTableSubclassRead, setDescriptor, setImplementorDescriptor, setImplementorDescriptorClassName, setParentInterfaceNames, setParentInterfaces, usesImplementorDescriptor
protected java.util.HashMap<DatabaseMapping,DatabaseQuery> selectionQueriesForAllObjects
public TablePerClassPolicy(ClassDescriptor descriptor)
protected void addSelectionQuery(ForeignReferenceMapping cloneMapping, ForeignReferenceMapping sourceMapping, org.eclipse.persistence.internal.sessions.AbstractSession session)
public boolean isTablePerClassPolicy()
isTablePerClassPolicy
in class InterfacePolicy
public void prepareChildrenSelectionQuery(DatabaseMapping sourceMapping, org.eclipse.persistence.internal.sessions.AbstractSession session)
protected void prepareManyToManySelectionQuery(ManyToManyMapping sourceMapping, org.eclipse.persistence.internal.sessions.AbstractSession session)
protected void prepareOneToManySelectionQuery(OneToManyMapping sourceMapping, org.eclipse.persistence.internal.sessions.AbstractSession session)
protected void prepareOneToOneSelectionQuery(OneToOneMapping sourceMapping, org.eclipse.persistence.internal.sessions.AbstractSession session)
protected void prepareSelectionQuery(DatabaseMapping sourceMapping, org.eclipse.persistence.internal.sessions.AbstractSession session)
protected java.lang.Object selectAllObjects(ReadAllQuery query)
selectAllObjects
in class InterfacePolicy
protected java.lang.Object selectOneObject(ReadObjectQuery query) throws DescriptorException
selectOneObject
in class InterfacePolicy
DescriptorException