public abstract class ORMetadata extends Object
| Modifier and Type | Field and Description |
|---|---|
protected MetadataProject |
m_project |
| Modifier | Constructor and Description |
|---|---|
protected |
ORMetadata()
INTERNAL:
Used for defaulting case.
|
protected |
ORMetadata(MetadataAccessibleObject accessibleObject,
MetadataProject project,
Object location)
INTERNAL:
Used for defaulting.
|
|
ORMetadata(MetadataAnnotation annotation,
MetadataAccessibleObject accessibleObject,
MetadataProject project)
INTERNAL:
Used for annotation loading of class and mapping accessors.
|
|
ORMetadata(MetadataAnnotation annotation,
MetadataAccessor accessor)
INTERNAL:
Used for annotation loading of metadata objects.
|
|
ORMetadata(ORMetadata orm)
INTERNAL:
Used for annotation loading and switching from one metadata object to
a more specific one.
|
|
ORMetadata(String xmlElement)
INTERNAL:
Used for OX loading.
|
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
equals(Object objectToCompare)
INTERNAL:
For merging and overriding to work properly, all ORMetadata must be able
to compare themselves for metadata equality.
|
protected MetadataAccessibleObject |
getAccessibleObject()
INTERNAL:
Returns the accessible object for this accessor.
|
String |
getAccessibleObjectName()
INTERNAL:
Returns the name of the accessible object.
|
MetadataAnnotation |
getAnnotation()
INTERNAL:
This is a value is that is used when logging messages for overriding.
|
protected String |
getBoxedType(String type)
INTERNAL:
Quick lookup of a primitive boxed type.
|
protected DatabaseType |
getDatabaseTypeEnum(String type)
Return the DataType enum constant for the String type name.
|
XMLEntityMappings |
getEntityMappings()
INTERNAL:
|
protected String |
getFullyQualifiedClassName(String className)
INTERNAL:
Return the fully qualified className using the package (if any) setting
from XML.
|
protected String |
getIdentifier()
INTERNAL:
Sub classes that can uniquely be identified must override this method to
allow the overriding and merging to uniquely identify objects.
|
protected Class |
getJavaClass(MetadataClass metadataClass)
INTERNAL:
Return the Java class for the metadata class using the metadata loader.
|
String |
getJavaClassName(MetadataClass metadataClass)
INTERNAL:
Return the Java class name for the metadata class.
|
ClassLoader |
getLoader()
INTERNAL:
This method will return the current loader from the metadata factory used
to created this ORMetadata.
|
Object |
getLocation()
INTERNAL:
|
MetadataLogger |
getLogger()
INTERNAL:
Return the metadata logger.
|
MetadataClass |
getMetadataClass(Class javaClass)
INTERNAL:
Return the MetadataClass for the class.
|
MetadataClass |
getMetadataClass(String className)
INTERNAL:
Return the MetadataClass for the class name.
|
MetadataClass |
getMetadataClass(String className,
boolean isLazy)
INTERNAL:
Return the MetadataClass for the class name.
|
MetadataFactory |
getMetadataFactory()
INTERNAL:
|
protected String |
getName(String name,
String defaultName,
String context)
INTERNAL:
Helper method to return a field name from a candidate field name and a
default field name.
|
protected Class |
getPrimitiveClassForName(String className)
INTERNAL:
|
MetadataProject |
getProject()
INTERNAL:
Return the MetadataProject.
|
protected String |
getText()
INTERNAL:
Any ORMetadata that supported mixed types, that is, text or other
metadata should override this method.
|
protected String |
getXMLElement()
INTERNAL:
This is a value is that is used when logging messages for overriding.
|
protected boolean |
hasIdentifier()
INTERNAL:
|
protected boolean |
hasText()
INTERNAL:
Any ORMetadata that supported mixed types, that is, text or other
metadata should override this method.
|
protected MetadataClass |
initXMLClassName(String className)
INTERNAL:
This method should only be called on those objects that were loaded
from XML and that need to initialize a class name.
|
void |
initXMLObject(MetadataAccessibleObject accessibleObject,
XMLEntityMappings entityMappings)
INTERNAL:
Any subclass that cares to do any more initialization (e.g.
|
protected void |
initXMLObject(ORMetadata metadata,
MetadataAccessibleObject accessibleObject)
INTERNAL:
|
protected void |
initXMLObjects(List metadatas,
MetadataAccessibleObject accessibleObject)
INTERNAL:
It is assumed this is a list of ORMetadata
|
protected String |
initXMLTextObject(List metadatas)
INTERNAL:
This is to support legacy orm instance docs.
|
boolean |
loadedFromAnnotation()
INTERNAL:
Note: That annotations can default so the annotation may be null.
|
boolean |
loadedFromEclipseLinkXML()
INTERNAL:
|
boolean |
loadedFromXML()
INTERNAL:
|
protected void |
merge(ORMetadata metadata)
INTERNAL:
Subclasses that care to handle deeper merges should extend this method.
|
protected List |
mergeORObjectLists(List list1,
List list2)
INTERNAL:
Convenience method to merge two lists of metadata objects.
|
protected ORMetadata |
mergeORObjects(ORMetadata obj1,
ORMetadata obj2)
INTERNAL:
Convenience method to merge two objects that were loaded from XML.
|
protected Object |
mergeSimpleObjects(Object obj1,
Object obj2,
ORMetadata otherMetadata,
String xmlElement)
INTERNAL:
Convenience method to merge two objects that were loaded from XML.
|
protected EntityAccessor |
reloadEntity(EntityAccessor entity,
MetadataDescriptor descriptor)
INTERNAL:
This method should be called to reload an entity (that was either
loaded from XML or an annotation) as a way of cloning it.
|
protected MappedSuperclassAccessor |
reloadMappedSuperclass(MappedSuperclassAccessor mappedSuperclass,
MetadataDescriptor descriptor)
INTERNAL:
This method should be called to reload a mapped superclass (that was either
loaded from XML or an annotation) as a way of cloning it.
|
void |
setAccessibleObject(MetadataAccessibleObject accessibleObject)
INTERNAL:
Set the accessible object for this accessor.
|
void |
setEntityMappings(XMLEntityMappings entityMappings)
INTERNAL:
Set the entity mappings (mapping file) for this OR object.
|
protected void |
setFieldName(DatabaseField field,
String name)
INTERNAL:
All field names should be set through this method to ensure delimited
identifiers and upper casing defaults are set.
|
protected void |
setFieldName(DatabaseField field,
String defaultName,
String context)
INTERNAL:
Go through this method if you can default a name.
|
void |
setProject(MetadataProject project)
INTERNAL:
Set the metadata project.
|
boolean |
shouldOverride(ORMetadata existing)
INTERNAL:
Method to determine if this ORMetadata should override another.
|
protected boolean |
valuesMatch(List<Object> list1,
List<Object> list2)
INTERNAL:
Two lists are the same if they are the same size and their ordered
elements are the same.
|
protected boolean |
valuesMatch(Object value1,
Object value2)
INTERNAL:
|
protected MetadataProject m_project
protected ORMetadata()
public ORMetadata(String xmlElement)
protected ORMetadata(MetadataAccessibleObject accessibleObject, MetadataProject project, Object location)
public ORMetadata(MetadataAnnotation annotation, MetadataAccessor accessor)
public ORMetadata(MetadataAnnotation annotation, MetadataAccessibleObject accessibleObject, MetadataProject project)
public ORMetadata(ORMetadata orm)
public abstract boolean equals(Object objectToCompare)
protected MetadataAccessibleObject getAccessibleObject()
public String getAccessibleObjectName()
public MetadataAnnotation getAnnotation()
shouldOverrideprotected String getBoxedType(String type)
public ClassLoader getLoader()
protected DatabaseType getDatabaseTypeEnum(String type)
public XMLEntityMappings getEntityMappings()
protected String getFullyQualifiedClassName(String className)
protected String getIdentifier()
protected Class getJavaClass(MetadataClass metadataClass)
public String getJavaClassName(MetadataClass metadataClass)
public Object getLocation()
public MetadataLogger getLogger()
public MetadataClass getMetadataClass(Class javaClass)
public MetadataClass getMetadataClass(String className)
public MetadataClass getMetadataClass(String className, boolean isLazy)
public MetadataFactory getMetadataFactory()
protected String getName(String name, String defaultName, String context)
public MetadataProject getProject()
protected String getText()
protected String getXMLElement()
shouldOverrideprotected boolean hasIdentifier()
protected boolean hasText()
protected MetadataClass initXMLClassName(String className)
public void initXMLObject(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings)
protected void initXMLObject(ORMetadata metadata, MetadataAccessibleObject accessibleObject)
protected void initXMLObjects(List metadatas, MetadataAccessibleObject accessibleObject)
protected String initXMLTextObject(List metadatas)
<convert>). Method helps support backwards
compatibility. If the text object is initialized the metadata list is
set to null to ease further processing (logging, warnings, overrides etc.)public boolean loadedFromAnnotation()
public boolean loadedFromEclipseLinkXML()
public boolean loadedFromXML()
protected void merge(ORMetadata metadata)
protected List mergeORObjectLists(List list1, List list2)
protected ORMetadata mergeORObjects(ORMetadata obj1, ORMetadata obj2)
protected Object mergeSimpleObjects(Object obj1, Object obj2, ORMetadata otherMetadata, String xmlElement)
protected EntityAccessor reloadEntity(EntityAccessor entity, MetadataDescriptor descriptor)
protected MappedSuperclassAccessor reloadMappedSuperclass(MappedSuperclassAccessor mappedSuperclass, MetadataDescriptor descriptor)
public void setAccessibleObject(MetadataAccessibleObject accessibleObject)
public void setEntityMappings(XMLEntityMappings entityMappings)
protected void setFieldName(DatabaseField field, String name)
protected void setFieldName(DatabaseField field, String defaultName, String context)
public void setProject(MetadataProject project)
public boolean shouldOverride(ORMetadata existing)
protected boolean valuesMatch(List<Object> list1, List<Object> list2)
Copyright © 2007–2021 Eclipse.org - EclipseLink Project. All rights reserved.