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

public abstract Class DirectCollectionAccessor

extends DirectAccessor
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.ElementCollectionAccessor, org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.BasicCollectionAccessor
Imports
org.eclipse.persistence.annotations.BatchFetch, .CascadeOnDelete, .JoinFetch, .Noncacheable, org.eclipse.persistence.internal.helper.DatabaseTable, org.eclipse.persistence.internal.jpa.metadata.MetadataDescriptor, .MetadataLogger, org.eclipse.persistence.internal.jpa.metadata.accessors.classes.ClassAccessor, org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAccessibleObject, .MetadataAnnotation, org.eclipse.persistence.internal.jpa.metadata.mappings.BatchFetchMetadata, org.eclipse.persistence.internal.jpa.metadata.tables.CollectionTableMetadata, org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappings, org.eclipse.persistence.mappings.AggregateCollectionMapping, .AggregateMapping, .CollectionMapping, .ContainerMapping, .DatabaseMapping, .DirectCollectionMapping, .DirectMapMapping, .ForeignReferenceMapping, org.eclipse.persistence.mappings.foundation.AbstractCompositeDirectCollectionMapping

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.
Author
Guy Pelletier
Since
EclipseLink 1.2

Field Summary

Modifier and TypeField and Description
private BatchFetchMetadata
private Boolean
private CollectionTableMetadata
private String
private Boolean

Constructor Summary

AccessConstructor and Description
protected
DirectCollectionAccessor(String xmlElement)

INTERNAL:

protected
DirectCollectionAccessor(MetadataAnnotation annotation, 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.DirectAccessor.equals.

INTERNAL:
public BatchFetchMetadata
getBatchFetch()

INTERNAL: Used for OX mapping.

public Boolean
getCascadeOnDelete()

INTERNAL: Used for OX mapping.

public CollectionTableMetadata
getCollectionTable()

INTERNAL: Used for OX mapping.

protected String
public String
public String
getJoinFetch()

INTERNAL: Used for OX mapping.

protected abstract String
getKeyConverter()

INTERNAL: Return the converter name for a map key.

public Boolean
getNonCacheable()

INTERNAL: Used for OX mapping.

public String
getPrivateOwned()

INTERNAL: Used for OX mapping.

protected DatabaseTable
getReferenceDatabaseTable()

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

INTERNAL: The reference table in a direct collection case is the collection table.
public MetadataDescriptor
getReferenceDescriptor()

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

INTERNAL: In a direct collection case, there is no notion of a reference descriptor, therefore we return this accessors descriptor.
protected String
getValueConverter()

INTERNAL: Return the converter name for a collection value.

public int
protected boolean
hasMapKeyClass()

INTERNAL: Return true if this accessor has a map key class specified.

public void
public Boolean
isCascadeOnDelete()

INTERNAL:

public boolean
isDirectCollection()

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

INTERNAL: Return true if this accessor represents a direct collection mapping, which include basic collection, basic map and element collection accessors.
public boolean
isNonCacheable()

INTERNAL: Used for OX mapping.

protected boolean
isValidDirectCollectionType()

INTERNAL: Returns true if the given class is a valid basic collection type.

protected boolean
isValidDirectMapType()

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
protected void
public void
setBatchFetch(BatchFetchMetadata batchFetch)

INTERNAL: Used for OX mapping.

public void
setCascadeOnDelete(Boolean cascadeOnDelete)

INTERNAL: Used for OX mapping.

public void
setCollectionTable(CollectionTableMetadata collectionTable)

INTERNAL: Used for OX mapping.

public void
setJoinFetch(String joinFetch)

INTERNAL: Used for OX mapping.

public void
setNonCacheable(Boolean nonCacheable)

INTERNAL: Used for OX mapping.

Inherited from org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.DirectAccessor:
addConvertgetConvertgetConvertsgetEnumeratedgetEnumeratedgetFetchgetLobgetLobgetOptionalgetTemporalgetTemporalhasEnumeratedhasLobhasTemporalisOptionalsetConvertssetEnumeratedsetFetchsetLobsetOptionalsetTemporalsetTemporalusesIndirection

Field Detail

m_batchFetchback to summary
private BatchFetchMetadata m_batchFetch
m_cascadeOnDeleteback to summary
private Boolean m_cascadeOnDelete
m_collectionTableback to summary
private CollectionTableMetadata m_collectionTable
m_joinFetchback to summary
private String m_joinFetch
m_nonCacheableback to summary
private Boolean m_nonCacheable

Constructor Detail

DirectCollectionAccessorback to summary
protected DirectCollectionAccessor(String xmlElement)

INTERNAL:

DirectCollectionAccessorback to summary
protected DirectCollectionAccessor(MetadataAnnotation annotation, MetadataAccessibleObject accessibleObject, ClassAccessor classAccessor)

INTERNAL:

Method Detail

equalsback to summary
public boolean equals(Object objectToCompare)

Overrides org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.DirectAccessor.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
getBatchFetchback to summary
public BatchFetchMetadata getBatchFetch()

INTERNAL: Used for OX mapping.

getCascadeOnDeleteback to summary
public Boolean getCascadeOnDelete()

INTERNAL: Used for OX mapping.

getCollectionTableback to summary
public CollectionTableMetadata getCollectionTable()

INTERNAL: Used for OX mapping.

getDefaultCollectionTableNameback to summary
protected String getDefaultCollectionTableName()

INTERNAL:

getDefaultFetchTypeback to summary
public String getDefaultFetchType()

Implements abstract org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.DirectAccessor.getDefaultFetchType.

INTERNAL:

Annotations
@Override
getJoinFetchback to summary
public String getJoinFetch()

INTERNAL: Used for OX mapping.

getKeyConverterback to summary
protected abstract String getKeyConverter()

INTERNAL: Return the converter name for a map key.

getNonCacheableback to summary
public Boolean getNonCacheable()

INTERNAL: Used for OX mapping.

getPrivateOwnedback to summary
public String getPrivateOwned()

INTERNAL: Used for OX mapping.

getReferenceDatabaseTableback to summary
protected DatabaseTable getReferenceDatabaseTable()

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

INTERNAL: The reference table in a direct collection case is the collection table.

Annotations
@Override
getReferenceDescriptorback to summary
public MetadataDescriptor getReferenceDescriptor()

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

INTERNAL: In a direct collection case, there is no notion of a reference descriptor, therefore we return this accessors descriptor.

Annotations
@Override
getValueConverterback to summary
protected String getValueConverter()

INTERNAL: Return the converter name for a collection value.

See Also
{@link BasicMapAccessor} for override details. An EclipseLink BasicMapAccessor can specify a value converter within the BasicMap metadata. Otherwise for all other cases, BasicCollectionAccessor and ElementCollectionAccessor, the value converter is returned from a Convert metadata specification.
hashCodeback to summary
public int hashCode()

Overrides org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.DirectAccessor.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
hasMapKeyClassback to summary
protected boolean hasMapKeyClass()

INTERNAL: Return true if this accessor has a map key class specified.

See Also
ElementCollectionAccessor
initXMLObjectback to summary
public void initXMLObject(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings)

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

INTERNAL:

Annotations
@Override
isCascadeOnDeleteback to summary
public Boolean isCascadeOnDelete()

INTERNAL:

isDirectCollectionback to summary
public boolean isDirectCollection()

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

INTERNAL: Return true if this accessor represents a direct collection mapping, which include basic collection, basic map and element collection accessors.

Annotations
@Override
isNonCacheableback to summary
public boolean isNonCacheable()

INTERNAL: Used for OX mapping.

isValidDirectCollectionTypeback to summary
protected boolean isValidDirectCollectionType()

INTERNAL: Returns true if the given class is a valid basic collection type.

isValidDirectMapTypeback to summary
protected boolean isValidDirectMapType()

INTERNAL: Returns true if the given class is a valid basic map type.

processback to summary
protected void process(DatabaseMapping mapping)

INTERNAL:

processBatchFetchback to summary
protected void processBatchFetch(ForeignReferenceMapping mapping)

INTERNAL: Set the batch fetch type on the foreign reference mapping.

processCollectionTableback to summary
protected void processCollectionTable(CollectionMapping mapping)

INTERNAL: Process a MetadataCollectionTable. Sub classes should call this to ensure a table is defaulted.

processDirectCollectionMappingback to summary
protected void processDirectCollectionMapping()

INTERNAL:

processDirectMapMappingback to summary
protected void processDirectMapMapping()

INTERNAL:

setBatchFetchback to summary
public void setBatchFetch(BatchFetchMetadata batchFetch)

INTERNAL: Used for OX mapping.

setCascadeOnDeleteback to summary
public void setCascadeOnDelete(Boolean cascadeOnDelete)

INTERNAL: Used for OX mapping.

setCollectionTableback to summary
public void setCollectionTable(CollectionTableMetadata collectionTable)

INTERNAL: Used for OX mapping.

setJoinFetchback to summary
public void setJoinFetch(String joinFetch)

INTERNAL: Used for OX mapping.

setNonCacheableback to summary
public void setNonCacheable(Boolean nonCacheable)

INTERNAL: Used for OX mapping.