
com.univocity.api.config.builders.UnmatchedReference Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of univocity-api Show documentation
Show all versions of univocity-api Show documentation
uniVocity Data Integration's Public API
/*******************************************************************************
* Copyright (c) 2014 uniVocity Software Pty Ltd. All rights reserved.
* This file is subject to the terms and conditions defined in file
* 'LICENSE.txt', which is part of this source code package.
******************************************************************************/
package com.univocity.api.config.builders;
/**
* The UnmatchedReference
configuration is obtained from a {@link ReferenceTransform} configuration
* which is part of the configuration initialized by a call to {@link 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.
*
* @see ReferenceMappingSetup
* @see UnmatchedReferenceHandling
*
* @author uniVocity Software Pty Ltd - [email protected]
*
*/
public interface UnmatchedReference {
/**
* Returns the next step of this configuration: defining what action to take when a reference could not be matched.
* @return a configuration object to configure how to handle mismatched references.
*/
public UnmatchedReferenceHandling onMismatch();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy