Using the SingleRecordImporter API
Using the SingleRecordImporter API
These APIs are used as part of DataTransferByRecordJob and have been redesigned for Data Transfer Manager.These APIs are designed for use cases that need to process one record at a time.
The SingleRecordImporter API returns true if the transfer in succeeds, and false otherwise.
3.1. CONSTRUCTOR
SingleRecordImporter(java.lang.String tableName,
boolean importDocuments,
boolean generateLogs,
boolean continueIfErrorExists,
boolean compareOnly,
com.archibus.ext.report.xls.XlsBuilder.FileFormatType format)
PARAMETERS:
tableName : String.The table name for the importing record.
importDocuments : Boolean.
If isImportDocuments is set to True, the function will also import the documents related with Archibus document field(s) from server side folders to database afm_docs and afm_docvers tables. If set to false, no documents will be imported from the server to database. The default is false.
generateLogs : Boolean. Default is true.
If isGenerateLogs is true, the insert, update and error logs will be generated.
continueIfErrorExists : Boolean.
If true, the data transfer will continue once error occurs. Otherwise, an exception will throw.
compareOnly : Boolean.
True if only compare the database record with importing record with no change to database. False otherwise.
format :
Importing file format, either Excel (.xls) or Text (.csv).
3.2. This function imports the related field values into the database
void importData(java.lang.String tableName,
java.util.Map<java.lang.String, java.lang.Object> fieldValues) throws com.archibus.utility.ExceptionBase
PARAMETERS:
tableName : String.
The table name of the field values
fieldValues : a field names and values map which contains the values to transfer into the database.