Module org.eclipse.persistence.jpa
Class ArrayAccessor
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.DirectAccessor
org.eclipse.persistence.internal.jpa.metadata.structures.ArrayAccessor
An array accessor.
Used to support ArrayMapping and ObjectArrayMapping.
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
-
Field Summary
Fields inherited from class org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappingAccessor
KEY_DOT_NOTATION, m_field, VALUE_DOT_NOTATION
Fields inherited from class org.eclipse.persistence.internal.jpa.metadata.ORMetadata
m_project
-
Constructor Summary
ConstructorDescriptionINTERNAL: Used for OX mapping.ArrayAccessor
(MetadataAnnotation array, MetadataAccessibleObject accessibleObject, ClassAccessor classAccessor) INTERNAL: Used for annotations. -
Method Summary
Modifier and TypeMethodDescriptionboolean
INTERNAL:INTERNAL: Used for OX mapping.protected ColumnMetadata
INTERNAL:INTERNAL: Used for OX mapping.INTERNAL:INTERNAL:If a targetClass is specified in metadata, it will be set as the reference class, otherwise we will look to extract one from generics.In an element collection case, when the collection is not an embeddable collection, there is no notion of a reference descriptor, therefore we return this accessors descriptorprotected MetadataClass
INTERNAL: Return the target class for this accessor.protected String
INTERNAL: Used for OX mapping.int
hashCode()
void
initXMLObject
(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings) INTERNAL:boolean
INTERNAL: Return true if this element collection contains embeddable objects.void
process()
INTERNAL: Process the ArrayMapping or ObjectArrayMapping.void
setColumn
(ColumnMetadata column) INTERNAL: Used for OX mapping.void
setDatabaseType
(String databaseType) INTERNAL: Used for OX mapping.void
setTargetClassName
(String targetClassName) INTERNAL: Used for OX mapping.Methods inherited from class org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.DirectAccessor
addConvert, getConvert, getConverts, getEnumerated, getEnumerated, getFetch, getLob, getLob, getOptional, getTemporal, getTemporal, hasEnumerated, hasLob, hasTemporal, isOptional, setConverts, setEnumerated, setFetch, setLob, setOptional, setTemporal, setTemporal, usesIndirection
Methods inherited from class org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappingAccessor
addConvertMetadata, addFieldNameTranslation, addMapKeyConvert, derivesId, getAnnotation, getAssociationOverrides, getAttributeName, getAttributeOverride, getAttributeOverrides, getAttributeType, getClassAccessor, getConverts, getDatabaseField, getDefaultTableForEntityMapKey, getField, getForeignKey, getGetMethodName, getJoinColumns, getJoinColumnsAndValidate, getMapKey, getMapKeyConverts, getMapKeyReferenceClass, getMapKeyReferenceClassName, getMapKeyReferenceClassWithGenerics, getMapping, getOwningDescriptor, getOwningDescriptors, getRawClass, getRawClassWithGenerics, getReferenceAccessors, getReferenceClassFromGeneric, getReferenceClassName, getReferenceClassWithGenerics, getReferenceDatabaseTable, getSetMethodName, hasAttributeOverride, hasAttributeType, hasMapKey, hasReturnInsert, hasReturnUpdate, initXMLMappingAccessor, isAnnotationPresent, isBasic, isBasicCollection, isBasicMap, isCollectionAccessor, isDerivedIdClass, isDirectCollection, isEmbedded, 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, toString, updatePrimaryKeyField, usesFieldAccess, 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 Details
-
ArrayAccessor
public ArrayAccessor()INTERNAL: Used for OX mapping. -
ArrayAccessor
public ArrayAccessor(MetadataAnnotation array, MetadataAccessibleObject accessibleObject, ClassAccessor classAccessor) INTERNAL: Used for annotations.
-
-
Method Details
-
equals
INTERNAL:- Overrides:
equals
in classDirectAccessor
-
hashCode
public int hashCode()- Overrides:
hashCode
in classDirectAccessor
-
getColumn
INTERNAL: Used for OX mapping. -
getColumn
INTERNAL:- Overrides:
getColumn
in classMappingAccessor
- See Also:
-
getDatabaseType
INTERNAL: Used for OX mapping. -
getDefaultFetchType
INTERNAL:- Specified by:
getDefaultFetchType
in classDirectAccessor
-
getEmbeddableAccessor
INTERNAL: -
getReferenceClass
If a targetClass is specified in metadata, it will be set as the reference class, otherwise we will look to extract one from generics.MappedSuperclass descriptors return Void when their parameterized generic reference class is null
- Overrides:
getReferenceClass
in classMappingAccessor
-
getReferenceDescriptor
In an element collection case, when the collection is not an embeddable collection, there is no notion of a reference descriptor, therefore we return this accessors descriptor- Overrides:
getReferenceDescriptor
in classMappingAccessor
-
getTargetClass
INTERNAL: Return the target class for this accessor. -
getTargetClassName
INTERNAL: Used for OX mapping. -
initXMLObject
public void initXMLObject(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings) INTERNAL:- Overrides:
initXMLObject
in classDirectAccessor
-
isDirectEmbeddableCollection
public boolean isDirectEmbeddableCollection()INTERNAL: Return true if this element collection contains embeddable objects.- Overrides:
isDirectEmbeddableCollection
in classMappingAccessor
-
process
public void process()INTERNAL: Process the ArrayMapping or ObjectArrayMapping.- Specified by:
process
in classMetadataAccessor
-
setColumn
INTERNAL: Used for OX mapping. -
setDatabaseType
INTERNAL: Used for OX mapping. -
setTargetClassName
INTERNAL: Used for OX mapping.
-