Class IDResolver
- java.lang.Object
-
- org.eclipse.persistence.internal.oxm.IDResolver
-
- Direct Known Subclasses:
IDResolver
public abstract class IDResolver extends java.lang.ObjectIDResolver 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 Constructor Description IDResolver()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidbind(java.lang.Object id, java.lang.Object obj)Bind the object obj to the identifier id.abstract voidbind(java.util.Map<java.lang.String,java.lang.Object> id, java.lang.Object obj)Bind the object obj to the composite key information specified in the id Map.voidendDocument()Called when unmarshalling ends.abstract java.util.concurrent.Callable<?>resolve(java.lang.Object id, java.lang.Class type)Resolve the object of Class type, uniquely identified by id.abstract java.util.concurrent.Callable<?>resolve(java.util.Map<java.lang.String,java.lang.Object> id, java.lang.Class type)Resolve the object of Class type, uniquely identified by the composite key information specified in the id Map.voidstartDocument(org.xml.sax.ErrorHandler errorHandler)Called when unmarshalling begins.
-
-
-
Method Detail
-
resolve
public abstract java.util.concurrent.Callable<?> resolve(java.lang.Object id, java.lang.Class type) throws org.xml.sax.SAXExceptionResolve the object of Class type, uniquely identified by id.
- Parameters:
id- The Object that uniquely identifies the object to be found.type- The Class of the object to be found.- Returns:
- a Callable that will return the resolved object.
- Throws:
org.xml.sax.SAXException
-
resolve
public abstract java.util.concurrent.Callable<?> resolve(java.util.Map<java.lang.String,java.lang.Object> id, java.lang.Class type) throws org.xml.sax.SAXExceptionResolve the object of Class type, uniquely identified by the composite key information specified in the id Map.
- Parameters:
id- A Map of id values, keyed on the attribute name.type- The Class of the object to be found.- Returns:
- a Callable that will return the resolved object.
- Throws:
org.xml.sax.SAXException
-
bind
public abstract void bind(java.lang.Object id, java.lang.Object obj) throws org.xml.sax.SAXExceptionBind the object obj to the identifier id.
- Parameters:
id- The id Object that uniquely identifies the object to be bound.obj- The object that will be bound to this id.- Throws:
org.xml.sax.SAXException
-
bind
public abstract void bind(java.util.Map<java.lang.String,java.lang.Object> id, java.lang.Object obj) throws org.xml.sax.SAXExceptionBind the object obj to the composite key information specified in the id Map.
- Parameters:
id- A Map of id values, keyed on attribute name.obj- The object that will be bound to this id.- Throws:
org.xml.sax.SAXException
-
startDocument
public void startDocument(org.xml.sax.ErrorHandler errorHandler) throws org.xml.sax.SAXExceptionCalled when unmarshalling begins.
- Parameters:
errorHandler- Any errors encountered during the unmarshal process should be reported to this handler.- Throws:
org.xml.sax.SAXException
-
endDocument
public void endDocument() throws org.xml.sax.SAXExceptionCalled when unmarshalling ends.
- Throws:
org.xml.sax.SAXException
-
-