Class StructureAccessor
- 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.structures.StructureAccessor
-
public class StructureAccessor extends MappingAccessor
Defines a StructureMapping metadata. 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 initialized in the initXMLObject method. - when loading from annotations, the constructor accepts the metadata accessor this metadata was loaded from. Used it to look up any 'companion' annotation needed for processing. - methods should be preserved in alphabetical order.- Since:
- EclipseLink 2.3
- Author:
- James Sutherland
-
-
Field Summary
-
Fields inherited from class org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappingAccessor
KEY_DOT_NOTATION, VALUE_DOT_NOTATION
-
Fields inherited from class org.eclipse.persistence.internal.jpa.metadata.ORMetadata
m_project
-
-
Constructor Summary
Constructors Constructor Description StructureAccessor()INTERNAL: Used for XML loading.StructureAccessor(MetadataAnnotation embedded, MetadataAccessibleObject accessibleObject, ClassAccessor classAccessor)INTERNAL: Used for annotation loading.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object objectToCompare)INTERNAL: Used for xml merging.ColumnMetadatagetColumn()INTERNAL: Used for OX mapping.MetadataClassgetReferenceClass()INTERNAL: If a target class is specified in metadata, it will be set as the reference class, otherwise we will use the raw class.protected MetadataClassgetTargetClass()INTERNAL: Return the target class for this accessor.protected java.lang.StringgetTargetClassName()INTERNAL: Used for OX mapping.inthashCode()voidinitXMLObject(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings)INTERNAL:booleanisEmbedded()INTERNAL: Must return true as an embedded is referenced and needs to be correctly initialized.voidprocess()INTERNAL: Build and structure mapping and add it to the descriptor.voidsetColumn(ColumnMetadata column)INTERNAL: Used for OX mapping.voidsetTargetClassName(java.lang.String targetClassName)INTERNAL: Used for OX mapping.-
Methods inherited from class org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappingAccessor
addConvert, 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, 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, isLob, isManyToMany, isManyToOne, isMapAccessor, isMappedKeyMapAccessor, isMultitenantId, isOneToMany, isOneToOne, isPrimitiveWrapperClass, isProcessed, isRelationship, isSerialized, isTemporal, isTimeClass, isTransient, isValidSerializedType, isVariableOneToOne, processAssociationOverride, processAssociationOverrides, processAttributeOverrides, processContainerPolicyAndIndirection, processConvert, processConverts, processDirectMapKeyClass, processEmbeddableMapKeyClass, processEntityMapKeyClass, processEnumerated, processForeignKeyRelationship, processIndirection, processJoinFetch, processLob, processMapKeyClass, processMappingConverter, processMappingKeyConverter, processMappingValueConverter, processProperties, processProperty, processReturnInsert, processReturnInsertAndUpdate, processReturnUpdate, processSerialized, processSerialized, processTemporal, setAccessorMethods, setAttributeType, setClassAccessor, setField, setIndirectionPolicy, setMapping, setOverrideMapping, setTemporal, toString, updatePrimaryKeyField, usesFieldAccess, usesIndirection, usesPropertyAccess, usesVirtualAccess
-
Methods 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, setValuePartitioning
-
Methods 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 Detail
-
StructureAccessor
public StructureAccessor()
INTERNAL: Used for XML loading.
-
StructureAccessor
public StructureAccessor(MetadataAnnotation embedded, MetadataAccessibleObject accessibleObject, ClassAccessor classAccessor)
INTERNAL: Used for annotation loading.
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object objectToCompare)
INTERNAL: Used for xml merging.- Overrides:
equalsin classMappingAccessor
-
hashCode
public int hashCode()
- Overrides:
hashCodein classMappingAccessor
-
getColumn
public ColumnMetadata getColumn()
INTERNAL: Used for OX mapping.
-
getReferenceClass
public MetadataClass getReferenceClass()
INTERNAL: If a target class is specified in metadata, it will be set as the reference class, otherwise we will use the raw class.- Overrides:
getReferenceClassin classMappingAccessor
-
getTargetClass
protected MetadataClass getTargetClass()
INTERNAL: Return the target class for this accessor.
-
getTargetClassName
protected java.lang.String getTargetClassName()
INTERNAL: Used for OX mapping.
-
initXMLObject
public void initXMLObject(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings)
INTERNAL:- Overrides:
initXMLObjectin classMappingAccessor
-
isEmbedded
public boolean isEmbedded()
INTERNAL: Must return true as an embedded is referenced and needs to be correctly initialized.- Overrides:
isEmbeddedin classMappingAccessor
-
process
public void process()
INTERNAL: Build and structure mapping and add it to the descriptor.- Specified by:
processin classMetadataAccessor
-
setColumn
public void setColumn(ColumnMetadata column)
INTERNAL: Used for OX mapping.
-
setTargetClassName
public void setTargetClassName(java.lang.String targetClassName)
INTERNAL: Used for OX mapping.
-
-