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

public Class ConverterAccessor

extends ORMetadata
Class Inheritance
Imports
java.util.List, jakarta.persistence.AttributeConverter, org.eclipse.persistence.exceptions.ValidationException, org.eclipse.persistence.internal.jpa.metadata.MetadataProject, .ORMetadata, org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAccessibleObject, .MetadataAnnotation, .MetadataClass, org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappings, org.eclipse.persistence.mappings.AggregateCollectionMapping, .AggregateObjectMapping, .DatabaseMapping, .DirectCollectionMapping, .DirectMapMapping, org.eclipse.persistence.mappings.converters.ConverterClass, org.eclipse.persistence.mappings.foundation.AbstractDirectMapping

Object to represent a converter class. 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 2.5

Field Summary

Modifier and TypeField and Description
protected MetadataClass
protected Boolean
protected String
protected MetadataClass
Inherited from org.eclipse.persistence.internal.jpa.metadata.ORMetadata:
m_project

Constructor Summary

AccessConstructor and Description
public
ConverterAccessor()

INTERNAL: Used for XML loading.

public
ConverterAccessor(MetadataAnnotation converter, MetadataClass metadataClass, MetadataProject project)

INTERNAL:

Method Summary

Modifier and TypeMethod and Description
public boolean
autoApply()

INTERNAL: Return true if this converter should auto apply

public boolean
equals(Object
the reference object with which to compare.
objectToCompare
)

Implements abstract org.eclipse.persistence.internal.jpa.metadata.ORMetadata.equals.

INTERNAL: Used for metadata merging.
public MetadataClass
getAttributeClassification()

INTERNAL: Return the type this converter will auto apply to.

public Boolean
getAutoApply()

INTERNAL: Used for OX mapping.

public String
getClassName()

INTERNAL: Used for OX mapping.

public String
getIdentifier()

Overrides org.eclipse.persistence.internal.jpa.metadata.ORMetadata.getIdentifier.

INTERNAL: To satisfy the abstract getIdentifier() method from ORMetadata.
public String
getJavaClassName()

INTERNAL:

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object.
protected void
initClassificationClasses(MetadataClass cls)

INTERNAL: Do some validation and initialize the attribute converter classficiation classes.

public void
initXMLObject(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings)

Overrides org.eclipse.persistence.internal.jpa.metadata.ORMetadata.initXMLObject.

INTERNAL: Any subclass that cares to do any more initialization (e.g. initialize a class) should override this method.
public void
merge(ORMetadata metadata)

Overrides org.eclipse.persistence.internal.jpa.metadata.ORMetadata.merge.

INTERNAL: Entity level merging details.
public void
process(DatabaseMapping mapping, boolean isForMapKey, String attributeName)

INTERNAL: Process this converter for the given mapping.

public void
process(DatabaseMapping mapping, boolean isForMapKey, String attributeName, boolean disableConversion)

INTERNAL: Process this converter for the given mapping.

public void
setAutoApply(Boolean autoApply)

INTERNAL: Used for OX mapping.

public void
setClassName(String className)

INTERNAL: Used for OX mapping.

Inherited from org.eclipse.persistence.internal.jpa.metadata.ORMetadata:
getAccessibleObjectgetAccessibleObjectNamegetAnnotationgetBoxedTypegetDatabaseTypeEnumgetEntityMappingsgetFullyQualifiedClassNamegetJavaClassgetJavaClassNamegetLoadergetLocationgetLoggergetMetadataClassgetMetadataClassgetMetadataClassgetMetadataFactorygetNamegetPrimitiveClassForNamegetProjectgetTextgetXMLElementhasIdentifierhasTextinitXMLClassNameinitXMLObjectinitXMLObjectsinitXMLTextObjectloadedFromAnnotationloadedFromEclipseLinkXMLloadedFromXMLmergeORObjectListsmergeORObjectsmergeSimpleObjectsreloadEntityreloadMappedSuperclasssetAccessibleObjectsetEntityMappingssetFieldNamesetFieldNamesetProjectshouldOverridevaluesMatchvaluesMatch

Field Detail

attributeClassificationback to summary
protected MetadataClass attributeClassification
autoApplyback to summary
protected Boolean autoApply
classNameback to summary
protected String className
fieldClassificationback to summary
protected MetadataClass fieldClassification

Constructor Detail

ConverterAccessorback to summary
public ConverterAccessor()

INTERNAL: Used for XML loading.

ConverterAccessorback to summary
public ConverterAccessor(MetadataAnnotation converter, MetadataClass metadataClass, MetadataProject project)

INTERNAL:

Method Detail

autoApplyback to summary
public boolean autoApply()

INTERNAL: Return true if this converter should auto apply

equalsback to summary
public boolean equals(Object objectToCompare)

Implements abstract org.eclipse.persistence.internal.jpa.metadata.ORMetadata.equals.

INTERNAL: Used for metadata merging.

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
getAttributeClassificationback to summary
public MetadataClass getAttributeClassification()

INTERNAL: Return the type this converter will auto apply to.

getAutoApplyback to summary
public Boolean getAutoApply()

INTERNAL: Used for OX mapping.

getClassNameback to summary
public String getClassName()

INTERNAL: Used for OX mapping.

getIdentifierback to summary
public String getIdentifier()

Overrides org.eclipse.persistence.internal.jpa.metadata.ORMetadata.getIdentifier.

INTERNAL: To satisfy the abstract getIdentifier() method from ORMetadata.

Annotations
@Override
getJavaClassNameback to summary
public String getJavaClassName()

INTERNAL:

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.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
initClassificationClassesback to summary
protected void initClassificationClasses(MetadataClass cls)

INTERNAL: Do some validation and initialize the attribute converter classficiation classes.

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

Overrides org.eclipse.persistence.internal.jpa.metadata.ORMetadata.initXMLObject.

INTERNAL: Any subclass that cares to do any more initialization (e.g. initialize a class) should override this method.

Annotations
@Override
mergeback to summary
public void merge(ORMetadata metadata)

Overrides org.eclipse.persistence.internal.jpa.metadata.ORMetadata.merge.

INTERNAL: Entity level merging details.

Annotations
@Override
processback to summary
public void process(DatabaseMapping mapping, boolean isForMapKey, String attributeName)

INTERNAL: Process this converter for the given mapping.

processback to summary
public void process(DatabaseMapping mapping, boolean isForMapKey, String attributeName, boolean disableConversion)

INTERNAL: Process this converter for the given mapping.

setAutoApplyback to summary
public void setAutoApply(Boolean autoApply)

INTERNAL: Used for OX mapping.

setClassNameback to summary
public void setClassName(String className)

INTERNAL: Used for OX mapping.