Top Description Fields Constructors Methods
org.eclipse.persistence.internal.jpa.metadata.accessors.mappings

public Class BasicCollectionAccessor

extends DirectCollectionAccessor
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.BasicMapAccessor
Annotations
@SuppressWarnings:deprecation
Imports
org.eclipse.persistence.annotations.CollectionTable, org.eclipse.persistence.exceptions.ValidationException, org.eclipse.persistence.internal.helper.DatabaseField, org.eclipse.persistence.internal.jpa.metadata.MetadataLogger, org.eclipse.persistence.internal.jpa.metadata.accessors.classes.ClassAccessor, org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAccessibleObject, .MetadataAnnotation, .MetadataClass, org.eclipse.persistence.internal.jpa.metadata.columns.ColumnMetadata, .PrimaryKeyJoinColumnMetadata, org.eclipse.persistence.internal.jpa.metadata.tables.CollectionTableMetadata, org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappings, org.eclipse.persistence.mappings.CollectionMapping, .DirectCollectionMapping

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.
Author
Guy Pelletier
Since
TopLink 11g

Field Summary

Modifier and TypeField and Description
private ColumnMetadata

Constructor Summary

AccessConstructor and Description
public
BasicCollectionAccessor()

INTERNAL: Used for OX mapping.

protected
BasicCollectionAccessor(String xmlElement)

INTERNAL:

public
BasicCollectionAccessor(MetadataAnnotation basicCollection, MetadataAccessibleObject accessibleObject, ClassAccessor classAccessor)

INTERNAL:

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
the reference object with which to compare.
objectToCompare
)

Overrides org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.DirectCollectionAccessor.equals.

INTERNAL:
protected ColumnMetadata
protected String
protected String
getKeyConverter()

Implements abstract org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.DirectCollectionAccessor.getKeyConverter.

INTERNAL: A basic collection can not return a key converter value so return null in this case.
public MetadataClass
public MetadataClass
getReferenceClassWithGenerics()

Overrides org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappingAccessor.getReferenceClassWithGenerics.

INTERNAL: Future: this method is where we would provide a more explicit reference class to support an auto-apply jpa converter.
public ColumnMetadata
getValueColumn()

INTERNAL: Used for OX mapping.

public int
public void
public boolean
isBasicCollection()

Overrides org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappingAccessor.isBasicCollection.

INTERNAL: Return true if this accessor represents a basic collection mapping.
public void
protected void
protected void
setValueColumn(ColumnMetadata valueColumn)

INTERNAL: Used for OX mapping.

Inherited from org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.DirectCollectionAccessor:
getBatchFetchgetCascadeOnDeletegetCollectionTablegetDefaultFetchTypegetJoinFetchgetNonCacheablegetPrivateOwnedgetReferenceDatabaseTablegetReferenceDescriptorgetValueConverterhasMapKeyClassisCascadeOnDeleteisDirectCollectionisNonCacheableisValidDirectCollectionTypeisValidDirectMapTypeprocessprocessBatchFetchprocessDirectCollectionMappingprocessDirectMapMappingsetBatchFetchsetCascadeOnDeletesetCollectionTablesetJoinFetchsetNonCacheable

Field Detail

m_valueColumnback to summary
private ColumnMetadata m_valueColumn

Constructor Detail

BasicCollectionAccessorback to summary
public BasicCollectionAccessor()

INTERNAL: Used for OX mapping.

BasicCollectionAccessorback to summary
protected BasicCollectionAccessor(String xmlElement)

INTERNAL:

BasicCollectionAccessorback to summary
public BasicCollectionAccessor(MetadataAnnotation basicCollection, MetadataAccessibleObject accessibleObject, ClassAccessor classAccessor)

INTERNAL:

Method Detail

equalsback to summary
public boolean equals(Object objectToCompare)

Overrides org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.DirectCollectionAccessor.equals.

INTERNAL:

Parameters
objectToCompare:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getColumnback to summary
protected ColumnMetadata getColumn(String loggingCtx)

Overrides org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappingAccessor.getColumn.

INTERNAL: Method ignores logging context. Can't be anything but the value column for a BasicCollection annotation. Used with the BasicMap annotation however.

Annotations
@Override
getDefaultCollectionTableNameback to summary
protected String getDefaultCollectionTableName()

Overrides org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.DirectCollectionAccessor.getDefaultCollectionTableName.

INTERNAL:

Annotations
@Override
getKeyConverterback to summary
protected String getKeyConverter()

Implements abstract org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.DirectCollectionAccessor.getKeyConverter.

INTERNAL: A basic collection can not return a key converter value so return null in this case.

Annotations
@Override
getReferenceClassback to summary
public MetadataClass getReferenceClass()

Overrides org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappingAccessor.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.

Annotations
@Override
getReferenceClassWithGenericsback to summary
public MetadataClass getReferenceClassWithGenerics()

Overrides org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappingAccessor.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.

Annotations
@Override
getValueColumnback to summary
public ColumnMetadata getValueColumn()

INTERNAL: Used for OX mapping.

hashCodeback to summary
public int hashCode()

Overrides org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.DirectCollectionAccessor.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object.

Annotations
@Override
initXMLObjectback to summary
public void initXMLObject(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings)

Overrides org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.DirectCollectionAccessor.initXMLObject.

INTERNAL:

Annotations
@Override
isBasicCollectionback to summary
public boolean isBasicCollection()

Overrides org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappingAccessor.isBasicCollection.

INTERNAL: Return true if this accessor represents a basic collection mapping.

Annotations
@Override
processback to summary
public void process()

Implements abstract org.eclipse.persistence.internal.jpa.metadata.accessors.MetadataAccessor.process.

INTERNAL:

Annotations
@Override
processCollectionTableback to summary
protected void processCollectionTable(CollectionMapping mapping)

Overrides org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.DirectCollectionAccessor.processCollectionTable.

INTERNAL: Process a MetadataCollectionTable.

Annotations
@Override
setValueColumnback to summary
protected void setValueColumn(ColumnMetadata valueColumn)

INTERNAL: Used for OX mapping.