org.eclipse.jpt.jpa.core.context.orm
Interface OrmConverter.Adapter

All Known Implementing Classes:
OrmEnumeratedConverter.Adapter, OrmLobConverter.Adapter, OrmTemporalConverter.Adapter
Enclosing interface:
OrmConverter

public static interface OrmConverter.Adapter

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


Method Summary
 OrmConverter buildConverter(OrmAttributeMapping parent, OrmXmlContextNodeFactory factory)
          Build a converter for specified mapping if the mapping's XML has the adapter's value set.
 OrmConverter buildNewConverter(OrmAttributeMapping parent, OrmXmlContextNodeFactory factory)
          Build a converter for specified mapping.
 void clearXmlValue(XmlConvertibleMapping xmlMapping)
          Clear the adapter's XML value from the specified XML mapping.
 java.lang.Class<? extends Converter> getConverterType()
          Return the type of converter handled by the adapter.
 boolean isActive(XmlConvertibleMapping xmlMapping)
          Return whether the specified XML mapping has the adapter's value set.
 

Method Detail

getConverterType

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


buildConverter

OrmConverter buildConverter(OrmAttributeMapping parent,
                            OrmXmlContextNodeFactory factory)
Build a converter for specified mapping if the mapping's XML has the adapter's value set. Return null otherwise. This is used to build a converter during construction of the converter's mapping.


isActive

boolean isActive(XmlConvertibleMapping xmlMapping)
Return whether the specified XML mapping has the adapter's value set. If the adapter is active and the context mapping's converter does not match the adapter, the mapping will build a new converter (via the adapter).

See Also:
buildNewConverter(OrmAttributeMapping, OrmXmlContextNodeFactory)

buildNewConverter

OrmConverter buildNewConverter(OrmAttributeMapping parent,
                               OrmXmlContextNodeFactory factory)
Build a converter for specified mapping. This is used when the context model is synchronized with the resource model (and the resource model has changed) or when a client changes a mapping's converter. The appropriate setting in the XML mapping will be configured once the context converter has been added to the context model (see OrmConverter.initialize().

See Also:
isActive(XmlConvertibleMapping)

clearXmlValue

void clearXmlValue(XmlConvertibleMapping xmlMapping)
Clear the adapter's XML value from the specified XML mapping.