@ParametersAreNonnullByDefault public class DefaultMapperWriter extends AbstractWriter<DataMapper>
Writer that persists data into a DataMapper.target| Constructor and Description |
|---|
DefaultMapperWriter(DataMapper mapper)
Constructs a new
DefaultMapperWriter with the given mapper. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
createElement(ProxyElement element,
boolean ignoreFailure)
Creates an element from the given
element. |
void |
onAttribute(ProxyAttribute attribute,
List<Object> values)
Handles an attribute in the current element.
|
void |
onComplete()
Handles the end of the current task.
|
void |
onInitialize()
Handles the start of a task.
|
void |
onReference(ProxyReference reference,
List<Id> values)
Handles a reference in the current element.
|
void |
onStartElement(ProxyElement element)
Handles the start of an element.
|
onAttribute, onEndElement, onReference, requireEndBeforeFlushpublic DefaultMapperWriter(DataMapper mapper)
DefaultMapperWriter with the given mapper.mapper - the mapper where to write datapublic void onInitialize()
HandlerHandler.onComplete(),
Notifier.notifyInitialize()public void onComplete()
HandlerHandler.onInitialize(),
Notifier.notifyComplete()public void onStartElement(ProxyElement element) throws IOException
HandleronStartElement in interface HandleronStartElement in class AbstractWriter<DataMapper>element - the element of the new elementIOExceptionHandler.onEndElement(),
Notifier.notifyStartElement(ProxyElement)public void onAttribute(ProxyAttribute attribute, List<Object> values)
AbstractWriteronAttribute in class AbstractWriter<DataMapper>attribute - the new attribute, without its valuevalues - the ordered values of the attribute; when the attribute is single-valued, this parameter
is a Collections.singletonList(Object)public void onReference(ProxyReference reference, List<Id> values)
AbstractWriteronReference in class AbstractWriter<DataMapper>reference - the new reference, without its valuevalues - the ordered values of the reference; when the reference is single-valued, this parameter
is a Collections.singletonList(Object)protected void createElement(ProxyElement element, boolean ignoreFailure)
element.element - the information about the new elementignoreFailure - true if the element can be ignored if it is already definedNullPointerException - if the element is nullCopyright © 2013–2019 Atlanmod. All rights reserved.