Top Description Inners Fields Constructors Methods
org.eclipse.persistence.internal.jpa.metadata

public abstract Class ORMetadata

extends Object
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.internal.jpa.metadata.ORMetadata.SimpleORMetadata, org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappings, org.eclipse.persistence.internal.jpa.metadata.xml.XMLPersistenceUnitDefaults, org.eclipse.persistence.internal.jpa.metadata.xml.XMLPersistenceUnitMetadata, org.eclipse.persistence.internal.jpa.metadata.accessors.MetadataAccessor, org.eclipse.persistence.internal.jpa.metadata.accessors.PropertyMetadata, org.eclipse.persistence.internal.jpa.metadata.accessors.classes.ConverterAccessor, org.eclipse.persistence.internal.jpa.metadata.accessors.classes.XMLAttributes, org.eclipse.persistence.internal.jpa.metadata.additionalcriteria.AdditionalCriteriaMetadata, org.eclipse.persistence.internal.jpa.metadata.cache.CacheIndexMetadata, org.eclipse.persistence.internal.jpa.metadata.cache.CacheInterceptorMetadata, org.eclipse.persistence.internal.jpa.metadata.cache.CacheMetadata, org.eclipse.persistence.internal.jpa.metadata.cache.TimeOfDayMetadata, org.eclipse.persistence.internal.jpa.metadata.changetracking.ChangeTrackingMetadata, org.eclipse.persistence.internal.jpa.metadata.columns.DiscriminatorClassMetadata, org.eclipse.persistence.internal.jpa.metadata.columns.ForeignKeyMetadata, org.eclipse.persistence.internal.jpa.metadata.columns.MetadataColumn, org.eclipse.persistence.internal.jpa.metadata.columns.OverrideMetadata, org.eclipse.persistence.internal.jpa.metadata.columns.PrimaryKeyMetadata, org.eclipse.persistence.internal.jpa.metadata.converters.ConversionValueMetadata, org.eclipse.persistence.internal.jpa.metadata.converters.ConvertMetadata, org.eclipse.persistence.internal.jpa.metadata.converters.MetadataConverter, org.eclipse.persistence.internal.jpa.metadata.copypolicy.CopyPolicyMetadata, org.eclipse.persistence.internal.jpa.metadata.graphs.NamedAttributeNodeMetadata, org.eclipse.persistence.internal.jpa.metadata.graphs.NamedEntityGraphMetadata, org.eclipse.persistence.internal.jpa.metadata.graphs.NamedSubgraphMetadata, org.eclipse.persistence.internal.jpa.metadata.inheritance.InheritanceMetadata, org.eclipse.persistence.internal.jpa.metadata.listeners.EntityListenerMetadata, org.eclipse.persistence.internal.jpa.metadata.locking.OptimisticLockingMetadata, org.eclipse.persistence.internal.jpa.metadata.mappings.AccessMethodsMetadata, org.eclipse.persistence.internal.jpa.metadata.mappings.BatchFetchMetadata, org.eclipse.persistence.internal.jpa.metadata.mappings.CascadeMetadata, org.eclipse.persistence.internal.jpa.metadata.mappings.MapKeyMetadata, org.eclipse.persistence.internal.jpa.metadata.mappings.OrderByMetadata, org.eclipse.persistence.internal.jpa.metadata.mappings.ReturnInsertMetadata, org.eclipse.persistence.internal.jpa.metadata.multitenant.MultitenantMetadata, org.eclipse.persistence.internal.jpa.metadata.multitenant.TenantTableDiscriminatorMetadata, org.eclipse.persistence.internal.jpa.metadata.nosql.NoSqlMetadata, org.eclipse.persistence.internal.jpa.metadata.partitioning.AbstractPartitioningMetadata, org.eclipse.persistence.internal.jpa.metadata.partitioning.RangePartitionMetadata, org.eclipse.persistence.internal.jpa.metadata.partitioning.ValuePartitionMetadata, org.eclipse.persistence.internal.jpa.metadata.queries.ColumnResultMetadata, org.eclipse.persistence.internal.jpa.metadata.queries.ComplexTypeMetadata, org.eclipse.persistence.internal.jpa.metadata.queries.ConstructorResultMetadata, org.eclipse.persistence.internal.jpa.metadata.queries.EntityResultMetadata, org.eclipse.persistence.internal.jpa.metadata.queries.FetchAttributeMetadata, org.eclipse.persistence.internal.jpa.metadata.queries.FetchGroupMetadata, org.eclipse.persistence.internal.jpa.metadata.queries.FieldResultMetadata, org.eclipse.persistence.internal.jpa.metadata.queries.NamedQueryMetadata, org.eclipse.persistence.internal.jpa.metadata.queries.PLSQLParameterMetadata, org.eclipse.persistence.internal.jpa.metadata.queries.QueryHintMetadata, org.eclipse.persistence.internal.jpa.metadata.queries.QueryRedirectorsMetadata, org.eclipse.persistence.internal.jpa.metadata.queries.SQLResultSetMappingMetadata, org.eclipse.persistence.internal.jpa.metadata.queries.StoredProcedureParameterMetadata, org.eclipse.persistence.internal.jpa.metadata.sequencing.GeneratedValueMetadata, org.eclipse.persistence.internal.jpa.metadata.sequencing.SequenceGeneratorMetadata, org.eclipse.persistence.internal.jpa.metadata.sequencing.UuidGeneratorMetadata, org.eclipse.persistence.internal.jpa.metadata.sop.SerializedObjectPolicyMetadata, org.eclipse.persistence.internal.jpa.metadata.structures.StructMetadata, org.eclipse.persistence.internal.jpa.metadata.tables.IndexMetadata, org.eclipse.persistence.internal.jpa.metadata.tables.TableMetadata, org.eclipse.persistence.internal.jpa.metadata.tables.UniqueConstraintMetadata, org.eclipse.persistence.internal.jpa.metadata.transformers.ReadTransformerMetadata
Imports
java.util.ArrayList, .Collections, .HashMap, .List, .Map, org.eclipse.persistence.exceptions.ValidationException, org.eclipse.persistence.internal.helper.DatabaseField, .DatabaseType, .Helper, org.eclipse.persistence.internal.jpa.metadata.accessors.MetadataAccessor, org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor, .MappedSuperclassAccessor, org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAccessibleObject, .MetadataAnnotation, .MetadataClass, .MetadataFactory, org.eclipse.persistence.internal.jpa.metadata.queries.ComplexTypeMetadata, org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappings, org.eclipse.persistence.platform.database.jdbc.JDBCTypes, org.eclipse.persistence.platform.database.oracle.plsql.OraclePLSQLTypes, .PLSQLrecord

INTERNAL: Abstract/common level for JPA Object/Relational metadata. This class handles the merging and overriding details for those metadata objects who care about it. For consistency, and ease of future work, all metadata objects added should extend this class even though they may not currently have a need for merging and overriding. Subclasses that care about merging need to concern themselves with the following methods: - getIdentifier() used to compare two named objects. - equals() used to compare if two objects have similar metadata. - setLocation() must be set on the accessible object. From annotations this is handled in the constructor. For XML objects you need to ensure their init method or processing method sets the location (that is, a mapping file) where the element was found.
Author
Guy Pelletier
Since
EclipseLink 1.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
ORMetadata.SimpleORMetadata

INTERNAL: Internal class to represent java type objects.

Field Summary

Modifier and TypeField and Description
private static final Map<String, String>
private MetadataAccessibleObject
private MetadataAnnotation
private XMLEntityMappings
private Object
protected MetadataProject
private String
private static final Map<String, Class<?>>

Constructor Summary

AccessConstructor and Description
protected
ORMetadata()

INTERNAL: Used for defaulting case.

public
ORMetadata(String xmlElement)

INTERNAL: Used for OX loading.

protected
ORMetadata(MetadataAccessibleObject accessibleObject, MetadataProject project, Object location)

INTERNAL: Used for defaulting.

public
ORMetadata(MetadataAnnotation annotation, MetadataAccessor accessor)

INTERNAL: Used for annotation loading of metadata objects.

public
ORMetadata(MetadataAnnotation annotation, MetadataAccessibleObject accessibleObject, MetadataProject project)

INTERNAL: Used for annotation loading of class and mapping accessors.

public
ORMetadata(ORMetadata orm)

INTERNAL: Used for annotation loading and switching from one metadata object to a more specific one.

Method Summary

Modifier and TypeMethod and Description
public abstract boolean
equals(Object
the reference object with which to compare.
objectToCompare
)

Overrides java.lang.Object.equals.

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.

public String
getAccessibleObjectName()

INTERNAL: Returns the name of the accessible object.

public 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.

private static Map<String, String>
protected DatabaseType
getDatabaseTypeEnum(String type)

Return the DataType enum constant for the String type name.

public 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.

public String
getJavaClassName(MetadataClass metadataClass)

INTERNAL: Return the Java class name for the metadata class.

public ClassLoader
getLoader()

INTERNAL: This method will return the current loader from the metadata factory used to created this ORMetadata.

public Object
getLocation()

INTERNAL:

public MetadataLogger
getLogger()

INTERNAL: Return the metadata logger.

public MetadataClass
getMetadataClass(Class<?> javaClass)

INTERNAL: Return the MetadataClass for the class.

public MetadataClass
getMetadataClass(String className)

INTERNAL: Return the MetadataClass for the class name.

public MetadataClass
getMetadataClass(String className, boolean isLazy)

INTERNAL: Return the MetadataClass for the class name.

public 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.

private static Map<String, Class<?>>
protected Class<?>
getPrimitiveClassForName(String className)

INTERNAL:

public 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.

public void
initXMLObject(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings)

INTERNAL: Any subclass that cares to do any more initialization (e.g. initialize a class) should override this method.

protected void
initXMLObject(ORMetadata metadata, MetadataAccessibleObject accessibleObject)

INTERNAL:

protected <T extends ORMetadata> void
initXMLObjects(List<T> metadatas, MetadataAccessibleObject accessibleObject)

INTERNAL: It is assumed this is a list of ORMetadata

protected <T extends ORMetadata> String
initXMLTextObject(List<T> metadatas)

INTERNAL: This is to support legacy orm instance docs.

public boolean
loadedFromAnnotation()

INTERNAL: Note: That annotations can default so the annotation may be null.

public boolean
public boolean
loadedFromXML()

INTERNAL:

protected void
merge(ORMetadata metadata)

INTERNAL: Subclasses that care to handle deeper merges should extend this method.

protected <T extends ORMetadata> List<T>
mergeORObjectLists(List<T> list1, List<T> 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.

public void
setAccessibleObject(MetadataAccessibleObject accessibleObject)

INTERNAL: Set the accessible object for this accessor.

public 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.

public void
setProject(MetadataProject project)

INTERNAL: Set the metadata project.

public 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:

Inherited from java.lang.Object:
clonefinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

boxedTypesback to summary
private static final Map<String, String> boxedTypes
m_accessibleObjectback to summary
private MetadataAccessibleObject m_accessibleObject
m_annotationback to summary
private MetadataAnnotation m_annotation
m_entityMappingsback to summary
private XMLEntityMappings m_entityMappings
m_locationback to summary
private Object m_location
m_projectback to summary
protected MetadataProject m_project
m_xmlElementback to summary
private String m_xmlElement
primitiveClassesback to summary
private static final Map<String, Class<?>> primitiveClasses

Constructor Detail

ORMetadataback to summary
protected ORMetadata()

INTERNAL: Used for defaulting case.

ORMetadataback to summary
public ORMetadata(String xmlElement)

INTERNAL: Used for OX loading.

ORMetadataback to summary
protected ORMetadata(MetadataAccessibleObject accessibleObject, MetadataProject project, Object location)

INTERNAL: Used for defaulting. At minimum, all metadata should have this information available to them at process time (to ensure no errors during processing). Depending on the metadata processing needs you can get away with not having them set, however, any dependencies on the loader, metadata logger or the metadata project etc. will require these.

ORMetadataback to summary
public ORMetadata(MetadataAnnotation annotation, MetadataAccessor accessor)

INTERNAL: Used for annotation loading of metadata objects.

ORMetadataback to summary
public ORMetadata(MetadataAnnotation annotation, MetadataAccessibleObject accessibleObject, MetadataProject project)

INTERNAL: Used for annotation loading of class and mapping accessors.

ORMetadataback to summary
public ORMetadata(ORMetadata orm)

INTERNAL: Used for annotation loading and switching from one metadata object to a more specific one.

Method Detail

equalsback to summary
public abstract boolean equals(Object objectToCompare)

Overrides java.lang.Object.equals.

INTERNAL: For merging and overriding to work properly, all ORMetadata must be able to compare themselves for metadata equality. equals plays a big role in the shouldOverride() method from this class.

Parameters
objectToCompare:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getAccessibleObjectback to summary
protected MetadataAccessibleObject getAccessibleObject()

INTERNAL: Returns the accessible object for this accessor.

getAccessibleObjectNameback to summary
public String getAccessibleObjectName()

INTERNAL: Returns the name of the accessible object. If it is a field, it will return the field name. For a method it will return the method name.

getAnnotationback to summary
public MetadataAnnotation getAnnotation()

INTERNAL: This is a value is that is used when logging messages for overriding.

See Also
shouldOverride
getBoxedTypeback to summary
protected String getBoxedType(String type)

INTERNAL: Quick lookup of a primitive boxed type.

getBoxedTypesMapback to summary
private static Map<String, String> getBoxedTypesMap()
getDatabaseTypeEnumback to summary
protected DatabaseType getDatabaseTypeEnum(String type)

Return the DataType enum constant for the String type name. If not a type defined by the enums, then return a record type.

getEntityMappingsback to summary
public XMLEntityMappings getEntityMappings()

INTERNAL:

getFullyQualifiedClassNameback to summary
protected String getFullyQualifiedClassName(String className)

INTERNAL: Return the fully qualified className using the package (if any) setting from XML.

getIdentifierback to summary
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. It will also be used when logging messages, that is, to provide a more detailed message.

See Also
shouldOverride(ORMetadata), mergeORObjects(ORMetadata, ORMetadata), mergeORObjectLists(List, List)
getJavaClassback to summary
protected Class<?> getJavaClass(MetadataClass metadataClass)

INTERNAL: Return the Java class for the metadata class using the metadata loader. Callers to this method should only do so when the application loader (from deploy) is available. This method should not be called with the temp loader, see getJavaClassName instead which will provide a valid string class name that can be initialized at runtime instead.

getJavaClassNameback to summary
public String getJavaClassName(MetadataClass metadataClass)

INTERNAL: Return the Java class name for the metadata class. This is the class name name metadata processing should set on descriptors and mappings to be initialized during the convertClassNamesToClasses call at runtime.

getLoaderback to summary
public ClassLoader getLoader()

INTERNAL: This method will return the current loader from the metadata factory used to created this ORMetadata.

getLocationback to summary
public Object getLocation()

INTERNAL:

getLoggerback to summary
public MetadataLogger getLogger()

INTERNAL: Return the metadata logger.

getMetadataClassback to summary
public MetadataClass getMetadataClass(Class<?> javaClass)

INTERNAL: Return the MetadataClass for the class.

getMetadataClassback to summary
public MetadataClass getMetadataClass(String className)

INTERNAL: Return the MetadataClass for the class name.

getMetadataClassback to summary
public MetadataClass getMetadataClass(String className, boolean isLazy)

INTERNAL: Return the MetadataClass for the class name.

getMetadataFactoryback to summary
public MetadataFactory getMetadataFactory()

INTERNAL:

getNameback to summary
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. Requires the context from where this method is called to output the correct logging message when defaulting the field name. In some cases, both the name and defaultName could be "" or null, therefore, don't log a message and return name.

getPrimitiveClassesMapback to summary
private static Map<String, Class<?>> getPrimitiveClassesMap()
getPrimitiveClassForNameback to summary
protected Class<?> getPrimitiveClassForName(String className)

INTERNAL:

getProjectback to summary
public MetadataProject getProject()

INTERNAL: Return the MetadataProject.

getTextback to summary
protected String getText()

INTERNAL: Any ORMetadata that supported mixed types, that is, text or other metadata should override this method.

getXMLElementback to summary
protected String getXMLElement()

INTERNAL: This is a value is that is used when logging messages for overriding.

See Also
shouldOverride(ORMetadata)
hasIdentifierback to summary
protected boolean hasIdentifier()

INTERNAL:

hasTextback to summary
protected boolean hasText()

INTERNAL: Any ORMetadata that supported mixed types, that is, text or other metadata should override this method.

initXMLClassNameback to summary
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. The assumption here is that an entity mappings object will be available.

initXMLObjectback to summary
public void initXMLObject(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings)

INTERNAL: Any subclass that cares to do any more initialization (e.g. initialize a class) should override this method.

initXMLObjectback to summary
protected void initXMLObject(ORMetadata metadata, MetadataAccessibleObject accessibleObject)

INTERNAL:

initXMLObjectsback to summary
protected <T extends ORMetadata> void initXMLObjects(List<T> metadatas, MetadataAccessibleObject accessibleObject)

INTERNAL: It is assumed this is a list of ORMetadata

initXMLTextObjectback to summary
protected <T extends ORMetadata> String initXMLTextObject(List<T> metadatas)

INTERNAL: This is to support legacy orm instance docs. In some cases, previous simple text elements may have been changed to a list of ORMetadata through spec churn. (e.g. <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.)

loadedFromAnnotationback to summary
public boolean loadedFromAnnotation()

INTERNAL: Note: That annotations can default so the annotation may be null.

loadedFromEclipseLinkXMLback to summary
public boolean loadedFromEclipseLinkXML()

INTERNAL:

loadedFromXMLback to summary
public boolean loadedFromXML()

INTERNAL:

mergeback to summary
protected void merge(ORMetadata metadata)

INTERNAL: Subclasses that care to handle deeper merges should extend this method.

mergeORObjectListsback to summary
protected <T extends ORMetadata> List<T> mergeORObjectLists(List<T> list1, List<T> list2)

INTERNAL: Convenience method to merge two lists of metadata objects. This does not check for duplicates or any overrides at this time. Just appends all items from list2 to list1.

mergeORObjectsback to summary
protected ORMetadata mergeORObjects(ORMetadata obj1, ORMetadata obj2)

INTERNAL: Convenience method to merge two objects that were loaded from XML. The merge is complete. If value2 is specified it will override value1, otherwise, value1 does not change.

mergeSimpleObjectsback to summary
protected Object mergeSimpleObjects(Object obj1, Object obj2, ORMetadata otherMetadata, String xmlElement)

INTERNAL: Convenience method to merge two objects that were loaded from XML. The merge is complete. If value2 is specified it will override value1, otherwise, value1 does not.

reloadEntityback to summary
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. This is needed when we process TABLE_PER_CLASS inheritance. We must process the parent classes for every subclasses descriptor. The processing is similar to that of processing a mapped superclass, in that we process the parents with the subclasses context (that is, the descriptor we are given).

reloadMappedSuperclassback to summary
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. This is needed when processing TABLE_PER_CLASS inheritance and when building individual entity accessor's mapped superclass list.

setAccessibleObjectback to summary
public void setAccessibleObject(MetadataAccessibleObject accessibleObject)

INTERNAL: Set the accessible object for this accessor.

setEntityMappingsback to summary
public void setEntityMappings(XMLEntityMappings entityMappings)

INTERNAL: Set the entity mappings (mapping file) for this OR object.

setFieldNameback to summary
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.

setFieldNameback to summary
protected void setFieldName(DatabaseField field, String defaultName, String context)

INTERNAL: Go through this method if you can default a name. Provide the defaulting context to log to the correct context message to the user.

setProjectback to summary
public void setProject(MetadataProject project)

INTERNAL: Set the metadata project.

shouldOverrideback to summary
public boolean shouldOverride(ORMetadata existing)

INTERNAL: Method to determine if this ORMetadata should override another. Assumes all ORMetadata that call this method have correctly implemented their equals method.

valuesMatchback to summary
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.

valuesMatchback to summary
protected boolean valuesMatch(Object value1, Object value2)

INTERNAL:

org.eclipse.persistence.internal.jpa.metadata back to summary

private final Class ORMetadata.SimpleORMetadata

extends ORMetadata
Class Inheritance

INTERNAL: Internal class to represent java type objects. XML only.

Field Summary

Modifier and TypeField and Description
private final Object
Inherited from org.eclipse.persistence.internal.jpa.metadata.ORMetadata:
m_project

Constructor Summary

AccessConstructor and Description
public
SimpleORMetadata(Object value, MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings, String xmlElement)

INTERNAL:

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
the reference object with which to compare.
objectToCompare
)

Implements abstract org.eclipse.persistence.internal.jpa.metadata.ORMetadata.equals.

INTERNAL:
public Object
getValue()

INTERNAL:

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object.
Inherited from org.eclipse.persistence.internal.jpa.metadata.ORMetadata:
getAccessibleObjectgetAccessibleObjectNamegetAnnotationgetBoxedTypegetDatabaseTypeEnumgetEntityMappingsgetFullyQualifiedClassNamegetIdentifiergetJavaClassgetJavaClassNamegetLoadergetLocationgetLoggergetMetadataClassgetMetadataClassgetMetadataClassgetMetadataFactorygetNamegetPrimitiveClassForNamegetProjectgetTextgetXMLElementhasIdentifierhasTextinitXMLClassNameinitXMLObjectinitXMLObjectinitXMLObjectsinitXMLTextObjectloadedFromAnnotationloadedFromEclipseLinkXMLloadedFromXMLmergemergeORObjectListsmergeORObjectsmergeSimpleObjectsreloadEntityreloadMappedSuperclasssetAccessibleObjectsetEntityMappingssetFieldNamesetFieldNamesetProjectshouldOverridevaluesMatchvaluesMatch

Field Detail

m_valueback to summary
private final Object m_value

Constructor Detail

SimpleORMetadataback to summary
public SimpleORMetadata(Object value, MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings, String xmlElement)

INTERNAL:

Method Detail

equalsback to summary
public boolean equals(Object objectToCompare)

Implements abstract org.eclipse.persistence.internal.jpa.metadata.ORMetadata.equals.

INTERNAL:

Parameters
objectToCompare:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getValueback to summary
public Object getValue()

INTERNAL:

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object.

Annotations
@Override