Module org.eclipse.persistence.jpa
Class ElementCollectionAccessor
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.accessors.mappings.DirectCollectionAccessor
org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.ElementCollectionAccessor
- All Implemented Interfaces:
MappedKeyMapAccessor
public class ElementCollectionAccessor
extends DirectCollectionAccessor
implements MappedKeyMapAccessor
An element collection accessor.
Used to support DirectCollection, DirectMap, AggregateCollection.
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:
- EclipseLink 1.2
-
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
ConstructorsConstructorDescriptionINTERNAL: Used for OX mapping.ElementCollectionAccessor(MetadataAnnotation elementCollection, MetadataAccessibleObject accessibleObject, ClassAccessor classAccessor) INTERNAL: -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAssociationOverride(AssociationOverrideMetadata associationOverride) INTERNAL:protected voidaddAttributeOverride(AttributeOverrideMetadata attributeOverride) INTERNAL:voidaddMapKeyConvert(ConvertMetadata convert) INTERNAL: A map key convert from an annotation specification.booleanINTERNAL:INTERNAL: Used for OX mapping.INTERNAL: Used for OX mapping.INTERNAL: Used for OX mapping.protected ColumnMetadataINTERNAL:INTERNAL: Used for OX mapping.protected DatabaseTableINTERNAL: Return the default table to hold the foreign key of a MapKey when and Entity is used as the MapKeyINTERNAL: Used for OX mapping.INTERNAL:getEnumerated(boolean isForMapKey) INTERNAL: Return the enumerated metadata for this accessor.protected StringINTERNAL:INTERNAL: Used for OX mapping.INTERNAL: Used for OX mapping.INTERNAL: Used for OX mapping.INTERNAL: Return the map key class on this element collection accessor.INTERNAL: Used for OX mapping.INTERNAL: Future: this method is where we would provide a more explicit reference class to support an auto-apply jpa converter.INTERNAL: Used for OX mapping.INTERNAL:INTERNAL: Used for OX mapping.INTERNAL: Used for OX mapping.INTERNAL: Used for OX mapping.INTERNAL: Used for OX mapping.INTERNAL: Used for OX mapping.INTERNAL: Used for OX mapping.INTERNAL: Used for OX mapping.INTERNAL: If a targetEntity is specified in metadata, it will be set as the reference class, otherwise we will look to extract one from generics.INTERNAL: 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 MetadataClassINTERNAL: Return the target class for this accessor.protected StringINTERNAL: Used for OX mapping.getTemporal(boolean isForMapKey) INTERNAL: Return the temporal metadata for this accessor.booleanhasEnumerated(boolean isForMapKey) INTERNAL: Return true if this accessor has enumerated metadata.inthashCode()booleanhasLob(boolean isForMapKey) INTERNAL: Return true if this accessor has lob metadata.booleanINTERNAL:protected booleanINTERNAL: Return true if this accessor has a map key class specified.booleanhasTemporal(boolean isForMapKey) INTERNAL: Return true if this accessor has temporal metadata.voidinitXMLObject(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings) INTERNAL:booleanINTERNAL: Used by our XML writing facility.booleanINTERNAL: Return true if this element collection contains embeddable objects.voidprocess()INTERNAL: Process the element collection metadata.protected voidprocessCollectionTable(CollectionMapping mapping) INTERNAL: Process a MetadataCollectionTable.protected voidprocessDirectEmbeddableCollectionMapping(MetadataDescriptor referenceDescriptor) INTERNAL:protected voidprocessMappingsFromEmbeddable(MetadataDescriptor embeddableDescriptor, AggregateObjectMapping nestedAggregateObjectMapping, EmbeddableMapping embeddableMapping, Map<String, AttributeOverrideMetadata> attributeOverrides, Map<String, AssociationOverrideMetadata> associationOverrides, String dotNotationName) INTERNAL:protected voidprocessMappingValueConverters(MetadataDescriptor embeddableDescriptor) INTERNAL: Process convertors registered for collection mapping.voidsetAssociationOverrides(List<AssociationOverrideMetadata> associationOverrides) INTERNAL: Used for OX mapping.voidsetAttributeOverrides(List<AttributeOverrideMetadata> attributeOverrides) INTERNAL: Used for OX mapping.voidsetColumn(ColumnMetadata column) INTERNAL: Used for OX mapping.voidsetCompositeMember(String compositeMember) INTERNAL: Used for OX mapping.voidsetDeleteAll(Boolean deleteAll) INTERNAL: Used for OX mapping.voidsetMapKey(MapKeyMetadata mapKey) INTERNAL: Used for OX mapping.voidsetMapKeyAssociationOverrides(List<AssociationOverrideMetadata> mapKeyAssociationOverrides) INTERNAL: Used for OX mapping.voidsetMapKeyAttributeOverrides(List<AttributeOverrideMetadata> mapKeyAttributeOverrides) INTERNAL: Used for OX mapping.voidsetMapKeyClass(MetadataClass mapKeyClass) INTERNAL:voidsetMapKeyClassName(String mapKeyClassName) INTERNAL: Used for OX mapping.voidsetMapKeyColumn(ColumnMetadata mapKeyColumn) INTERNAL: Used for OX mapping.voidsetMapKeyConverts(List<ConvertMetadata> mapKeyConverts) INTERNAL: Used for OX mapping.voidsetMapKeyEnumerated(EnumeratedMetadata mapKeyEnumerated) INTERNAL: Used for OX mapping.voidsetMapKeyForeignKey(ForeignKeyMetadata mapKeyForeignKey) INTERNAL: Used for OX mapping.voidsetMapKeyJoinColumns(List<JoinColumnMetadata> mapKeyJoinColumns) INTERNAL: Used for OX mapping.voidsetMapKeyTemporal(TemporalMetadata mapKeyTemporal) INTERNAL: Used for OX mapping.voidsetOrderBy(OrderByMetadata orderBy) INTERNAL: Used for OX mapping.voidsetOrderColumn(OrderColumnMetadata orderColumn) INTERNAL: Used for OX mapping.voidsetTargetClassName(String targetClassName) INTERNAL: Used for OX mapping.voidsetTemporal(TemporalMetadata metadata, boolean isForMapKey) INTERNAL: Set the temporal metadata for this accessor.Methods inherited from class org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.DirectCollectionAccessor
getBatchFetch, getCascadeOnDelete, getCollectionTable, getDefaultCollectionTableName, getDefaultFetchType, getJoinFetch, getNonCacheable, getPrivateOwned, getReferenceDatabaseTable, getValueConverter, isCascadeOnDelete, isDirectCollection, isNonCacheable, isValidDirectCollectionType, isValidDirectMapType, process, processBatchFetch, processDirectCollectionMapping, processDirectMapMapping, setBatchFetch, setCascadeOnDelete, setCollectionTable, setJoinFetch, setNonCacheableMethods inherited from class org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.DirectAccessor
addConvert, getConvert, getConverts, getEnumerated, getFetch, getLob, getLob, getOptional, getTemporal, isOptional, setConverts, setEnumerated, setFetch, setLob, setOptional, setTemporal, usesIndirectionMethods inherited from class org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappingAccessor
addConvertMetadata, addFieldNameTranslation, derivesId, getAnnotation, getAssociationOverrides, getAttributeName, getAttributeOverride, getAttributeOverrides, getAttributeType, getClassAccessor, getConverts, getDatabaseField, getField, getForeignKey, getGetMethodName, getJoinColumns, getJoinColumnsAndValidate, getMapKeyConverts, getMapKeyReferenceClass, getMapKeyReferenceClassName, getMapKeyReferenceClassWithGenerics, getMapping, getOwningDescriptor, getOwningDescriptors, getRawClass, getRawClassWithGenerics, getReferenceAccessors, getReferenceClassFromGeneric, getReferenceClassName, getReferenceClassWithGenerics, getSetMethodName, hasAttributeOverride, hasAttributeType, hasReturnInsert, hasReturnUpdate, initXMLMappingAccessor, isAnnotationPresent, isBasic, isBasicCollection, isBasicMap, isCollectionAccessor, isDerivedIdClass, 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, 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
-
ElementCollectionAccessor
public ElementCollectionAccessor()INTERNAL: Used for OX mapping. -
ElementCollectionAccessor
public ElementCollectionAccessor(MetadataAnnotation elementCollection, MetadataAccessibleObject accessibleObject, ClassAccessor classAccessor) INTERNAL:
-
-
Method Details
-
addAttributeOverride
INTERNAL: -
addAssociationOverride
INTERNAL: -
addMapKeyConvert
INTERNAL: A map key convert from an annotation specification. In XML, this list is populated using the map-key-convert element. In annotations there is only a single Convert annotation and map key converts are identified with an attribute name on the convert beginning with "key".- Overrides:
addMapKeyConvertin classMappingAccessor
-
equals
INTERNAL:- Overrides:
equalsin classDirectCollectionAccessor
-
hashCode
public int hashCode()- Overrides:
hashCodein classDirectCollectionAccessor
-
getAssociationOverrides
INTERNAL: Used for OX mapping. -
getAttributeOverrides
INTERNAL: Used for OX mapping. -
getColumn
INTERNAL: Used for OX mapping. -
getCompositeMember
INTERNAL: Used for OX mapping. -
getColumn
INTERNAL:- Overrides:
getColumnin classMappingAccessor- See Also:
-
getDefaultTableForEntityMapKey
INTERNAL: Return the default table to hold the foreign key of a MapKey when and Entity is used as the MapKey- Overrides:
getDefaultTableForEntityMapKeyin classMappingAccessor
-
getDeleteAll
INTERNAL: Used for OX mapping. -
getEmbeddableAccessor
INTERNAL: -
getEnumerated
INTERNAL: Return the enumerated metadata for this accessor.- Overrides:
getEnumeratedin classDirectAccessor- See Also:
-
getKeyConverter
INTERNAL:- Specified by:
getKeyConverterin classDirectCollectionAccessor
-
getMapKey
INTERNAL: Used for OX mapping.- Specified by:
getMapKeyin interfaceMappedKeyMapAccessor- Overrides:
getMapKeyin classMappingAccessor- See Also:
-
getMapKeyClass
INTERNAL: Return the map key class on this element collection accessor.- Specified by:
getMapKeyClassin interfaceMappedKeyMapAccessor
-
getMapKeyClassWithGenerics
INTERNAL: Future: this method is where we would provide a more explicit reference class to support an auto-apply jpa converter. Per the spec auto-apply converters are applied against basics only.- Specified by:
getMapKeyClassWithGenericsin interfaceMappedKeyMapAccessor
-
getMapKeyAssociationOverrides
INTERNAL: Used for OX mapping.- Specified by:
getMapKeyAssociationOverridesin interfaceMappedKeyMapAccessor
-
getMapKeyAttributeOverrides
INTERNAL: Used for OX mapping.- Specified by:
getMapKeyAttributeOverridesin interfaceMappedKeyMapAccessor
-
getMapKeyClassName
INTERNAL: Used for OX mapping. -
getMapKeyColumn
INTERNAL: Used for OX mapping.- Specified by:
getMapKeyColumnin interfaceMappedKeyMapAccessor
-
getMapKeyConvert
INTERNAL:- Specified by:
getMapKeyConvertin interfaceMappedKeyMapAccessor
-
getMapKeyConverts
INTERNAL: Used for OX mapping.- Specified by:
getMapKeyConvertsin interfaceMappedKeyMapAccessor
-
getMapKeyEnumerated
INTERNAL: Used for OX mapping. -
getMapKeyForeignKey
INTERNAL: Used for OX mapping.- Specified by:
getMapKeyForeignKeyin interfaceMappedKeyMapAccessor
-
getMapKeyJoinColumns
INTERNAL: Used for OX mapping.- Specified by:
getMapKeyJoinColumnsin interfaceMappedKeyMapAccessor
-
getMapKeyTemporal
INTERNAL: Used for OX mapping. -
getOrderBy
INTERNAL: Used for OX mapping. -
getOrderColumn
INTERNAL: Used for OX mapping. -
getReferenceClass
INTERNAL: If a targetEntity 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:
getReferenceClassin classMappingAccessor
-
getReferenceDescriptor
INTERNAL: 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:
getReferenceDescriptorin classDirectCollectionAccessor
-
getTargetClass
INTERNAL: Return the target class for this accessor. -
getTargetClassName
INTERNAL: Used for OX mapping. -
getTemporal
INTERNAL: Return the temporal metadata for this accessor.- Overrides:
getTemporalin classDirectAccessor- See Also:
-
hasEnumerated
public boolean hasEnumerated(boolean isForMapKey) INTERNAL: Return true if this accessor has enumerated metadata.- Overrides:
hasEnumeratedin classDirectAccessor- See Also:
-
hasLob
public boolean hasLob(boolean isForMapKey) INTERNAL: Return true if this accessor has lob metadata.- Overrides:
hasLobin classDirectAccessor- See Also:
-
hasMapKey
public boolean hasMapKey()INTERNAL:- Overrides:
hasMapKeyin classMappingAccessor- See Also:
-
hasMapKeyClass
protected boolean hasMapKeyClass()INTERNAL: Return true if this accessor has a map key class specified.- Overrides:
hasMapKeyClassin classDirectCollectionAccessor- See Also:
-
hasTemporal
public boolean hasTemporal(boolean isForMapKey) INTERNAL: Return true if this accessor has temporal metadata.- Overrides:
hasTemporalin classDirectAccessor- See Also:
-
initXMLObject
public void initXMLObject(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings) INTERNAL:- Overrides:
initXMLObjectin classDirectCollectionAccessor
-
isDeleteAll
public boolean isDeleteAll()INTERNAL: Used by our XML writing facility. Returns false unless m_deleteAll is both set and true -
isDirectEmbeddableCollection
public boolean isDirectEmbeddableCollection()INTERNAL: Return true if this element collection contains embeddable objects.- Overrides:
isDirectEmbeddableCollectionin classMappingAccessor
-
process
public void process()INTERNAL: Process the element collection metadata.- Specified by:
processin classMetadataAccessor
-
processCollectionTable
INTERNAL: Process a MetadataCollectionTable.- Overrides:
processCollectionTablein classDirectCollectionAccessor
-
processDirectEmbeddableCollectionMapping
INTERNAL: -
processMappingValueConverters
INTERNAL: Process convertors registered for collection mapping.- Parameters:
embeddableDescriptor- Metadata descriptor for embedded collection.
-
processMappingsFromEmbeddable
protected void processMappingsFromEmbeddable(MetadataDescriptor embeddableDescriptor, AggregateObjectMapping nestedAggregateObjectMapping, EmbeddableMapping embeddableMapping, Map<String, AttributeOverrideMetadata> attributeOverrides, Map<String, AssociationOverrideMetadata> associationOverrides, String dotNotationName) INTERNAL: -
setAssociationOverrides
INTERNAL: Used for OX mapping. -
setAttributeOverrides
INTERNAL: Used for OX mapping. -
setColumn
INTERNAL: Used for OX mapping. -
setCompositeMember
INTERNAL: Used for OX mapping. -
setDeleteAll
INTERNAL: Used for OX mapping. -
setMapKey
INTERNAL: Used for OX mapping. -
setMapKeyAssociationOverrides
public void setMapKeyAssociationOverrides(List<AssociationOverrideMetadata> mapKeyAssociationOverrides) INTERNAL: Used for OX mapping. -
setMapKeyAttributeOverrides
INTERNAL: Used for OX mapping. -
setMapKeyClass
INTERNAL:- Specified by:
setMapKeyClassin interfaceMappedKeyMapAccessor
-
setMapKeyClassName
INTERNAL: Used for OX mapping. -
setMapKeyColumn
INTERNAL: Used for OX mapping. -
setMapKeyConverts
INTERNAL: Used for OX mapping. -
setMapKeyEnumerated
INTERNAL: Used for OX mapping. -
setMapKeyForeignKey
INTERNAL: Used for OX mapping. -
setMapKeyJoinColumns
INTERNAL: Used for OX mapping. -
setMapKeyTemporal
INTERNAL: Used for OX mapping. -
setTemporal
Description copied from class:MappingAccessorINTERNAL: Set the temporal metadata for this accessor.- Overrides:
setTemporalin classDirectAccessor- See Also:
-
setOrderBy
INTERNAL: Used for OX mapping. -
setOrderColumn
INTERNAL: Used for OX mapping. -
setTargetClassName
INTERNAL: Used for OX mapping.
-