com.univocity.api.config.builders
Interface UnmatchedReference


public interface UnmatchedReference

The UnmatchedReference configuration is obtained from a ReferenceTransform configuration which is part of the configuration initialized by a call to ReferenceMappingSetup.using(String...)

It is used as an access point for further configuration options that define how to handle references that could not be matched.

For example, consider the following information in uniVocity's metadata:


 Source entity (WGT)    Destination entity (weight)
     nbr | seq                    gid
     ----+----                  -------
     001 | 1                       1
     001 | 2                       2
     002 | 1                       3
 

And the following mapping:


 EntityMapping weightDetails = mapping.map("WGT_DET", "weight_details");
 weightDetails.reference().using("wgt_nbr", "wgt_seq").referTo("WGT", "weight").on("weight_ref");
 

If a record in the source entity WGT_DET contains wgt_nbr = 1, seq = 3 and this is used to refer to WGT, no results will come from uniVocity's metadata.

This configuration class gives some options to handle such situations.

Author:
uniVocity Software Pty Ltd - dev@univocity.com
See Also:
ReferenceMappingSetup, UnmatchedReferenceHandling

Method Summary
 UnmatchedReferenceHandling onMismatch()
          Returns the next step of this configuration: defining what action to take when a reference could not be matched.
 

Method Detail

onMismatch

UnmatchedReferenceHandling onMismatch()
Returns the next step of this configuration: defining what action to take when a reference could not be matched.

Returns:
a configuration object to configure how to handle mismatched references.


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