Module org.eclipse.persistence.jpa
Class EmbeddedAccessor
java.lang.Object
org.eclipse.persistence.internal.jpa.metadata.ORMetadata
org.eclipse.persistence.internal.jpa.metadata.accessors.MetadataAccessor
org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappingAccessor
org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.EmbeddedAccessor
- Direct Known Subclasses:
DerivedIdClassAccessor,EmbeddedIdAccessor
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.
- Since:
- TopLink EJB 3.0 Reference Implementation
-
Field Summary
Fields inherited from class org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappingAccessor
KEY_DOT_NOTATION, m_field, VALUE_DOT_NOTATIONFields inherited from class org.eclipse.persistence.internal.jpa.metadata.ORMetadata
m_project -
Constructor Summary
ConstructorsModifierConstructorDescriptionINTERNAL: Used for OX mapping.protectedEmbeddedAccessor(String xmlElement) INTERNAL:EmbeddedAccessor(MetadataAnnotation embedded, MetadataAccessibleObject accessibleObject, ClassAccessor classAccessor) INTERNAL: -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddConvert(ConvertMetadata convert) INTERNAL: Subclasses that support key converts need to override this method.voidaddMapsIdAccessor(MappingAccessor mapsIdAccessor) INTERNAL:booleanINTERNAL:INTERNAL: Used for OX mapping.INTERNAL: Used for OX mapping.INTERNAL: Used for OX mapping.inthashCode()voidinitXMLObject(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings) INTERNAL:booleanINTERNAL:voidprocess()INTERNAL: Process an embedded.voidsetAssociationOverrides(List<AssociationOverrideMetadata> associationOverrides) INTERNAL: Used for OX mapping.voidsetAttributeOverrides(List<AttributeOverrideMetadata> attributeOverrides) INTERNAL: Used for OX mapping.voidsetConverts(List<ConvertMetadata> converts) INTERNAL: Used for OX mapping.protected voidupdateDerivedIdField(EmbeddableMapping embeddableMapping, String overrideName, DatabaseField overrideField, MappingAccessor mappingAccessor) INTERNAL: Called when process the mapsId metadata.Methods inherited from class org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappingAccessor
addConvertMetadata, addFieldNameTranslation, addMapKeyConvert, derivesId, getAnnotation, getAssociationOverrides, getAttributeName, getAttributeOverride, getAttributeOverrides, getAttributeType, getClassAccessor, getColumn, getConverts, getDatabaseField, getDefaultFetchType, getDefaultTableForEntityMapKey, getEnumerated, getField, getForeignKey, getGetMethodName, getJoinColumns, getJoinColumnsAndValidate, getLob, getMapKey, getMapKeyConverts, getMapKeyReferenceClass, getMapKeyReferenceClassName, getMapKeyReferenceClassWithGenerics, getMapping, getOwningDescriptor, getOwningDescriptors, getRawClass, getRawClassWithGenerics, getReferenceAccessors, getReferenceClass, getReferenceClassFromGeneric, getReferenceClassName, getReferenceClassWithGenerics, getReferenceDatabaseTable, getReferenceDescriptor, getSetMethodName, getTemporal, hasAttributeOverride, hasAttributeType, hasEnumerated, hasLob, hasMapKey, hasReturnInsert, hasReturnUpdate, hasTemporal, initXMLMappingAccessor, isAnnotationPresent, isBasic, isBasicCollection, isBasicMap, isCollectionAccessor, isDerivedIdClass, isDirectCollection, isDirectEmbeddableCollection, isEmbeddedId, isEnumerated, isId, isJson, isLob, isManyToMany, isManyToOne, isMapAccessor, isMappedKeyMapAccessor, isMultitenantId, isOneToMany, isOneToOne, isPrimitiveWrapperClass, isProcessed, isRelationship, isSerialized, isTemporal, isTimeClass, isTransient, isUUID, isValidJsonType, isValidSerializedType, isVariableOneToOne, processAssociationOverride, processAssociationOverrides, processAttributeOverrides, processContainerPolicyAndIndirection, processConvert, processConverts, processDirectMapKeyClass, processEmbeddableMapKeyClass, processEntityMapKeyClass, processEnumerated, processForeignKeyRelationship, processIndirection, processJoinFetch, processJson, processLob, processMapKeyClass, processMappingConverter, processMappingKeyConverter, processMappingValueConverter, processProperties, processProperty, processReturnInsert, processReturnInsertAndUpdate, processReturnUpdate, processSerialized, processSerialized, processTemporal, processUUID, setAccessorMethods, setAttributeType, setClassAccessor, setField, setIndirectionPolicy, setMapping, setOverrideMapping, setTemporal, toString, updatePrimaryKeyField, usesFieldAccess, usesIndirection, usesPropertyAccess, usesVirtualAccessMethods inherited from class org.eclipse.persistence.internal.jpa.metadata.accessors.MetadataAccessor
getAccess, getAccessibleObject, getAccessMethods, getAnnotatedElement, getAnnotatedElementName, getAnnotation, getConverters, getDefaultAttributeName, getDescriptor, getDescriptorJavaClass, getHashPartitioning, getIdentifier, getJavaClass, getJavaClassName, getName, getObjectTypeConverters, getPartitioned, getPartitioning, getPinnedPartitioning, getProperties, getRangePartitioning, getReferencedField, getReferencedField, getReplicationPartitioning, getRoundRobinPartitioning, getSerializedConverters, getStructConverters, getTypeConverters, getUnionPartitioning, getUpperCaseShortJavaClassName, getValue, getValue, getValuePartitioning, hasAccess, hasAccessMethods, initAccess, initXMLAccessor, isAnnotationPresent, merge, processConverters, processCustomConverters, processObjectTypeConverters, processPartitioned, processPartitioning, processPrimaryKeyJoinColumns, processSerializedConverters, processStructConverters, processTable, processTypeConverters, setAccess, setAccessMethods, setConverters, setDescriptor, setHashPartitioning, setName, setObjectTypeConverters, setPartitioned, setPartitioning, setPinnedPartitioning, setProperties, setRangePartitioning, setReplicationPartitioning, setRoundRobinPartitioning, setSerializedConverters, setStructConverters, setTypeConverters, setUnionPartitioning, setValuePartitioningMethods inherited from class org.eclipse.persistence.internal.jpa.metadata.ORMetadata
getAccessibleObjectName, getAnnotation, getBoxedType, getDatabaseTypeEnum, getEntityMappings, getFullyQualifiedClassName, getJavaClass, getJavaClassName, getLoader, getLocation, getLogger, getMetadataClass, getMetadataClass, getMetadataClass, getMetadataFactory, getName, getPrimitiveClassForName, getProject, getText, getXMLElement, hasIdentifier, hasText, initXMLClassName, initXMLObject, initXMLObjects, initXMLTextObject, loadedFromAnnotation, loadedFromEclipseLinkXML, loadedFromXML, mergeORObjectLists, mergeORObjects, mergeSimpleObjects, reloadEntity, reloadMappedSuperclass, setAccessibleObject, setEntityMappings, setFieldName, setFieldName, setProject, shouldOverride, valuesMatch, valuesMatch
-
Constructor Details
-
EmbeddedAccessor
public EmbeddedAccessor()INTERNAL: Used for OX mapping. -
EmbeddedAccessor
INTERNAL: -
EmbeddedAccessor
public EmbeddedAccessor(MetadataAnnotation embedded, MetadataAccessibleObject accessibleObject, ClassAccessor classAccessor) INTERNAL:
-
-
Method Details
-
addConvert
INTERNAL: Subclasses that support key converts need to override this method.- Overrides:
addConvertin classMappingAccessor
-
addMapsIdAccessor
INTERNAL: -
equals
INTERNAL:- Overrides:
equalsin classMappingAccessor
-
hashCode
public int hashCode()- Overrides:
hashCodein classMappingAccessor
-
getAssociationOverrides
INTERNAL: Used for OX mapping. -
getAttributeOverrides
INTERNAL: Used for OX mapping. -
getConverts
INTERNAL: Used for OX mapping. -
initXMLObject
public void initXMLObject(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings) INTERNAL:- Overrides:
initXMLObjectin classMappingAccessor
-
isEmbedded
public boolean isEmbedded()INTERNAL:- Overrides:
isEmbeddedin classMappingAccessor
-
process
public void process()INTERNAL: Process an embedded.- Specified by:
processin classMetadataAccessor
-
setAssociationOverrides
INTERNAL: Used for OX mapping. -
setAttributeOverrides
INTERNAL: Used for OX mapping. -
setConverts
INTERNAL: Used for OX mapping. -
updateDerivedIdField
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.
-