public abstract class IDResolver extends Object
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);
| Constructor and Description |
|---|
IDResolver() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
bind(Map<String,Object> id,
Object obj)
Bind the object obj to the composite key information specified in the id Map.
|
abstract void |
bind(Object id,
Object obj)
Bind the object obj to the identifier id.
|
void |
endDocument()
Called when unmarshalling ends.
|
abstract Callable<?> |
resolve(Map<String,Object> id,
Class type)
Resolve the object of Class type, uniquely identified by the composite key information specified in the id Map.
|
abstract Callable<?> |
resolve(Object id,
Class type)
Resolve the object of Class type, uniquely identified by id.
|
void |
startDocument(ErrorHandler errorHandler)
Called when unmarshalling begins.
|
public abstract Callable<?> resolve(Object id, Class type) throws SAXException
Resolve the object of Class type, uniquely identified by id.
id - The Object that uniquely identifies the object to be found.type - The Class of the object to be found.SAXExceptionpublic 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.
id - A Map of id values, keyed on the attribute name.type - The Class of the object to be found.SAXExceptionpublic abstract void bind(Object id, Object obj) throws SAXException
Bind the object obj to the identifier id.
id - The id Object that uniquely identifies the object to be bound.obj - The object that will be bound to this id.SAXExceptionpublic 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.
id - A Map of id values, keyed on attribute name.obj - The object that will be bound to this id.SAXExceptionpublic void startDocument(ErrorHandler errorHandler) throws SAXException
Called when unmarshalling begins.
errorHandler - Any errors encountered during the unmarshal process should be reported to this handler.SAXExceptionpublic void endDocument()
throws SAXException
Called when unmarshalling ends.
SAXExceptionEclipseLink 2.6.3, "build v20160428-59c81c5" API Reference