org.eclipse.jpt.jpa.core.context.java
Interface JavaConverter.Adapter

All Known Implementing Classes:
JavaConverter.AbstractAdapter, JavaEnumeratedConverter.Adapter, JavaLobConverter.Adapter, JavaTemporalConverter.Adapter
Enclosing interface:
JavaConverter

public static interface JavaConverter.Adapter

This interface allows a convertible mapping to interact with various Java converters via the same protocol.


Method Summary
 JavaConverter buildConverter(Annotation converterAnnotation, JavaAttributeMapping parent, JpaFactory factory)
          Build a converter using the specified converter annotation.
 JavaConverter buildConverter(JavaAttributeMapping parent, JpaFactory factory)
          Build a converter corresponding to the specified mapping if the mapping's resource attribute is modified by the adapter's converter annotation.
 JavaConverter buildNewConverter(JavaAttributeMapping parent, JpaFactory factory)
          Build a new converter and, if necessary, its corresponding converter annotation.
 Annotation getConverterAnnotation(JavaResourcePersistentAttribute javaResourcePersistentAttribute)
          Return the adapter's converter annotation for the specified Java resource persistent member.
 java.lang.Class<? extends Converter> getConverterType()
          Return the type of converter handled by the adapter.
 void removeConverterAnnotation(JavaResourcePersistentAttribute javaResourcePersistentAttribute)
          Remove the adapter's converter annotation from the specified Java resource persistent member.
 

Method Detail

getConverterType

java.lang.Class<? extends Converter> getConverterType()
Return the type of converter handled by the adapter.


buildConverter

JavaConverter buildConverter(JavaAttributeMapping parent,
                             JpaFactory factory)
Build a converter corresponding to the specified mapping if the mapping's resource attribute is modified by the adapter's converter annotation. Return null otherwise. This is used to build a converter during construction of the converter's mapping.


getConverterAnnotation

Annotation getConverterAnnotation(JavaResourcePersistentAttribute javaResourcePersistentAttribute)
Return the adapter's converter annotation for the specified Java resource persistent member. Return null if the adapter's converter annotation is missing. The returned converter annotation is compared to the parent's converter's converter annotation while the context model is synchronized with the resource model. If it has changed, the parent will build a new converter (via the adapter).

See Also:
buildConverter(Annotation, JavaAttributeMapping, JpaFactory)

buildConverter

JavaConverter buildConverter(Annotation converterAnnotation,
                             JavaAttributeMapping parent,
                             JpaFactory factory)
Build a converter using the specified converter annotation. This is used when the context model is synchronized with the resource model (and the resource model has changed).

See Also:
getConverterAnnotation(JavaResourcePersistentAttribute)

buildNewConverter

JavaConverter buildNewConverter(JavaAttributeMapping parent,
                                JpaFactory factory)
Build a new converter and, if necessary, its corresponding converter annotation.


removeConverterAnnotation

void removeConverterAnnotation(JavaResourcePersistentAttribute javaResourcePersistentAttribute)
Remove the adapter's converter annotation from the specified Java resource persistent member.