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

public Class BasicMapAccessor

extends BasicCollectionAccessor
Class Inheritance
Imports
org.eclipse.persistence.exceptions.ValidationException, 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, org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappings

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
private String
private String

Constructor Summary

AccessConstructor and Description
public
BasicMapAccessor()

INTERNAL: Used for OX mapping.

public
BasicMapAccessor(MetadataAnnotation basicMap, 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.BasicCollectionAccessor.equals.

INTERNAL:
protected ColumnMetadata
protected String
public ColumnMetadata
getKeyColumn()

INTERNAL: Used for OX mapping.

public String
public MetadataClass
public String
public int
public boolean
hasMapKey()

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

INTERNAL: For all intent and purpose a basic map accessor always uses a map key.
public void
public boolean
isBasicMap()

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

INTERNAL: Return true if this accessor represents a basic map mapping.
public void
process()

Overrides org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.BasicCollectionAccessor.process.

INTERNAL: The processing of JPA converters for a basic map has been disabled, since we will not know which part of the map (key or value) to apply the JPA converter.
public void
setKeyColumn(ColumnMetadata keyColumn)

INTERNAL: Used for OX mapping.

public void
setKeyConverter(String keyConverter)

INTERNAL: Used for OX mapping.

public void
setValueConverter(String valueConverter)

INTERNAL: Used for OX mapping.

Inherited from org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.BasicCollectionAccessor:
getReferenceClassWithGenericsgetValueColumnisBasicCollectionprocessCollectionTablesetValueColumn

Field Detail

m_keyColumnback to summary
private ColumnMetadata m_keyColumn
m_keyConverterback to summary
private String m_keyConverter
m_valueConverterback to summary
private String m_valueConverter

Constructor Detail

BasicMapAccessorback to summary
public BasicMapAccessor()

INTERNAL: Used for OX mapping.

BasicMapAccessorback to summary
public BasicMapAccessor(MetadataAnnotation basicMap, MetadataAccessibleObject accessibleObject, ClassAccessor classAccessor)

INTERNAL:

Method Detail

equalsback to summary
public boolean equals(Object objectToCompare)

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

INTERNAL:

Annotations
@Override
getDefaultCollectionTableNameback to summary
protected String getDefaultCollectionTableName()

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

INTERNAL:

Annotations
@Override
getKeyColumnback to summary
public ColumnMetadata getKeyColumn()

INTERNAL: Used for OX mapping.

getKeyConverterback to summary
public String getKeyConverter()

Overrides org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.BasicCollectionAccessor.getKeyConverter.

INTERNAL: Used for OX mapping.

Annotations
@Override
getReferenceClassback to summary
public MetadataClass getReferenceClass()

Overrides org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.BasicCollectionAccessor.getReferenceClass.

INTERNAL: Return the reference class for this accessor.

Annotations
@Override
getValueConverterback to summary
public String getValueConverter()

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

INTERNAL: Used for OX mapping.

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.BasicCollectionAccessor.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
hasMapKeyback to summary
public boolean hasMapKey()

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

INTERNAL: For all intent and purpose a basic map accessor always uses a map key. It is used to correctly set the indirection policy. This method is kinda overkill to make sure isMappedKeyMapAccessor returns false for BasicMapAccessors.

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

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

INTERNAL:

Annotations
@Override
isBasicMapback to summary
public boolean isBasicMap()

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

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

Annotations
@Override
processback to summary
public void process()

Overrides org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.BasicCollectionAccessor.process.

INTERNAL: The processing of JPA converters for a basic map has been disabled, since we will not know which part of the map (key or value) to apply the JPA converter. See isLob, isTemporal and isEnumerated calls for log warning details.

Annotations
@Override
setKeyColumnback to summary
public void setKeyColumn(ColumnMetadata keyColumn)

INTERNAL: Used for OX mapping.

setKeyConverterback to summary
public void setKeyConverter(String keyConverter)

INTERNAL: Used for OX mapping.

setValueConverterback to summary
public void setValueConverter(String valueConverter)

INTERNAL: Used for OX mapping.