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_NOTATIONFields inherited from class org.eclipse.persistence.internal.jpa.metadata.ORMetadata
m_project -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDirectCollectionAccessor(String xmlElement) INTERNAL:protectedDirectCollectionAccessor(MetadataAnnotation annotation, MetadataAccessibleObject accessibleObject, ClassAccessor classAccessor) INTERNAL: -
Method Summary
Modifier and TypeMethodDescriptionbooleanINTERNAL:INTERNAL: Used for OX mapping.INTERNAL: Used for OX mapping.INTERNAL: Used for OX mapping.protected StringINTERNAL:INTERNAL:INTERNAL: Used for OX mapping.protected abstract StringINTERNAL: Return the converter name for a map key.INTERNAL: Used for OX mapping.INTERNAL: Used for OX mapping.protected DatabaseTableINTERNAL: 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 StringINTERNAL: Return the converter name for a collection value.inthashCode()protected booleanINTERNAL: Return true if this accessor has a map key class specified.voidinitXMLObject(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings) INTERNAL:INTERNAL:booleanINTERNAL: Return true if this accessor represents a direct collection mapping, which include basic collection, basic map and element collection accessors.booleanINTERNAL: Used for OX mapping.protected booleanINTERNAL: Returns true if the given class is a valid basic collection type.protected booleanINTERNAL: Returns true if the given class is a valid basic map type.protected voidprocess(DatabaseMapping mapping) INTERNAL:protected voidprocessBatchFetch(ForeignReferenceMapping mapping) INTERNAL: Set the batch fetch type on the foreign reference mapping.protected voidprocessCollectionTable(CollectionMapping mapping) INTERNAL: Process a MetadataCollectionTable.protected voidINTERNAL:protected voidINTERNAL:voidsetBatchFetch(BatchFetchMetadata batchFetch) INTERNAL: Used for OX mapping.voidsetCascadeOnDelete(Boolean cascadeOnDelete) INTERNAL: Used for OX mapping.voidsetCollectionTable(CollectionTableMetadata collectionTable) INTERNAL: Used for OX mapping.voidsetJoinFetch(String joinFetch) INTERNAL: Used for OX mapping.voidsetNonCacheable(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, usesIndirectionMethods 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, 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, 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, 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
-
DirectCollectionAccessor
INTERNAL: -
DirectCollectionAccessor
protected DirectCollectionAccessor(MetadataAnnotation annotation, MetadataAccessibleObject accessibleObject, ClassAccessor classAccessor) INTERNAL:
-
-
Method Details
-
equals
INTERNAL:- Overrides:
equalsin classDirectAccessor
-
hashCode
public int hashCode()- Overrides:
hashCodein 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:
getDefaultFetchTypein 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:
getReferenceDatabaseTablein 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:
getReferenceDescriptorin 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:
initXMLObjectin 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:
isDirectCollectionin 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.
-