org.eclipse.persistence.descriptors
Class TablePerClassPolicy

java.lang.Object
  extended by org.eclipse.persistence.descriptors.InterfacePolicy
      extended by org.eclipse.persistence.descriptors.TablePerClassPolicy
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

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.

See Also:
Serialized Form

Constructor Summary
TablePerClassPolicy(ClassDescriptor descriptor)
          INTERNAL: Create a new policy.
 
Method Summary
 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.
 
Methods inherited from class org.eclipse.persistence.descriptors.InterfacePolicy
addChildDescriptor, addParentDescriptor, addParentInterface, addParentInterfaceName, convertClassNamesToClasses, getChildDescriptors, getImplementorDescriptor, getImplementorDescriptorClassName, getParentDescriptors, getParentInterfaceNames, getParentInterfaces, initialize, isInterfaceChildDescriptor, selectAllObjectsUsingMultipleTableSubclassRead, selectOneObjectUsingMultipleTableSubclassRead, setDescriptor, setImplementorDescriptor, setImplementorDescriptorClassName, setParentInterfaceNames, setParentInterfaces, usesImplementorDescriptor
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TablePerClassPolicy

public TablePerClassPolicy(ClassDescriptor descriptor)
INTERNAL: Create a new policy. Only descriptors involved in inheritance should have a policy.

Method Detail

isTablePerClassPolicy

public boolean isTablePerClassPolicy()
INTERNAL:

Overrides:
isTablePerClassPolicy in class InterfacePolicy

prepareChildrenSelectionQuery

public void prepareChildrenSelectionQuery(DatabaseMapping sourceMapping,
                                          org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: This method is called from individual mappings during their initialization. If the mapping is to a class within a TABLE_PER_CLASS inheritance hierarchy, what this method will do is prepare a selection query to execute for every child descriptor in the hierarchy. 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. This query is then cached where needed using the source mapping's selection query name as the key.

See Also:
selectAllObjects(ReadAllQuery), selectOneObject(ReadObjectQuery)