public class InterfacePolicy
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
a. Interface descriptors can be used to query across a set of classes that do not share a table.
b. As a target of a variable one to one mapping.
Modifier and Type | Field and Description |
---|---|
protected java.util.List<ClassDescriptor> |
childDescriptors |
protected ClassDescriptor |
descriptor |
protected java.lang.Class |
implementorDescriptor |
protected java.lang.String |
implementorDescriptorClassName |
protected java.util.List<ClassDescriptor> |
parentDescriptors |
protected java.util.List<java.lang.String> |
parentInterfaceNames |
protected java.util.List<java.lang.Class> |
parentInterfaces |
Constructor and Description |
---|
InterfacePolicy()
INTERNAL:
Create a new policy.
|
InterfacePolicy(ClassDescriptor descriptor)
INTERNAL:
Create a new policy.
|
Modifier and Type | Method and Description |
---|---|
void |
addChildDescriptor(ClassDescriptor childDescriptor)
INTERNAL:
Add child descriptor to the parent descriptor.
|
void |
addParentDescriptor(ClassDescriptor parentDescriptor)
INTERNAL:
Add parent descriptor.
|
void |
addParentInterface(java.lang.Class parentInterface)
PUBLIC:
Add the parent Interface class.
|
void |
addParentInterfaceName(java.lang.String parentInterfaceName) |
void |
convertClassNamesToClasses(java.lang.ClassLoader classLoader)
INTERNAL:
Convert all the class-name-based settings in this InheritancePolicy to actual class-based settings.
|
java.util.List<ClassDescriptor> |
getChildDescriptors()
INTERNAL:
Return all the child descriptors.
|
protected ClassDescriptor |
getDescriptor() |
java.lang.Class |
getImplementorDescriptor()
INTERNAL:
Returns the implementor descriptor class.
|
java.lang.String |
getImplementorDescriptorClassName()
INTERNAL:
Returns the implementor descriptor class name.
|
java.util.List<ClassDescriptor> |
getParentDescriptors()
INTERNAL:
Return all the parent descriptors.
|
java.util.List<java.lang.String> |
getParentInterfaceNames() |
java.util.List<java.lang.Class> |
getParentInterfaces()
INTERNAL:
Return the list of parent interfaces.
|
boolean |
hasChild()
INTERNAL:
Return if there are any child descriptors.
|
void |
initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Set the vector to store parent interfaces.
|
boolean |
isInterfaceChildDescriptor()
INTERNAL:
Check if it is a child descriptor.
|
boolean |
isTablePerClassPolicy()
INTERNAL:
|
protected ObjectLevelReadQuery |
prepareQuery(ObjectLevelReadQuery query)
INTERNAL:
Select all objects for a concrete descriptor.
|
protected java.lang.Object |
selectAllObjects(ReadAllQuery query)
INTERNAL:
Select all objects for a concrete descriptor.
|
java.lang.Object |
selectAllObjectsUsingMultipleTableSubclassRead(ReadAllQuery query)
INTERNAL:
Select all objects for an interface descriptor.
|
protected java.lang.Object |
selectOneObject(ReadObjectQuery query)
INTERNAL:
Select one object of any concrete subclass.
|
java.lang.Object |
selectOneObjectUsingMultipleTableSubclassRead(ReadObjectQuery query)
INTERNAL:
Select one object of any concrete subclass.
|
void |
setDescriptor(ClassDescriptor descriptor)
INTERNAL:
Set the descriptor.
|
void |
setImplementorDescriptor(java.lang.Class implementorDescriptor)
INTERNAL:
Sets the implementor descriptor class.
|
void |
setImplementorDescriptorClassName(java.lang.String implementorDescriptorClassName)
INTERNAL:
Sets the implementor descriptor class name.
|
void |
setParentInterfaceNames(java.util.List<java.lang.String> parentInterfaceNames) |
void |
setParentInterfaces(java.util.List<java.lang.Class> parentInterfaces)
Set the Vector to store parent interfaces.
|
boolean |
usesImplementorDescriptor()
INTERNAL:
Returns true if this descriptor should be ignored and the implementing
descriptor should be used instead.
|
protected java.util.List<java.lang.Class> parentInterfaces
protected java.util.List<java.lang.String> parentInterfaceNames
protected java.util.List<ClassDescriptor> parentDescriptors
protected java.util.List<ClassDescriptor> childDescriptors
protected ClassDescriptor descriptor
protected java.lang.Class implementorDescriptor
protected java.lang.String implementorDescriptorClassName
public InterfacePolicy()
public InterfacePolicy(ClassDescriptor descriptor)
public void addChildDescriptor(ClassDescriptor childDescriptor)
public void addParentDescriptor(ClassDescriptor parentDescriptor)
public void addParentInterface(java.lang.Class parentInterface)
public void addParentInterfaceName(java.lang.String parentInterfaceName)
public boolean hasChild()
public java.util.List<ClassDescriptor> getChildDescriptors()
protected ClassDescriptor getDescriptor()
public java.lang.Class getImplementorDescriptor()
public java.lang.String getImplementorDescriptorClassName()
public java.util.List<ClassDescriptor> getParentDescriptors()
public java.util.List<java.lang.Class> getParentInterfaces()
public java.util.List<java.lang.String> getParentInterfaceNames()
public void convertClassNamesToClasses(java.lang.ClassLoader classLoader)
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
public boolean isInterfaceChildDescriptor()
public boolean isTablePerClassPolicy()
protected java.lang.Object selectAllObjects(ReadAllQuery query)
protected ObjectLevelReadQuery prepareQuery(ObjectLevelReadQuery query)
public java.lang.Object selectAllObjectsUsingMultipleTableSubclassRead(ReadAllQuery query) throws DatabaseException
DatabaseException
protected java.lang.Object selectOneObject(ReadObjectQuery query) throws DescriptorException
DescriptorException
public java.lang.Object selectOneObjectUsingMultipleTableSubclassRead(ReadObjectQuery query) throws DatabaseException, QueryException
DatabaseException
QueryException
public void setDescriptor(ClassDescriptor descriptor)
public void setImplementorDescriptor(java.lang.Class implementorDescriptor)
public void setImplementorDescriptorClassName(java.lang.String implementorDescriptorClassName)
public void setParentInterfaces(java.util.List<java.lang.Class> parentInterfaces)
public void setParentInterfaceNames(java.util.List<java.lang.String> parentInterfaceNames)
public boolean usesImplementorDescriptor()