Top Description Constructors Methods
org.eclipse.persistence.internal.oxm

public abstract Class IDResolver

extends Object
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.oxm.IDResolver
Imports
java.util.Map, java.util.concurrent.Callable, org.xml.sax.ErrorHandler, .SAXException

IDResolver can be subclassed to allow customization of the ID/IDREF processing of Unmarshaller. A custom IDResolver can be specified on the Unmarshaller as follows:

IDResolver customResolver = new MyIDResolver(); unmarshaller.setIDResolver(customResolver);

Since
EclipseLink 2.5.0

Constructor Summary

AccessConstructor and Description
protected
IDResolver()

Default constructor.

Method Summary

Modifier and TypeMethod and Description
public abstract void
bind(Object
The id Object that uniquely identifies the object to be bound.
id
,
Object
The object that will be bound to this id.
obj
)

Bind the object obj to the identifier id.

public abstract void
bind(Map<String, Object>
A Map of id values, keyed on attribute name.
id
,
Object
The object that will be bound to this id.
obj
)

Bind the object obj to the composite key information specified in the id Map.

public void
endDocument()

Called when unmarshalling ends.

public abstract Callable<?>

Returns:

a Callable that will return the resolved object.
resolve
(Object
The Object that uniquely identifies the object to be found.
id
,
Class<?>
The Class of the object to be found.
type
)

Resolve the object of Class type, uniquely identified by id.

public abstract Callable<?>

Returns:

a Callable that will return the resolved object.
resolve
(Map<String, Object>
A Map of id values, keyed on the attribute name.
id
,
Class<?>
The Class of the object to be found.
type
)

Resolve the object of Class type, uniquely identified by the composite key information specified in the id Map.

public void
startDocument(ErrorHandler
Any errors encountered during the unmarshal process should be reported to this handler.
errorHandler
)

Called when unmarshalling begins.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

IDResolverback to summary
protected IDResolver()

Default constructor.

Method Detail

bindback to summary
public abstract void bind(Object id, Object obj) throws SAXException

Bind the object obj to the identifier id.

Parameters
id:Object

The id Object that uniquely identifies the object to be bound.

obj:Object

The object that will be bound to this id.

bindback to summary
public abstract void bind(Map<String, Object> id, Object obj) throws SAXException

Bind the object obj to the composite key information specified in the id Map.

Parameters
id:Map<String, Object>

A Map of id values, keyed on attribute name.

obj:Object

The object that will be bound to this id.

endDocumentback to summary
public void endDocument() throws SAXException

Called when unmarshalling ends.

resolveback to summary
public abstract Callable<?> resolve(Object id, Class<?> type) throws SAXException

Resolve the object of Class type, uniquely identified by id.

Parameters
id:Object

The Object that uniquely identifies the object to be found.

type:Class<?>

The Class of the object to be found.

Returns:Callable<?>

a Callable that will return the resolved object.

resolveback to summary
public abstract Callable<?> resolve(Map<String, Object> id, Class<?> type) throws SAXException

Resolve the object of Class type, uniquely identified by the composite key information specified in the id Map.

Parameters
id:Map<String, Object>

A Map of id values, keyed on the attribute name.

type:Class<?>

The Class of the object to be found.

Returns:Callable<?>

a Callable that will return the resolved object.

startDocumentback to summary
public void startDocument(ErrorHandler errorHandler) throws SAXException

Called when unmarshalling begins.

Parameters
errorHandler:ErrorHandler

Any errors encountered during the unmarshal process should be reported to this handler.