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

public Class EmbeddedAccessor

extends MappingAccessor
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.EmbeddedIdAccessor, org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.DerivedIdClassAccessor
Imports
java.util.ArrayList, .List, org.eclipse.persistence.internal.helper.DatabaseField, org.eclipse.persistence.internal.jpa.metadata.MetadataLogger, org.eclipse.persistence.internal.jpa.metadata.accessors.classes.ClassAccessor, org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAccessibleObject, .MetadataAnnotation, org.eclipse.persistence.internal.jpa.metadata.columns.AssociationOverrideMetadata, .AttributeOverrideMetadata, org.eclipse.persistence.internal.jpa.metadata.converters.ConvertMetadata, org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappings, org.eclipse.persistence.mappings.AggregateMapping, .AggregateObjectMapping, .EmbeddableMapping, org.eclipse.persistence.mappings.foundation.AbstractCompositeObjectMapping

An embedded relationship accessor. It may define all the same attributes as an entity, therefore, it also must handle nesting embedded's to the nth level. An embedded owning descriptor is a reference back to the actual owning entity's descriptor where the first embedded was discovered. Key notes: - any metadata mapped from XML to this class must be compared in the equals method. - any metadata mapped from XML to this class must be handled in the merge method. (merging is done at the accessor/mapping level) - any metadata mapped from XML to this class must be initialized in the initXMLObject method. - methods should be preserved in alphabetical order.
Author
Guy Pelletier
Since
TopLink EJB 3.0 Reference Implementation

Field Summary

Modifier and TypeField and Description
private List<AssociationOverrideMetadata>
private List<AttributeOverrideMetadata>
private List<ConvertMetadata>
Inherited from org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappingAccessor:
KEY_DOT_NOTATIONm_fieldVALUE_DOT_NOTATION

Constructor Summary

AccessConstructor and Description
public
EmbeddedAccessor()

INTERNAL: Used for OX mapping.

protected
EmbeddedAccessor(String xmlElement)

INTERNAL:

public
EmbeddedAccessor(MetadataAnnotation embedded, MetadataAccessibleObject accessibleObject, ClassAccessor classAccessor)

INTERNAL:

Method Summary

Modifier and TypeMethod and Description
protected void
addConvert(ConvertMetadata convert)

Overrides org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappingAccessor.addConvert.

INTERNAL: Subclasses that support key converts need to override this method.
public void
addMapsIdAccessor(MappingAccessor mapsIdAccessor)

INTERNAL:

public boolean
equals(Object
the reference object with which to compare.
objectToCompare
)

Overrides org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappingAccessor.equals.

INTERNAL:
public List<AssociationOverrideMetadata>
getAssociationOverrides()

INTERNAL: Used for OX mapping.

public List<AttributeOverrideMetadata>
getAttributeOverrides()

INTERNAL: Used for OX mapping.

public List<ConvertMetadata>
getConverts()

INTERNAL: Used for OX mapping.

public int
public void
public boolean
public void
public void
setAssociationOverrides(List<AssociationOverrideMetadata> associationOverrides)

INTERNAL: Used for OX mapping.

public void
setAttributeOverrides(List<AttributeOverrideMetadata> attributeOverrides)

INTERNAL: Used for OX mapping.

public void
setConverts(List<ConvertMetadata> converts)

INTERNAL: Used for OX mapping.

protected void
updateDerivedIdField(EmbeddableMapping embeddableMapping, String overrideName, DatabaseField overrideField, MappingAccessor mappingAccessor)

INTERNAL: Called when process the mapsId metadata.

Inherited from org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappingAccessor:
addConvertMetadataaddFieldNameTranslationaddMapKeyConvertderivesIdgetAnnotationgetAssociationOverridesgetAttributeNamegetAttributeOverridegetAttributeOverridesgetAttributeTypegetClassAccessorgetColumngetConvertsgetDatabaseFieldgetDefaultFetchTypegetDefaultTableForEntityMapKeygetEnumeratedgetFieldgetForeignKeygetGetMethodNamegetJoinColumnsgetJoinColumnsAndValidategetLobgetMapKeygetMapKeyConvertsgetMapKeyReferenceClassgetMapKeyReferenceClassNamegetMapKeyReferenceClassWithGenericsgetMappinggetOwningDescriptorgetOwningDescriptorsgetRawClassgetRawClassWithGenericsgetReferenceAccessorsgetReferenceClassgetReferenceClassFromGenericgetReferenceClassNamegetReferenceClassWithGenericsgetReferenceDatabaseTablegetReferenceDescriptorgetSetMethodNamegetTemporalhasAttributeOverridehasAttributeTypehasEnumeratedhasLobhasMapKeyhasReturnInserthasReturnUpdatehasTemporalinitXMLMappingAccessorisAnnotationPresentisBasicisBasicCollectionisBasicMapisCollectionAccessorisDerivedIdClassisDirectCollectionisDirectEmbeddableCollectionisEmbeddedIdisEnumeratedisIdisJsonisLobisManyToManyisManyToOneisMapAccessorisMappedKeyMapAccessorisMultitenantIdisOneToManyisOneToOneisPrimitiveWrapperClassisProcessedisRelationshipisSerializedisTemporalisTimeClassisTransientisUUIDisValidJsonTypeisValidSerializedTypeisVariableOneToOneprocessAssociationOverrideprocessAssociationOverridesprocessAttributeOverridesprocessContainerPolicyAndIndirectionprocessConvertprocessConvertsprocessDirectMapKeyClassprocessEmbeddableMapKeyClassprocessEntityMapKeyClassprocessEnumeratedprocessForeignKeyRelationshipprocessIndirectionprocessJoinFetchprocessJsonprocessLobprocessMapKeyClassprocessMappingConverterprocessMappingKeyConverterprocessMappingValueConverterprocessPropertiesprocessPropertyprocessReturnInsertprocessReturnInsertAndUpdateprocessReturnUpdateprocessSerializedprocessSerializedprocessTemporalprocessUUIDsetAccessorMethodssetAttributeTypesetClassAccessorsetFieldsetIndirectionPolicysetMappingsetOverrideMappingsetTemporaltoStringupdatePrimaryKeyFieldusesFieldAccessusesIndirectionusesPropertyAccessusesVirtualAccess

Field Detail

m_associationOverridesback to summary
private List<AssociationOverrideMetadata> m_associationOverrides
m_attributeOverridesback to summary
private List<AttributeOverrideMetadata> m_attributeOverrides
m_convertsback to summary
private List<ConvertMetadata> m_converts

Constructor Detail

EmbeddedAccessorback to summary
public EmbeddedAccessor()

INTERNAL: Used for OX mapping.

EmbeddedAccessorback to summary
protected EmbeddedAccessor(String xmlElement)

INTERNAL:

EmbeddedAccessorback to summary
public EmbeddedAccessor(MetadataAnnotation embedded, MetadataAccessibleObject accessibleObject, ClassAccessor classAccessor)

INTERNAL:

Method Detail

addConvertback to summary
protected void addConvert(ConvertMetadata convert)

Overrides org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappingAccessor.addConvert.

INTERNAL: Subclasses that support key converts need to override this method.

Annotations
@Override
addMapsIdAccessorback to summary
public void addMapsIdAccessor(MappingAccessor mapsIdAccessor)

INTERNAL:

equalsback to summary
public boolean equals(Object objectToCompare)

Overrides org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappingAccessor.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
getAssociationOverridesback to summary
public List<AssociationOverrideMetadata> getAssociationOverrides()

INTERNAL: Used for OX mapping.

getAttributeOverridesback to summary
public List<AttributeOverrideMetadata> getAttributeOverrides()

INTERNAL: Used for OX mapping.

getConvertsback to summary
public List<ConvertMetadata> getConverts()

INTERNAL: Used for OX mapping.

hashCodeback to summary
public int hashCode()

Overrides org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappingAccessor.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
initXMLObjectback to summary
public void initXMLObject(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings)

Overrides org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappingAccessor.initXMLObject.

INTERNAL:

Annotations
@Override
isEmbeddedback to summary
public boolean isEmbedded()

Overrides org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappingAccessor.isEmbedded.

INTERNAL:

Annotations
@Override
processback to summary
public void process()

Implements abstract org.eclipse.persistence.internal.jpa.metadata.accessors.MetadataAccessor.process.

INTERNAL: Process an embedded.

Annotations
@Override
setAssociationOverridesback to summary
public void setAssociationOverrides(List<AssociationOverrideMetadata> associationOverrides)

INTERNAL: Used for OX mapping.

setAttributeOverridesback to summary
public void setAttributeOverrides(List<AttributeOverrideMetadata> attributeOverrides)

INTERNAL: Used for OX mapping.

setConvertsback to summary
public void setConverts(List<ConvertMetadata> converts)

INTERNAL: Used for OX mapping.

updateDerivedIdFieldback to summary
protected void updateDerivedIdField(EmbeddableMapping embeddableMapping, String overrideName, DatabaseField overrideField, MappingAccessor mappingAccessor)

INTERNAL: Called when process the mapsId metadata. The id fields for this owning descriptor must have it's id fields update to those from the one to one accessor that maps them. We process embedded and embedded id mappings first, so by default they get mapped and processed as they normally would. When we go through the relationship accessors and discover a mapsId we then need to make some updates to our list of primary key fields.