- java.lang.Object
-
- org.eclipse.persistence.internal.oxm.IDResolver
-
- Direct Known Subclasses:
IDResolver
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);- Since:
- EclipseLink 2.5.0
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedIDResolver()Default constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidbind(Object id, Object obj)Bind the objectobjto the identifierid.abstract voidbind(Map<String,Object> id, Object obj)Bind the objectobjto the composite key information specified in theidMap.voidendDocument()Called when unmarshalling ends.abstract Callable<?>resolve(Object id, Class<?> type)Resolve the object of Classtype, uniquely identified byid.abstract Callable<?>resolve(Map<String,Object> id, Class<?> type)Resolve the object of Classtype, uniquely identified by the composite key information specified in theidMap.voidstartDocument(ErrorHandler errorHandler)Called when unmarshalling begins.
-
-
-
Method Detail
-
resolve
public abstract Callable<?> resolve(Object id, Class<?> type) throws SAXException
Resolve the object of Class
type, uniquely identified byid.- Parameters:
id- TheObjectthat uniquely identifies the object to be found.type- TheClassof the object to be found.- Returns:
- a
Callablethat will return the resolved object. - Throws:
SAXException
-
resolve
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 theidMap.- Parameters:
id- AMapof id values, keyed on the attribute name.type- TheClassof the object to be found.- Returns:
- a
Callablethat will return the resolved object. - Throws:
SAXException
-
bind
public abstract void bind(Object id, Object obj) throws SAXException
Bind the object
objto the identifierid.- Parameters:
id- The idObjectthat uniquely identifies the object to be bound.obj- The object that will be bound to this id.- Throws:
SAXException
-
bind
public abstract void bind(Map<String,Object> id, Object obj) throws SAXException
Bind the object
objto the composite key information specified in theidMap.- Parameters:
id- AMapof id values, keyed on attribute name.obj- The object that will be bound to this id.- Throws:
SAXException
-
startDocument
public void startDocument(ErrorHandler errorHandler) throws SAXException
Called when unmarshalling begins.
- Parameters:
errorHandler- Any errors encountered during the unmarshal process should be reported to this handler.- Throws:
SAXException
-
endDocument
public void endDocument() throws SAXExceptionCalled when unmarshalling ends.
- Throws:
SAXException
-
-