public class InterfacePolicy extends Object implements Serializable, 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 List<ClassDescriptor> |
childDescriptors |
protected ClassDescriptor |
descriptor |
protected Class |
implementorDescriptor |
protected String |
implementorDescriptorClassName |
protected List<ClassDescriptor> |
parentDescriptors |
protected List<String> |
parentInterfaceNames |
protected List<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(Class parentInterface)
PUBLIC:
Add the parent Interface class.
|
void |
addParentInterfaceName(String parentInterfaceName) |
void |
convertClassNamesToClasses(ClassLoader classLoader)
INTERNAL:
Convert all the class-name-based settings in this InheritancePolicy to actual class-based settings.
|
List<ClassDescriptor> |
getChildDescriptors()
INTERNAL:
Return all the child descriptors.
|
protected ClassDescriptor |
getDescriptor() |
Class |
getImplementorDescriptor()
INTERNAL:
Returns the implementor descriptor class.
|
String |
getImplementorDescriptorClassName()
INTERNAL:
Returns the implementor descriptor class name.
|
List<ClassDescriptor> |
getParentDescriptors()
INTERNAL:
Return all the parent descriptors.
|
List<String> |
getParentInterfaceNames() |
List<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 Object |
selectAllObjects(ReadAllQuery query)
INTERNAL:
Select all objects for a concrete descriptor.
|
Object |
selectAllObjectsUsingMultipleTableSubclassRead(ReadAllQuery query)
INTERNAL:
Select all objects for an interface descriptor.
|
protected Object |
selectOneObject(ReadObjectQuery query)
INTERNAL:
Select one object of any concrete subclass.
|
Object |
selectOneObjectUsingMultipleTableSubclassRead(ReadObjectQuery query)
INTERNAL:
Select one object of any concrete subclass.
|
void |
setDescriptor(ClassDescriptor descriptor)
INTERNAL:
Set the descriptor.
|
void |
setImplementorDescriptor(Class implementorDescriptor)
INTERNAL:
Sets the implementor descriptor class.
|
void |
setImplementorDescriptorClassName(String implementorDescriptorClassName)
INTERNAL:
Sets the implementor descriptor class name.
|
void |
setParentInterfaceNames(List<String> parentInterfaceNames) |
void |
setParentInterfaces(List<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 List<ClassDescriptor> parentDescriptors
protected List<ClassDescriptor> childDescriptors
protected ClassDescriptor descriptor
protected Class implementorDescriptor
protected String implementorDescriptorClassName
public InterfacePolicy()
public InterfacePolicy(ClassDescriptor descriptor)
public void addChildDescriptor(ClassDescriptor childDescriptor)
public void addParentDescriptor(ClassDescriptor parentDescriptor)
public void addParentInterface(Class parentInterface)
public void addParentInterfaceName(String parentInterfaceName)
public boolean hasChild()
public List<ClassDescriptor> getChildDescriptors()
protected ClassDescriptor getDescriptor()
public Class getImplementorDescriptor()
public String getImplementorDescriptorClassName()
public List<ClassDescriptor> getParentDescriptors()
public List<Class> getParentInterfaces()
public void convertClassNamesToClasses(ClassLoader classLoader)
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
public boolean isInterfaceChildDescriptor()
public boolean isTablePerClassPolicy()
protected Object selectAllObjects(ReadAllQuery query)
protected ObjectLevelReadQuery prepareQuery(ObjectLevelReadQuery query)
public Object selectAllObjectsUsingMultipleTableSubclassRead(ReadAllQuery query) throws DatabaseException
DatabaseException
protected Object selectOneObject(ReadObjectQuery query) throws DescriptorException
DescriptorException
public Object selectOneObjectUsingMultipleTableSubclassRead(ReadObjectQuery query) throws DatabaseException, QueryException
DatabaseException
QueryException
public void setDescriptor(ClassDescriptor descriptor)
public void setImplementorDescriptor(Class implementorDescriptor)
public void setImplementorDescriptorClassName(String implementorDescriptorClassName)
public void setParentInterfaces(List<Class> parentInterfaces)
public boolean usesImplementorDescriptor()
Copyright © 2007–2020 Eclipse.org - EclipseLink Project. All rights reserved.