Interface MappingModel
-
- All Known Implementing Classes:
DefaultMappingModel
public interface MappingModel
A MappingModel is the basic data structure that defines which columns from a column oriented data source are mapped into hybris data types. A mapping consists of a base type, an impex import mode and several entries of type MappingLineModel.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
addEntry(MappingLineModel mappingLineModel)
Adds a mapping mappingLineModel entry to the list of mapping lines if not already in the list.MappingModel
deepCopy()
Makes a deep copy of the mapping.ComposedTypeModel
getBaseTypeModel()
Returns the base type for this mapping.CatalogVersionModel
getCatalogVersion()
Returns the catalog version that is used for import.java.util.List<MappingLineModel>
getEntries()
Returns a list of MappingLineModel entries, which represent single hybris attributes and their assignments to source values.ImpexImportMode
getImpexImportMode()
Returns the import impexImportMode that is used for this mapping.ValidationResult
getValidationResult()
Returns the validation result if this mapping was already validated.boolean
isCatalogVersionOption()
Return if a user want to set the catalog version manually or not for each subtypeboolean
isManualUniqueOption()
Returns the manual unique attribute handling option value.void
setBaseTypeModel(ComposedTypeModel baseTypeModel)
Sets the base type for this mapping.void
setCatalogVersion(CatalogVersionModel catalogVersion)
Sets the catalog version that is used for import.void
setCatalogVersionOption(boolean isCatalogVersionSelected)
Set the option for the catalog versionvoid
setEntries(java.util.List<MappingLineModel> entries)
Sets a list of MappingLineModel entries, which represent single hybris attributes and their assignments to source values.void
setImpexImportMode(ImpexImportMode impexImportMode)
Returns the import impexImportMode that is used for this mapping.void
setManualUniqueOption(boolean isManualUniqueOption)
Sets the manual unique attribute handling option.void
setValidationResult(ValidationResult validationResult)
Sets the validation result to the mapping.
-
-
-
Method Detail
-
isCatalogVersionOption
boolean isCatalogVersionOption()
Return if a user want to set the catalog version manually or not for each subtype
-
setCatalogVersionOption
void setCatalogVersionOption(boolean isCatalogVersionSelected)
Set the option for the catalog version- Parameters:
isCatalogVersionSelected
-
-
getBaseTypeModel
ComposedTypeModel getBaseTypeModel()
Returns the base type for this mapping. This will be the base for the import. Example: Product.- Returns:
- base type
-
setBaseTypeModel
void setBaseTypeModel(ComposedTypeModel baseTypeModel)
Sets the base type for this mapping. This will be the base for the import. Example: Product.- Parameters:
baseTypeModel
-
-
getImpexImportMode
ImpexImportMode getImpexImportMode()
Returns the import impexImportMode that is used for this mapping. Example: INSERT or UPDATE- Returns:
- impexImportMode ImpexImportMode
-
setImpexImportMode
void setImpexImportMode(ImpexImportMode impexImportMode)
Returns the import impexImportMode that is used for this mapping. Example: INSERT or UPDATE- Parameters:
impexImportMode
- ImpexImportMode
-
getEntries
java.util.List<MappingLineModel> getEntries()
Returns a list of MappingLineModel entries, which represent single hybris attributes and their assignments to source values.- Returns:
- list of mapping lines
-
setEntries
void setEntries(java.util.List<MappingLineModel> entries)
Sets a list of MappingLineModel entries, which represent single hybris attributes and their assignments to source values.- Parameters:
entries
- list of mapping lines
-
addEntry
boolean addEntry(MappingLineModel mappingLineModel)
Adds a mapping mappingLineModel entry to the list of mapping lines if not already in the list.- Parameters:
mappingLineModel
- the new mappingLineModel- Returns:
- true if a new entry was added, false if the mapping mappingLineModel was already in the list
-
getCatalogVersion
CatalogVersionModel getCatalogVersion()
Returns the catalog version that is used for import.- Returns:
- catalog version
-
setCatalogVersion
void setCatalogVersion(CatalogVersionModel catalogVersion)
Sets the catalog version that is used for import.- Parameters:
catalogVersion
-
-
getValidationResult
ValidationResult getValidationResult()
Returns the validation result if this mapping was already validated.- Returns:
- validation result
-
setValidationResult
void setValidationResult(ValidationResult validationResult)
Sets the validation result to the mapping.- Parameters:
validationResult
-
-
deepCopy
MappingModel deepCopy()
Makes a deep copy of the mapping. Used for the mapping load function.- Returns:
- a deep copy of the mapping: also a MappingModel object
-
setManualUniqueOption
void setManualUniqueOption(boolean isManualUniqueOption)
Sets the manual unique attribute handling option.- Parameters:
isManualUniqueOption
- true if unique attribute should be managed manually
-
isManualUniqueOption
boolean isManualUniqueOption()
Returns the manual unique attribute handling option value.- Returns:
- true if unique attribute should be managed manually
-
-