com.univocity.api.entity.custom
Interface WritingProcess

All Superinterfaces:
Closeable, CustomProcess

public interface WritingProcess
extends CustomProcess

A process for writing rows to a CustomDataEntity. Instances of this process must created when CustomDataEntity.prepareToWrite(String[]) is called from user-provided entity implementation

Author:
uniVocity Software Pty Ltd - dev@univocity.com
See Also:
CustomDataEntity, CustomProcess

Method Summary
 ReadingProcess retrieveGeneratedKeys()
          Called by uniVocity after a batch of rows was persisted (using writeNext(Object[])) to read any generated keys produced by the insertion of new rows.
 void writeNext(Object[] data)
          Inserts a row of data into the custom data entity that originated this writing process.
 
Methods inherited from interface com.univocity.api.entity.custom.CustomProcess
close
 

Method Detail

writeNext

void writeNext(Object[] data)
Inserts a row of data into the custom data entity that originated this writing process.

Parameters:
data - a row with values for the fields provided by uniVocity when calling CustomDataEntity.prepareToWrite(String[])

retrieveGeneratedKeys

ReadingProcess retrieveGeneratedKeys()
Called by uniVocity after a batch of rows was persisted (using writeNext(Object[])) to read any generated keys produced by the insertion of new rows.

Returns:
a new instance ReadingProcess for reading auto-generated keys created for each new row, or null if no keys got generated.


Copyright © 2015 uniVocity Software Pty Ltd. All rights reserved.