Module org.eclipse.persistence.jpa
Class ConverterAccessor
- java.lang.Object
-
- org.eclipse.persistence.internal.jpa.metadata.ORMetadata
-
- org.eclipse.persistence.internal.jpa.metadata.accessors.classes.ConverterAccessor
-
public class ConverterAccessor extends ORMetadata
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.- Since:
- EclipseLink 2.5
- Author:
- Guy Pelletier
-
-
Field Summary
Fields Modifier and Type Field Description protected MetadataClassattributeClassificationprotected BooleanautoApplyprotected StringclassNameprotected MetadataClassfieldClassification-
Fields inherited from class org.eclipse.persistence.internal.jpa.metadata.ORMetadata
m_project
-
-
Constructor Summary
Constructors Constructor Description ConverterAccessor()INTERNAL: Used for XML loading.ConverterAccessor(MetadataAnnotation converter, MetadataClass metadataClass, MetadataProject project)INTERNAL:
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanautoApply()INTERNAL: Return true if this converter should auto applybooleanequals(Object objectToCompare)INTERNAL: Used for metadata merging.MetadataClassgetAttributeClassification()INTERNAL: Return the type this converter will auto apply to.BooleangetAutoApply()INTERNAL: Used for OX mapping.StringgetClassName()INTERNAL: Used for OX mapping.StringgetIdentifier()INTERNAL: To satisfy the abstract getIdentifier() method from ORMetadata.StringgetJavaClassName()INTERNAL:inthashCode()protected voidinitClassificationClasses(MetadataClass cls)INTERNAL: Do some validation and initialize the attribute converter classficiation classes.voidinitXMLObject(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings)INTERNAL: Any subclass that cares to do any more initialization (e.g.voidmerge(ORMetadata metadata)INTERNAL: Entity level merging details.voidprocess(DatabaseMapping mapping, boolean isForMapKey, String attributeName)INTERNAL: Process this converter for the given mapping.voidprocess(DatabaseMapping mapping, boolean isForMapKey, String attributeName, boolean disableConversion)INTERNAL: Process this converter for the given mapping.voidsetAutoApply(Boolean autoApply)INTERNAL: Used for OX mapping.voidsetClassName(String className)INTERNAL: Used for OX mapping.-
Methods inherited from class org.eclipse.persistence.internal.jpa.metadata.ORMetadata
getAccessibleObject, 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
-
-
-
-
Field Detail
-
className
protected String className
-
autoApply
protected Boolean autoApply
-
attributeClassification
protected MetadataClass attributeClassification
-
fieldClassification
protected MetadataClass fieldClassification
-
-
Constructor Detail
-
ConverterAccessor
public ConverterAccessor()
INTERNAL: Used for XML loading.
-
ConverterAccessor
public ConverterAccessor(MetadataAnnotation converter, MetadataClass metadataClass, MetadataProject project)
INTERNAL:
-
-
Method Detail
-
autoApply
public boolean autoApply()
INTERNAL: Return true if this converter should auto apply
-
equals
public boolean equals(Object objectToCompare)
INTERNAL: Used for metadata merging.- Specified by:
equalsin classORMetadata
-
getAutoApply
public Boolean getAutoApply()
INTERNAL: Used for OX mapping.
-
getAttributeClassification
public MetadataClass getAttributeClassification()
INTERNAL: Return the type this converter will auto apply to.
-
getClassName
public String getClassName()
INTERNAL: Used for OX mapping.
-
getIdentifier
public String getIdentifier()
INTERNAL: To satisfy the abstract getIdentifier() method from ORMetadata.
-
getJavaClassName
public String getJavaClassName()
INTERNAL:
-
initClassificationClasses
protected void initClassificationClasses(MetadataClass cls)
INTERNAL: Do some validation and initialize the attribute converter classficiation classes.
-
initXMLObject
public void initXMLObject(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings)
INTERNAL: Any subclass that cares to do any more initialization (e.g. initialize a class) should override this method.- Overrides:
initXMLObjectin classORMetadata
-
merge
public void merge(ORMetadata metadata)
INTERNAL: Entity level merging details.- Overrides:
mergein classORMetadata
-
process
public void process(DatabaseMapping mapping, boolean isForMapKey, String attributeName)
INTERNAL: Process this converter for the given mapping.
-
process
public void process(DatabaseMapping mapping, boolean isForMapKey, String attributeName, boolean disableConversion)
INTERNAL: Process this converter for the given mapping.
-
setAutoApply
public void setAutoApply(Boolean autoApply)
INTERNAL: Used for OX mapping.
-
setClassName
public void setClassName(String className)
INTERNAL: Used for OX mapping.
-
-