All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.univocity.api.config.builders.IdentifierMappingSetup Maven / Gradle / Ivy

/*******************************************************************************
 * 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;

import com.univocity.api.config.*;
import com.univocity.api.engine.*;

/**
 * The IdentifierMappingSetup is the base configuration used to define which fields from the source entity,
 * when mapped to the destination, represent an identifier in the destination entity of the {@link EntityMapping}.
 *
 * 

An identifier has the property of uniquely identifying an individual record. Records with the same values in * their identifier fields will be considered by uniVocity as the same record. * *

Values read from the source entity to produce identifiers in the destination will be stored in uniVocity metadata * tables (as defined in {@link MetadataSettings}) in order to enable features such as: * *

    *
  • Mapping of references
  • *
  • Enabling or disabling data updates
  • *
  • Exclusion of absent records (those mapped in previous mapping cycles but not in the source anymore)
  • *
* *

Values used as identifiers MUST have their string representation used in uniVocity metadata tables. You must ensure identifiers * can be converted from/to {@code String} consistently. If required, {@link FunctionCall}s or input {@link RowReader}s can be used to convert identifiers. * * @see ReferenceMappingSetup * @see EntityMapping * @see DataIntegrationEngine * @see MetadataSettings * * @author uniVocity Software Pty Ltd - [email protected] * */ public interface IdentifierMappingSetup { /** * Associates one or more fields from the source entity in an {@link EntityMapping} with the identifier of the destination entity. * * @param sourceFields the field names in the source entity to be associated with an identifier of the destination. * Expressions are allowed within curly braces (i.e. "{expression}") * @return the next step of this configuration: define what fields of the destination are identifiers and how they will * receive the values read from the source. */ public IdentifierType associate(String... sourceFields); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy