Class DataMappingEditor
java.lang.Object
com.northconcepts.datapipeline.foundations.datamapping.DataMappingEditor
Applies a
DataMapping to records from a DataReaderFactory and pages through the mapped results in memory,
keeping a sample of the records that failed.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionDataMappingEditor(DataReaderFactory source) Creates an editor that reads the source with a new reader each time a mapping is applied. -
Method Summary
Modifier and TypeMethodDescriptionRe-applies an existing DataMapping on the source dataset along with the existing sorting and page number.applyDataMapping(DataMapping dataMapping) Applies a new DataMapping on the source dataset along with the existing sorting and page number.Re-applies the existing sorting and page number to the existing mapped data from the source dataset.applyPagination(int pageNumber) Applies a new sorting and page number to the existing mapped data from the source dataset.close()Closes the dataset of mapped records; applying a mapping again loads a new one.Returns the dataset containing the mapped data that hasn't been sorted.Returns the records which failed mapping along with the failure details in a sess\ion property (limited torecords).invalid reference
#getMaxSavedFailedRecords()intReturns the number of records needed to fill every page up to and including the current one.intReturns the current 0-based page number.Returns all of the mapped and sorted data.Returns the mapped records on the current page (PAGE_SIZEper page), or an empty list before a mapping is applied.longReturns total failed record count during mapping.
-
Field Details
-
COLUMN_STATS_READER_THREADS
public static final int COLUMN_STATS_READER_THREADS- See Also:
-
PAGE_SIZE
public static final int PAGE_SIZE- See Also:
-
MIN_DATA_SIZE
public static final int MIN_DATA_SIZE- See Also:
-
MAX_WAIT_TIME
public static final int MAX_WAIT_TIME- See Also:
-
-
Constructor Details
-
DataMappingEditor
Creates an editor that reads the source with a new reader each time a mapping is applied.
-
-
Method Details
-
close
Closes the dataset of mapped records; applying a mapping again loads a new one. -
applyDataMapping
Applies a new DataMapping on the source dataset along with the existing sorting and page number. -
applyDataMapping
Re-applies an existing DataMapping on the source dataset along with the existing sorting and page number. -
applyPagination
Applies a new sorting and page number to the existing mapped data from the source dataset. This method does not cause a reload or re mapping of the source, it uses the data currently loaded and mapped. -
applyPagination
Re-applies the existing sorting and page number to the existing mapped data from the source dataset. This method does not cause a reload or re mapping of the source, it uses the data currently loaded and mapped. -
getSource
-
getDatasetAfterDataMapping
Returns the dataset containing the mapped data that hasn't been sorted. Sorting occurs on the targetRecordList-- seegetTarget(). -
getDataMapping
-
getPageNumber
public int getPageNumber()Returns the current 0-based page number. -
getMaxPagedRecordCount
public int getMaxPagedRecordCount()Returns the number of records needed to fill every page up to and including the current one. -
getTarget
Returns all of the mapped and sorted data. -
getFailedRecords
Returns the records which failed mapping along with the failure details in a sess\ion property (limited torecords). The session property key isinvalid reference
#getMaxSavedFailedRecords()and the type isinvalid reference
#DATA_MAPPING_RESULT_SESSION_KEYDataMappingResult. -
getTotalFailedRecordCount
public long getTotalFailedRecordCount()Returns total failed record count during mapping. -
getTargetPage
Returns the mapped records on the current page (PAGE_SIZEper page), or an empty list before a mapping is applied.
-