Class DataMappingProperty
Implements
Inherited Members
Namespace: LemonEdge.API.Entities.DataIntegration
Assembly: LemonEdge.API.Entities.Auto.dll
Syntax
[DataContract]
public class DataMappingProperty : BaseEntity, IDataMappingProperty, IDataMappingPropertyBase, IBaseEntity, IEquatable<IBaseEntity>, INotifyPropertyChanged, INotifyPropertyChanging, ICloneableAsync, ICanTrackProperties, ICloneableAsync<IDataMappingProperty>
Constructors
DataMappingProperty()
Declaration
public DataMappingProperty()
Properties
ColumnHeaderName
If you are using a mapping with headers then here you can specify the name the column heading will have as it appears in the file. This doesn't need to be in order it appears in the file, just needs the matching name.
If the file has no column headings then this can be left blank and the column order is all that matters(see Sequence).
You can also use this value in a formula for other properties if you want. To do that you can use this Column Header Name in a formula by using {NAME}. In which case if this is blank you can provide it a unique name anyway for referring to it in a formula later on.Declaration
[StringLength(500)]
public string ColumnHeaderName { get; set; }
Property Value
Type | Description |
---|---|
string |
DataMappingID
[Key] Links to IDataMapping. The parent data mapping this entity beloings to
Declaration
[RequiredNoDefaultIDValidation]
public Guid DataMappingID { get; set; }
Property Value
Type | Description |
---|---|
Guid |
DataMappingID_Label
Declaration
public string DataMappingID_Label { get; set; }
Property Value
Type | Description |
---|---|
string |
DataMappingID_Label_Silent
Declaration
[NotMapped]
public string DataMappingID_Label_Silent { get; set; }
Property Value
Type | Description |
---|---|
string |
DataSourceTypeID
Indicates the value found during this import should be used to find the matching IDataSource for the selected IDataSourceType to return the ID of the item to link to.
Declaration
public Guid? DataSourceTypeID { get; set; }
Property Value
Type | Description |
---|---|
Guid? |
DataSourceTypeID_Label
Declaration
public string DataSourceTypeID_Label { get; set; }
Property Value
Type | Description |
---|---|
string |
DataSourceTypeID_Label_Silent
Declaration
[NotMapped]
public string DataSourceTypeID_Label_Silent { get; set; }
Property Value
Type | Description |
---|---|
string |
OverrideValue
A hard coded value to always use for this property
Declaration
[StringLength(100)]
public string OverrideValue { get; set; }
Property Value
Type | Description |
---|---|
string |
OverrideValueFormula
A formula (see our formula engine for more info) that is evaluated for each record and the result used for this property. This formula can also refer to other columns in this file by using {COLUMN_HEADER_NAME} in the formula.
Declaration
public string OverrideValueFormula { get; set; }
Property Value
Type | Description |
---|---|
string |
PropertyName
Provides the property name the data in this column should be mapped to against the specified entity type in the Data Mapping. Including the entity types actual properties, this list also includes the following additional mappings:
- Not Mapped: Indicates this column is not mapped to any property. The data value it contains can be referenced in formulas using {COLUMN_HEADER_NAME}.
- Import Data Action:
Indicates how to process the data.Valid Values are:
None - Ignore this record
Import - Create, update, or process a custom action for this recordDelete - Delete the matching record
- Import Data Type: Indicates the entity type of the data being imported. Not required as specified by the mapping anyway.
- Data Sources: Indicates the data should be mapped to a unique data source field holding keys relating to 3rd party systems.See here for more info on Data Sources.
Declaration
[StringLength(500)]
public string PropertyName { get; set; }
Property Value
Type | Description |
---|---|
string |
Sequence
[Key] The sequence specifies the order this column will be found in the import file. This only matters if "Use Headers" on the Data Mapping is set to false.
Declaration
public short Sequence { get; set; }
Property Value
Type | Description |
---|---|
short |
TrimValue
Removes leading and trailing spaces from the data before parsing it for this property data type.
Declaration
public bool TrimValue { get; set; }
Property Value
Type | Description |
---|---|
bool |
UseAsKey
Normally the import identifies if an item already exists by the key fields defined for that entity type. If you want to override that (perhaps by using an external DataSource ID instead) then you can set this to indicates which columns are to be used as key fields for lookup instead.
Declaration
public bool UseAsKey { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
CopyFromEntity(IBaseEntity)
Declaration
protected override void CopyFromEntity(IBaseEntity src)
Parameters
Type | Name | Description |
---|---|---|
IBaseEntity | src |
Overrides
CopyFromSource(IDataMappingProperty)
Updates all properties in this item to have the same properties as the source object.
Declaration
public void CopyFromSource(IDataMappingProperty source)
Parameters
Type | Name | Description |
---|---|---|
IDataMappingProperty | source | The source object to copy all values from. |
GetMapping()
If this maps to a system entity/property this function should return that mapping.
The system sets it through SetMapping(EntityImportColDefinition)
Declaration
public EntityImportColDefinition GetMapping()
Returns
Type | Description |
---|---|
EntityImportColDefinition |
SetMapping(EntityImportColDefinition)
If this maps to a system entity/property this function allows the system to set the mapping
Declaration
public void SetMapping(EntityImportColDefinition mapping)
Parameters
Type | Name | Description |
---|---|---|
EntityImportColDefinition | mapping | The system mapping definition this relates to |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |