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

com.univocity.api.engine.NameMatcher Maven / Gradle / Ivy

There is a newer version: 1.0.6
Show newest version
/*******************************************************************************
 * Copyright (c) 2013 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.engine;

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

/**
 * A NameMatcher provides a custom implementation for automatic detection of mappings based on entity names.
 *
 * By default, {@link DataStoreMapping#autodetectMappings()} and {@link EntityMapping#autodetectMappings()} will automatically
 * create associations between entities and their fields based on their names.
 * Entities with similar names will be automatically associated. Underscores and spaces are ignored, for example: entity1 will
 * be associated with ENTITY 1 or ENTITY_1
 *
 * 

To override this behavior and provide a custom auto detection mechanism, * {@link DataStoreMapping#autodetectMappings(NameMatcher, NameMatcher)} and {@link EntityMapping#autodetectMappings(NameMatcher)} * accept an implementation of NameMatcher. * * @see DataStoreMapping * @see EntityMapping * * @author uniVocity Software Pty Ltd - [email protected] * */ public interface NameMatcher { /** * Identifies whether two entity or field names match and should be associated with each other automatically. * @param nameInSource the name in the source * @param nameInDestination the name in the destination * @return {@code true} if the entity of field name in source must be mapped to the entity or field name in the destination, otherwise {@code false}. */ public boolean matches(String nameInSource, String nameInDestination); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy