org.eclipse.jpt.jpa.core.context.orm
Class OrmTemporalConverter.Adapter

java.lang.Object
  extended by org.eclipse.jpt.jpa.core.context.orm.OrmTemporalConverter.Adapter
All Implemented Interfaces:
OrmConverter.Adapter
Enclosing interface:
OrmTemporalConverter

public static class OrmTemporalConverter.Adapter
extends java.lang.Object
implements OrmConverter.Adapter


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.
static OrmTemporalConverter.Adapter instance()
           
 boolean isActive(XmlConvertibleMapping xmlMapping)
          Return whether the specified XML mapping has the adapter's value set.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

instance

public static OrmTemporalConverter.Adapter instance()

getConverterType

public java.lang.Class<? extends Converter> getConverterType()
Description copied from interface: OrmConverter.Adapter
Return the type of converter handled by the adapter.

Specified by:
getConverterType in interface OrmConverter.Adapter

buildConverter

public OrmConverter buildConverter(OrmAttributeMapping parent,
                                   OrmXmlContextNodeFactory factory)
Description copied from interface: OrmConverter.Adapter
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.

Specified by:
buildConverter in interface OrmConverter.Adapter

isActive

public boolean isActive(XmlConvertibleMapping xmlMapping)
Description copied from interface: OrmConverter.Adapter
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).

Specified by:
isActive in interface OrmConverter.Adapter
See Also:
OrmConverter.Adapter.buildNewConverter(OrmAttributeMapping, OrmXmlContextNodeFactory)

buildNewConverter

public OrmConverter buildNewConverter(OrmAttributeMapping parent,
                                      OrmXmlContextNodeFactory factory)
Description copied from interface: OrmConverter.Adapter
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().

Specified by:
buildNewConverter in interface OrmConverter.Adapter
See Also:
OrmConverter.Adapter.isActive(XmlConvertibleMapping)

clearXmlValue

public void clearXmlValue(XmlConvertibleMapping xmlMapping)
Description copied from interface: OrmConverter.Adapter
Clear the adapter's XML value from the specified XML mapping.

Specified by:
clearXmlValue in interface OrmConverter.Adapter