Class BasicCollectionAccessor
- 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.BasicCollectionAccessor
-
- Direct Known Subclasses:
BasicMapAccessor
public class BasicCollectionAccessor extends DirectCollectionAccessor
INTERNAL: A basic collection accessor. 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:
- TopLink 11g
- 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 BasicCollectionAccessor()INTERNAL: Used for OX mapping.protectedBasicCollectionAccessor(java.lang.String xmlElement)INTERNAL:BasicCollectionAccessor(MetadataAnnotation basicCollection, MetadataAccessibleObject accessibleObject, ClassAccessor classAccessor)INTERNAL:
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object objectToCompare)INTERNAL:protected ColumnMetadatagetColumn(java.lang.String loggingCtx)INTERNAL: Method ignores logging context.protected java.lang.StringgetDefaultCollectionTableName()INTERNAL:protected java.lang.StringgetKeyConverter()INTERNAL: A basic collection can not return a key converter value so return null in this case.MetadataClassgetReferenceClass()INTERNAL: Return the reference class for this accessor.MetadataClassgetReferenceClassWithGenerics()INTERNAL: Future: this method is where we would provide a more explicit reference class to support an auto-apply jpa converter.ColumnMetadatagetValueColumn()INTERNAL: Used for OX mapping.inthashCode()voidinitXMLObject(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings)INTERNAL:booleanisBasicCollection()INTERNAL: Return true if this accessor represents a basic collection mapping.voidprocess()INTERNAL:protected voidprocessCollectionTable(org.eclipse.persistence.mappings.CollectionMapping mapping)INTERNAL: Process a MetadataCollectionTable.protected voidsetValueColumn(ColumnMetadata valueColumn)INTERNAL: Used for OX mapping.-
Methods inherited from class org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.DirectCollectionAccessor
getBatchFetch, getCascadeOnDelete, getCollectionTable, getDefaultFetchType, getJoinFetch, getNonCacheable, getPrivateOwned, getReferenceDatabaseTable, getReferenceDescriptor, getValueConverter, hasMapKeyClass, isCascadeOnDelete, isDirectCollection, isNonCacheable, isValidDirectCollectionType, isValidDirectMapType, process, processBatchFetch, processDirectCollectionMapping, processDirectMapMapping, setBatchFetch, setCascadeOnDelete, setCollectionTable, setJoinFetch, setNonCacheable
-
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, getSetMethodName, hasAttributeOverride, hasAttributeType, hasMapKey, hasReturnInsert, hasReturnUpdate, initXMLMappingAccessor, isAnnotationPresent, isBasic, 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, 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
-
BasicCollectionAccessor
public BasicCollectionAccessor()
INTERNAL: Used for OX mapping.
-
BasicCollectionAccessor
protected BasicCollectionAccessor(java.lang.String xmlElement)
INTERNAL:
-
BasicCollectionAccessor
public BasicCollectionAccessor(MetadataAnnotation basicCollection, MetadataAccessibleObject accessibleObject, ClassAccessor classAccessor)
INTERNAL:
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object objectToCompare)
INTERNAL:- Overrides:
equalsin classDirectCollectionAccessor
-
hashCode
public int hashCode()
- Overrides:
hashCodein classDirectCollectionAccessor
-
getColumn
protected ColumnMetadata getColumn(java.lang.String loggingCtx)
INTERNAL: Method ignores logging context. Can't be anything but the value column for a BasicCollection annotation. Used with the BasicMap annotation however.- Overrides:
getColumnin classMappingAccessor- See Also:
BasicAccessor,BasicCollectionAccessor,BasicMapAccessor,ElementCollectionAccessor,CollectionAccessor
-
getDefaultCollectionTableName
protected java.lang.String getDefaultCollectionTableName()
INTERNAL:- Overrides:
getDefaultCollectionTableNamein classDirectCollectionAccessor
-
getKeyConverter
protected java.lang.String getKeyConverter()
INTERNAL: A basic collection can not return a key converter value so return null in this case.- Specified by:
getKeyConverterin classDirectCollectionAccessor
-
getReferenceClass
public MetadataClass getReferenceClass()
INTERNAL: Return the reference class for this accessor. It will try to extract a reference class from a generic specification. If no generics are used, then it will return void.class. This avoids NPE's when processing JPA converters that can default (Enumerated and Temporal) based on the reference class.- Overrides:
getReferenceClassin classMappingAccessor
-
getReferenceClassWithGenerics
public MetadataClass getReferenceClassWithGenerics()
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.- Overrides:
getReferenceClassWithGenericsin classMappingAccessor
-
getValueColumn
public ColumnMetadata getValueColumn()
INTERNAL: Used for OX mapping.
-
initXMLObject
public void initXMLObject(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings)
INTERNAL:- Overrides:
initXMLObjectin classDirectCollectionAccessor
-
isBasicCollection
public boolean isBasicCollection()
INTERNAL: Return true if this accessor represents a basic collection mapping.- Overrides:
isBasicCollectionin classMappingAccessor
-
process
public void process()
INTERNAL:- Specified by:
processin classMetadataAccessor
-
processCollectionTable
protected void processCollectionTable(org.eclipse.persistence.mappings.CollectionMapping mapping)
INTERNAL: Process a MetadataCollectionTable.- Overrides:
processCollectionTablein classDirectCollectionAccessor
-
setValueColumn
protected void setValueColumn(ColumnMetadata valueColumn)
INTERNAL: Used for OX mapping.
-
-