Table of Contents

Class Mapping

Namespace
Dynamicweb.DataIntegration.Integration
Assembly
Dynamicweb.DataIntegration.dll

Contains the table mapping part of a schema.

public class Mapping
Inheritance
Mapping
Inherited Members

Constructors

Mapping()

Initializes a new instance of the Mapping class.

public Mapping()

Mapping(ISource, IDestination, int)

Initializes a new instance of the Mapping class. Generally, when adding a mapping to a job, one should use Job.AddMapping().

protected Mapping(ISource source, IDestination destination, int id)

Parameters

source ISource

The source.

destination IDestination

The destination.

id int

The id.

Mapping(ISource, IDestination, int, Job)

Initializes a new instance of the Mapping class. Generally, when adding a mapping to a job, one should use Job.AddMapping().

protected Mapping(ISource source, IDestination destination, int id, Job job)

Parameters

source ISource

The source.

destination IDestination

The destination.

id int

The id.

job Job

Mapping(XmlNode, ISource, IDestination, int)

protected Mapping(XmlNode xmlNode, ISource source, IDestination destination, int id)

Parameters

xmlNode XmlNode
source ISource
destination IDestination
id int

Mapping(XmlNode, ISource, IDestination, int, Job)

protected Mapping(XmlNode xmlNode, ISource source, IDestination destination, int id, Job job)

Parameters

xmlNode XmlNode
source ISource
destination IDestination
id int
job Job

Mapping(XmlNode, Schema, Schema, int)

protected Mapping(XmlNode xmlNode, Schema source, Schema destination, int id)

Parameters

xmlNode XmlNode
source Schema
destination Schema
id int

Fields

AddColumnsFromSourceToMappingIfMissing

public bool AddColumnsFromSourceToMappingIfMissing

Field Value

bool

Job

Job

public readonly Job Job

Field Value

Job

MappingDestinationInitialized

Used to indicate if mapping-specific initialization in the destination has been completed

public bool MappingDestinationInitialized

Field Value

bool

Properties

Active

Gets a value indicating whether this Mapping is active.

public virtual bool Active { get; set; }

Property Value

bool

true if active; otherwise, false.

AnyColumnMappingExists

public bool AnyColumnMappingExists { get; }

Property Value

bool

Comment

public string Comment { get; set; }

Property Value

string

ConditionalGroups

Gets the conditionals groups for the mapping

public IEnumerable<MappingConditionalGroup> ConditionalGroups { get; }

Property Value

IEnumerable<MappingConditionalGroup>

Conditionals

Gets the conditionals for the mapping. Conditionals describe which conditions must be met for a row to be imported.

public MappingConditionalCollection Conditionals { get; }

Property Value

MappingConditionalCollection

DeleteRowsMissingFromSource

Gets or sets a value indicating whether the destination table should be cleaned out after the job is finished, by removing any row that was not part of the input data for the job.

public virtual bool DeleteRowsMissingFromSource { get; set; }

Property Value

bool

true if missing rows should be deleted; otherwise, false.

Destination

Gets the destination provider this mapping references.

public IDestination Destination { get; }

Property Value

IDestination

DestinationSchema

public Schema DestinationSchema { get; set; }

Property Value

Schema

DestinationTable

Gets or sets the destination table.

public virtual Table DestinationTable { get; set; }

Property Value

Table

The destination table.

DestinationTableName

public string DestinationTableName { get; set; }

Property Value

string

HasResponseMappings

public bool HasResponseMappings { get; }

Property Value

bool

Options

Table specific Options

public Dictionary<string, string> Options { get; set; }

Property Value

Dictionary<string, string>

ScriptClass

Table script class for the input row processing

public virtual string ScriptClass { get; set; }

Property Value

string

Source

Gets the source provider this mapping references.

public ISource Source { get; }

Property Value

ISource

SourceSchema

public Schema SourceSchema { get; set; }

Property Value

Schema

SourceTable

Gets or sets the source table.

public virtual Table SourceTable { get; set; }

Property Value

Table

The source table.

SourceTableName

public string SourceTableName { get; set; }

Property Value

string

Methods

AddConditional(Column, ConditionalOperator, string)

public void AddConditional(Column sourceColumn, ConditionalOperator conditionalOperator, string condition)

Parameters

sourceColumn Column
conditionalOperator ConditionalOperator
condition string

AddConditional(Column, ConditionalOperator, string, bool)

Adds a conditional to the mapping.

public void AddConditional(Column sourceColumn, ConditionalOperator conditionalOperator, string condition, bool useCodeExtension)

Parameters

sourceColumn Column

The source column.

conditionalOperator ConditionalOperator

The conditional operator.

condition string

The condition.

useCodeExtension bool

The condition is a CodeExpression addin

AddConditionalGroup(ConditionalGroupOperator)

Adds conditional group

public MappingConditionalGroup AddConditionalGroup(ConditionalGroupOperator conditionalOperator)

Parameters

conditionalOperator ConditionalGroupOperator

operator

Returns

MappingConditionalGroup

Created group

AddMapping(Column, Column)

Adds a columnMapping to the mapping.

public ColumnMapping AddMapping(Column sourceColumn, Column destinationColumn)

Parameters

sourceColumn Column

The source column.

destinationColumn Column

The destination column.

Returns

ColumnMapping

AddMapping(Column, Column, bool)

adds a columnMapping to the mapping. isKey indicated if this column should be used to compare incomming rows to existing rows.

public ColumnMapping AddMapping(Column sourceColumn, Column destinationColumn, bool isKey)

Parameters

sourceColumn Column
destinationColumn Column
isKey bool

Returns

ColumnMapping

true if the mapping can be added, that is, source and destination tables match existing columns. False if the mapping cannot be added

AddResponseMapping(Column, Column, bool)

public ColumnMapping AddResponseMapping(Column sourceColumn, Column destinationColumn, bool isKey)

Parameters

sourceColumn Column
destinationColumn Column
isKey bool

Returns

ColumnMapping

ClearColumnMappings()

Removes all ColumnMappings from the mapping. Removes all ColumnMappings from the mapping.

public void ClearColumnMappings()

ClearResponseColumnMappings()

public void ClearResponseColumnMappings()

CreateFromNode(XmlNode)

protected void CreateFromNode(XmlNode xmlNode)

Parameters

xmlNode XmlNode

GetColumnMappings()

public virtual ColumnMappingCollection GetColumnMappings()

Returns

ColumnMappingCollection

GetColumnMappings(bool)

public virtual ColumnMappingCollection GetColumnMappings(bool forceAll)

Parameters

forceAll bool

Returns

ColumnMappingCollection

GetConditionColumns(IEnumerable<string>)

Gets the columns from mapping conditions.

public virtual IEnumerable<Column> GetConditionColumns(IEnumerable<string> columnsToSkip)

Parameters

columnsToSkip IEnumerable<string>

The columns to skip.

Returns

IEnumerable<Column>

IEnumerable<Column>.

GetId()

Gets the id.

public int GetId()

Returns

int

GetMappingsWithKeyColumnSet()

public IEnumerable<ColumnMapping> GetMappingsWithKeyColumnSet()

Returns

IEnumerable<ColumnMapping>

GetOptionValue(string)

Gets mapping option value

public bool? GetOptionValue(string option)

Parameters

option string

Option

Returns

bool?

GetResponseColumnMappings()

public virtual ColumnMappingCollection GetResponseColumnMappings()

Returns

ColumnMappingCollection

GetResponseColumnMappings(bool)

public virtual ColumnMappingCollection GetResponseColumnMappings(bool forceAll)

Parameters

forceAll bool

Returns

ColumnMappingCollection

GetSourceColumns(bool, bool)

Gets the source columns.

public virtual IEnumerable<Column> GetSourceColumns(bool includeOnlyActiveColumns, bool includeConditionColumns)

Parameters

includeOnlyActiveColumns bool

if set to true includes only active mapping columns. Otherwise includes all mapping columns.

includeConditionColumns bool

if set to true included condition columns.

Returns

IEnumerable<Column>

IEnumerable<Column>.

RemoveConditionalGroup(int)

Removes conditional group

public void RemoveConditionalGroup(int id)

Parameters

id int

Group id

RemoveMapping(ColumnMapping)

Removes the ColumnMapping.

public void RemoveMapping(ColumnMapping cm)

Parameters

cm ColumnMapping

The cm.

RemoveResponseMapping(ColumnMapping)

public void RemoveResponseMapping(ColumnMapping cm)

Parameters

cm ColumnMapping
To top