Module org.eclipse.persistence.jpa
Class DirectCollectionAccessor
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
- Direct Known Subclasses:
BasicCollectionAccessor
,ElementCollectionAccessor
An abstract direct collection accessor.
Used to support DirectCollection, DirectMap, AggregateCollection through
the ElementCollection, BasicCollection and BasicMap 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 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_NOTATION
Fields inherited from class org.eclipse.persistence.internal.jpa.metadata.ORMetadata
m_project
-
Constructor Summary
ModifierConstructorDescriptionprotected
DirectCollectionAccessor
(String xmlElement) INTERNAL:protected
DirectCollectionAccessor
(MetadataAnnotation annotation, MetadataAccessibleObject accessibleObject, ClassAccessor classAccessor) INTERNAL: -
Method Summary
Modifier and TypeMethodDescriptionboolean
INTERNAL:INTERNAL: Used for OX mapping.INTERNAL: Used for OX mapping.INTERNAL: Used for OX mapping.protected String
INTERNAL:INTERNAL:INTERNAL: Used for OX mapping.protected abstract String
INTERNAL: Return the converter name for a map key.INTERNAL: Used for OX mapping.INTERNAL: Used for OX mapping.protected DatabaseTable
INTERNAL: The reference table in a direct collection case is the collection table.INTERNAL: In a direct collection case, there is no notion of a reference descriptor, therefore we return this accessors descriptor.protected String
INTERNAL: Return the converter name for a collection value.int
hashCode()
protected boolean
INTERNAL: Return true if this accessor has a map key class specified.void
initXMLObject
(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings) INTERNAL:INTERNAL:boolean
INTERNAL: Return true if this accessor represents a direct collection mapping, which include basic collection, basic map and element collection accessors.boolean
INTERNAL: Used for OX mapping.protected boolean
INTERNAL: Returns true if the given class is a valid basic collection type.protected boolean
INTERNAL: Returns true if the given class is a valid basic map type.protected void
process
(DatabaseMapping mapping) INTERNAL:protected void
processBatchFetch
(ForeignReferenceMapping mapping) INTERNAL: Set the batch fetch type on the foreign reference mapping.protected void
processCollectionTable
(CollectionMapping mapping) INTERNAL: Process a MetadataCollectionTable.protected void
INTERNAL:protected void
INTERNAL:void
setBatchFetch
(BatchFetchMetadata batchFetch) INTERNAL: Used for OX mapping.void
setCascadeOnDelete
(Boolean cascadeOnDelete) INTERNAL: Used for OX mapping.void
setCollectionTable
(CollectionTableMetadata collectionTable) INTERNAL: Used for OX mapping.void
setJoinFetch
(String joinFetch) INTERNAL: Used for OX mapping.void
setNonCacheable
(Boolean nonCacheable) 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, getColumn, getConverts, getDatabaseField, getDefaultTableForEntityMapKey, getField, getForeignKey, getGetMethodName, getJoinColumns, getJoinColumnsAndValidate, getMapKey, getMapKeyConverts, getMapKeyReferenceClass, getMapKeyReferenceClassName, getMapKeyReferenceClassWithGenerics, getMapping, getOwningDescriptor, getOwningDescriptors, getRawClass, getRawClassWithGenerics, getReferenceAccessors, getReferenceClass, getReferenceClassFromGeneric, getReferenceClassName, getReferenceClassWithGenerics, getSetMethodName, hasAttributeOverride, hasAttributeType, hasMapKey, hasReturnInsert, hasReturnUpdate, initXMLMappingAccessor, isAnnotationPresent, isBasic, isBasicCollection, isBasicMap, isCollectionAccessor, isDerivedIdClass, isDirectEmbeddableCollection, 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, process, 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
-
DirectCollectionAccessor
INTERNAL: -
DirectCollectionAccessor
protected DirectCollectionAccessor(MetadataAnnotation annotation, MetadataAccessibleObject accessibleObject, ClassAccessor classAccessor) INTERNAL:
-
-
Method Details
-
equals
INTERNAL:- Overrides:
equals
in classDirectAccessor
-
hashCode
public int hashCode()- Overrides:
hashCode
in classDirectAccessor
-
getBatchFetch
INTERNAL: Used for OX mapping. -
getCascadeOnDelete
INTERNAL: Used for OX mapping. -
getCollectionTable
INTERNAL: Used for OX mapping. -
getDefaultCollectionTableName
INTERNAL: -
getDefaultFetchType
INTERNAL:- Specified by:
getDefaultFetchType
in classDirectAccessor
-
getJoinFetch
INTERNAL: Used for OX mapping. -
getPrivateOwned
INTERNAL: Used for OX mapping. -
getReferenceDatabaseTable
INTERNAL: The reference table in a direct collection case is the collection table.- Overrides:
getReferenceDatabaseTable
in classMappingAccessor
- See Also:
-
getReferenceDescriptor
INTERNAL: In a direct collection case, there is no notion of a reference descriptor, therefore we return this accessors descriptor.- Overrides:
getReferenceDescriptor
in classMappingAccessor
-
getKeyConverter
INTERNAL: Return the converter name for a map key. -
getNonCacheable
INTERNAL: Used for OX mapping. -
getValueConverter
INTERNAL: Return the converter name for a collection value.- See Also:
-
hasMapKeyClass
protected boolean hasMapKeyClass()INTERNAL: Return true if this accessor has a map key class specified.- See Also:
-
initXMLObject
public void initXMLObject(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings) INTERNAL:- Overrides:
initXMLObject
in classDirectAccessor
-
isCascadeOnDelete
INTERNAL: -
isDirectCollection
public boolean isDirectCollection()INTERNAL: Return true if this accessor represents a direct collection mapping, which include basic collection, basic map and element collection accessors.- Overrides:
isDirectCollection
in classMappingAccessor
-
isNonCacheable
public boolean isNonCacheable()INTERNAL: Used for OX mapping. -
isValidDirectCollectionType
protected boolean isValidDirectCollectionType()INTERNAL: Returns true if the given class is a valid basic collection type. -
isValidDirectMapType
protected boolean isValidDirectMapType()INTERNAL: Returns true if the given class is a valid basic map type. -
process
INTERNAL: -
processBatchFetch
INTERNAL: Set the batch fetch type on the foreign reference mapping. -
processCollectionTable
INTERNAL: Process a MetadataCollectionTable. Sub classes should call this to ensure a table is defaulted. -
processDirectCollectionMapping
protected void processDirectCollectionMapping()INTERNAL: -
processDirectMapMapping
protected void processDirectMapMapping()INTERNAL: -
setBatchFetch
INTERNAL: Used for OX mapping. -
setCascadeOnDelete
INTERNAL: Used for OX mapping. -
setCollectionTable
INTERNAL: Used for OX mapping. -
setNonCacheable
INTERNAL: Used for OX mapping. -
setJoinFetch
INTERNAL: Used for OX mapping.
-