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
public abstract class DirectCollectionAccessor extends DirectAccessor
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
- Author:
- Guy Pelletier
-
-
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
Constructors Modifier Constructor Description protectedDirectCollectionAccessor(java.lang.String xmlElement)INTERNAL:protectedDirectCollectionAccessor(MetadataAnnotation annotation, MetadataAccessibleObject accessibleObject, ClassAccessor classAccessor)INTERNAL:
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object objectToCompare)INTERNAL:BatchFetchMetadatagetBatchFetch()INTERNAL: Used for OX mapping.java.lang.BooleangetCascadeOnDelete()INTERNAL: Used for OX mapping.CollectionTableMetadatagetCollectionTable()INTERNAL: Used for OX mapping.protected java.lang.StringgetDefaultCollectionTableName()INTERNAL:java.lang.StringgetDefaultFetchType()INTERNAL:java.lang.StringgetJoinFetch()INTERNAL: Used for OX mapping.protected abstract java.lang.StringgetKeyConverter()INTERNAL: Return the converter name for a map key.java.lang.BooleangetNonCacheable()INTERNAL: Used for OX mapping.java.lang.StringgetPrivateOwned()INTERNAL: Used for OX mapping.protected org.eclipse.persistence.internal.helper.DatabaseTablegetReferenceDatabaseTable()INTERNAL: The reference table in a direct collection case is the collection table.MetadataDescriptorgetReferenceDescriptor()INTERNAL: In a direct collection case, there is no notion of a reference descriptor, therefore we return this accessors descriptor.protected java.lang.StringgetValueConverter()INTERNAL: Return the converter name for a collection value.inthashCode()protected booleanhasMapKeyClass()INTERNAL: Return true if this accessor has a map key class specified.voidinitXMLObject(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings)INTERNAL:java.lang.BooleanisCascadeOnDelete()INTERNAL:booleanisDirectCollection()INTERNAL: Return true if this accessor represents a direct collection mapping, which include basic collection, basic map and element collection accessors.booleanisNonCacheable()INTERNAL: Used for OX mapping.protected booleanisValidDirectCollectionType()INTERNAL: Returns true if the given class is a valid basic collection type.protected booleanisValidDirectMapType()INTERNAL: Returns true if the given class is a valid basic map type.protected voidprocess(org.eclipse.persistence.mappings.DatabaseMapping mapping)INTERNAL:protected voidprocessBatchFetch(org.eclipse.persistence.mappings.ForeignReferenceMapping mapping)INTERNAL: Set the batch fetch type on the foreign reference mapping.protected voidprocessCollectionTable(org.eclipse.persistence.mappings.CollectionMapping mapping)INTERNAL: Process a MetadataCollectionTable.protected voidprocessDirectCollectionMapping()INTERNAL:protected voidprocessDirectMapMapping()INTERNAL:voidsetBatchFetch(BatchFetchMetadata batchFetch)INTERNAL: Used for OX mapping.voidsetCascadeOnDelete(java.lang.Boolean cascadeOnDelete)INTERNAL: Used for OX mapping.voidsetCollectionTable(CollectionTableMetadata collectionTable)INTERNAL: Used for OX mapping.voidsetJoinFetch(java.lang.String joinFetch)INTERNAL: Used for OX mapping.voidsetNonCacheable(java.lang.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, 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, 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 Detail
-
DirectCollectionAccessor
protected DirectCollectionAccessor(java.lang.String xmlElement)
INTERNAL:
-
DirectCollectionAccessor
protected DirectCollectionAccessor(MetadataAnnotation annotation, MetadataAccessibleObject accessibleObject, ClassAccessor classAccessor)
INTERNAL:
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object objectToCompare)
INTERNAL:- Overrides:
equalsin classDirectAccessor
-
hashCode
public int hashCode()
- Overrides:
hashCodein classDirectAccessor
-
getBatchFetch
public BatchFetchMetadata getBatchFetch()
INTERNAL: Used for OX mapping.
-
getCascadeOnDelete
public java.lang.Boolean getCascadeOnDelete()
INTERNAL: Used for OX mapping.
-
getCollectionTable
public CollectionTableMetadata getCollectionTable()
INTERNAL: Used for OX mapping.
-
getDefaultCollectionTableName
protected java.lang.String getDefaultCollectionTableName()
INTERNAL:
-
getDefaultFetchType
public java.lang.String getDefaultFetchType()
INTERNAL:- Specified by:
getDefaultFetchTypein classDirectAccessor
-
getJoinFetch
public java.lang.String getJoinFetch()
INTERNAL: Used for OX mapping.
-
getPrivateOwned
public java.lang.String getPrivateOwned()
INTERNAL: Used for OX mapping.
-
getReferenceDatabaseTable
protected org.eclipse.persistence.internal.helper.DatabaseTable getReferenceDatabaseTable()
INTERNAL: The reference table in a direct collection case is the collection table.- Overrides:
getReferenceDatabaseTablein classMappingAccessor- See Also:
DirectCollectionAccessor,ManyToManyAccessor
-
getReferenceDescriptor
public MetadataDescriptor 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
protected abstract java.lang.String getKeyConverter()
INTERNAL: Return the converter name for a map key.
-
getNonCacheable
public java.lang.Boolean getNonCacheable()
INTERNAL: Used for OX mapping.
-
getValueConverter
protected java.lang.String getValueConverter()
INTERNAL: Return the converter name for a collection value.
-
hasMapKeyClass
protected boolean hasMapKeyClass()
INTERNAL: Return true if this accessor has a map key class specified.- See Also:
ElementCollectionAccessor
-
initXMLObject
public void initXMLObject(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings)
INTERNAL:- Overrides:
initXMLObjectin classDirectAccessor
-
isCascadeOnDelete
public java.lang.Boolean 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
protected void process(org.eclipse.persistence.mappings.DatabaseMapping mapping)
INTERNAL:
-
processBatchFetch
protected void processBatchFetch(org.eclipse.persistence.mappings.ForeignReferenceMapping mapping)
INTERNAL: Set the batch fetch type on the foreign reference mapping.
-
processCollectionTable
protected void processCollectionTable(org.eclipse.persistence.mappings.CollectionMapping mapping)
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
public void setBatchFetch(BatchFetchMetadata batchFetch)
INTERNAL: Used for OX mapping.
-
setCascadeOnDelete
public void setCascadeOnDelete(java.lang.Boolean cascadeOnDelete)
INTERNAL: Used for OX mapping.
-
setCollectionTable
public void setCollectionTable(CollectionTableMetadata collectionTable)
INTERNAL: Used for OX mapping.
-
setNonCacheable
public void setNonCacheable(java.lang.Boolean nonCacheable)
INTERNAL: Used for OX mapping.
-
setJoinFetch
public void setJoinFetch(java.lang.String joinFetch)
INTERNAL: Used for OX mapping.
-
-