com.univocity.api.engine
Interface EntityMappingContext

All Known Subinterfaces:
RowMappingContext

public interface EntityMappingContext

The EntityMappingContext is available to RowReader instances used during the execution of a data mapping between two entities. It provides information specific to the entities being mapped

Author:
uniVocity Software Pty Ltd - dev@univocity.com
See Also:
RowReader, RowMappingContext, EngineExecutionContext, MappingCycleContext

Method Summary
 String getDestinationDataStore()
          Returns the name of the destination data store whose data entities are receiving mapped data.
 String getDestinationEntity()
          Returns the name of the destination data entity that is receiving data mapped from the source entity.
 String getSourceDataStore()
          Returns the name of the source data store whose data entities are being read.
 String getSourceEntity()
          Returns the name of the source data entity that is being read
 boolean isEntityMappingSkipped()
          Identifies whether the current mapping has been skipped.
 boolean isExclusionMapping()
          Informs whether the current mapping is for removal of records in the destination entity.
 void skipEntityMapping()
          Skips the mapping between the source and destination entities.
 

Method Detail

getSourceDataStore

String getSourceDataStore()
Returns the name of the source data store whose data entities are being read.

Returns:
the source data store name

getDestinationDataStore

String getDestinationDataStore()
Returns the name of the destination data store whose data entities are receiving mapped data.

Returns:
the destination data store name

getSourceEntity

String getSourceEntity()
Returns the name of the source data entity that is being read

Returns:
the source data entity name

getDestinationEntity

String getDestinationEntity()
Returns the name of the destination data entity that is receiving data mapped from the source entity.

Returns:
the destination data entity name

skipEntityMapping

void skipEntityMapping()
Skips the mapping between the source and destination entities. Rows mapped (if any) before this method is called will be persisted.


isExclusionMapping

boolean isExclusionMapping()
Informs whether the current mapping is for removal of records in the destination entity. In general, when mappings are configured to use deletion of records is uniVocity will automatically generate a mapping for exclusion.

For example: suppose GroupMember has a reference to Group. If no removal of records is enabled, the mappings will be executed in the following order:

If removal is enabled in these mappings then uniVocity may generate exclusion mappings to be executed in reverse order. The exact removal sequence depends on the mapping configuration. In this example, GroupMember records that might be associated with Group will be removed first.

Returns:
true if this mapping will identify and remove records in the destination; false otherwise.

isEntityMappingSkipped

boolean isEntityMappingSkipped()
Identifies whether the current mapping has been skipped.

Returns:
true if the current mapping has been skipped; false otherwise


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