Class DefaultMappingModel
- java.lang.Object
-
- de.hybris.platform.importcockpit.model.mappingview.impl.DefaultMappingModel
-
- All Implemented Interfaces:
MappingModel
public class DefaultMappingModel extends java.lang.Object implements MappingModel
-
-
Field Summary
Fields Modifier and Type Field Description protected ComposedTypeModelbaseTypeModelprotected CatalogVersionModelcatalogVersionprotected java.util.List<MappingLineModel>entriesprotected ImpexImportModeimpexImportModeprotected booleanisCVOptionSelectedprotected booleanmanualUniqueOptionprotected ValidationResultvalidationResult
-
Constructor Summary
Constructors Constructor Description DefaultMappingModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddEntry(MappingLineModel line)Adds a mapping mappingLineModel entry to the list of mapping lines if not already in the list.MappingModeldeepCopy()Makes a deep copy of the mapping.ComposedTypeModelgetBaseTypeModel()Returns the base type for this mapping.CatalogVersionModelgetCatalogVersion()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.ImpexImportModegetImpexImportMode()Returns the import impexImportMode that is used for this mapping.ValidationResultgetValidationResult()Returns the validation result if this mapping was already validated.booleanisCatalogVersionOption()Return if a user want to set the catalog version manually or not for each subtypebooleanisManualUniqueOption()Returns the manual unique attribute handling option value.voidsetBaseTypeModel(ComposedTypeModel baseTypeModel)Sets the base type for this mapping.voidsetCatalogVersion(CatalogVersionModel catalogVersion)Sets the catalog version that is used for import.voidsetCatalogVersionOption(boolean isCVOptionSelected)Set the option for the catalog versionvoidsetEntries(java.util.List<MappingLineModel> entries)Sets a list of MappingLineModel entries, which represent single hybris attributes and their assignments to source values.voidsetImpexImportMode(ImpexImportMode impexImportMode)Returns the import impexImportMode that is used for this mapping.voidsetManualUniqueOption(boolean manualUniqueOption)Sets the manual unique attribute handling option.voidsetValidationResult(ValidationResult validationResult)Sets the validation result to the mapping.java.lang.StringtoString()
-
-
-
Field Detail
-
baseTypeModel
protected ComposedTypeModel baseTypeModel
-
impexImportMode
protected ImpexImportMode impexImportMode
-
entries
protected java.util.List<MappingLineModel> entries
-
catalogVersion
protected CatalogVersionModel catalogVersion
-
validationResult
protected ValidationResult validationResult
-
isCVOptionSelected
protected boolean isCVOptionSelected
-
manualUniqueOption
protected boolean manualUniqueOption
-
-
Method Detail
-
isManualUniqueOption
public boolean isManualUniqueOption()
Description copied from interface:MappingModelReturns the manual unique attribute handling option value.- Specified by:
isManualUniqueOptionin interfaceMappingModel- Returns:
- true if unique attribute should be managed manually
-
setManualUniqueOption
public void setManualUniqueOption(boolean manualUniqueOption)
Description copied from interface:MappingModelSets the manual unique attribute handling option.- Specified by:
setManualUniqueOptionin interfaceMappingModel- Parameters:
manualUniqueOption- true if unique attribute should be managed manually
-
getImpexImportMode
public ImpexImportMode getImpexImportMode()
Description copied from interface:MappingModelReturns the import impexImportMode that is used for this mapping. Example: INSERT or UPDATE- Specified by:
getImpexImportModein interfaceMappingModel- Returns:
- impexImportMode ImpexImportMode
-
setImpexImportMode
public void setImpexImportMode(ImpexImportMode impexImportMode)
Description copied from interface:MappingModelReturns the import impexImportMode that is used for this mapping. Example: INSERT or UPDATE- Specified by:
setImpexImportModein interfaceMappingModel- Parameters:
impexImportMode- ImpexImportMode
-
getEntries
public java.util.List<MappingLineModel> getEntries()
Description copied from interface:MappingModelReturns a list of MappingLineModel entries, which represent single hybris attributes and their assignments to source values.- Specified by:
getEntriesin interfaceMappingModel- Returns:
- list of mapping lines
-
setEntries
public void setEntries(java.util.List<MappingLineModel> entries)
Description copied from interface:MappingModelSets a list of MappingLineModel entries, which represent single hybris attributes and their assignments to source values.- Specified by:
setEntriesin interfaceMappingModel- Parameters:
entries- list of mapping lines
-
addEntry
public boolean addEntry(MappingLineModel line)
Description copied from interface:MappingModelAdds a mapping mappingLineModel entry to the list of mapping lines if not already in the list.- Specified by:
addEntryin interfaceMappingModel- Parameters:
line- the new mappingLineModel- Returns:
- true if a new entry was added, false if the mapping mappingLineModel was already in the list
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
setCatalogVersion
public void setCatalogVersion(CatalogVersionModel catalogVersion)
Description copied from interface:MappingModelSets the catalog version that is used for import.- Specified by:
setCatalogVersionin interfaceMappingModel
-
getCatalogVersion
public CatalogVersionModel getCatalogVersion()
Description copied from interface:MappingModelReturns the catalog version that is used for import.- Specified by:
getCatalogVersionin interfaceMappingModel- Returns:
- catalog version
-
getValidationResult
public ValidationResult getValidationResult()
Description copied from interface:MappingModelReturns the validation result if this mapping was already validated.- Specified by:
getValidationResultin interfaceMappingModel- Returns:
- validation result
-
setValidationResult
public void setValidationResult(ValidationResult validationResult)
Description copied from interface:MappingModelSets the validation result to the mapping.- Specified by:
setValidationResultin interfaceMappingModel
-
getBaseTypeModel
public ComposedTypeModel getBaseTypeModel()
Description copied from interface:MappingModelReturns the base type for this mapping. This will be the base for the import. Example: Product.- Specified by:
getBaseTypeModelin interfaceMappingModel- Returns:
- base type
-
setBaseTypeModel
public void setBaseTypeModel(ComposedTypeModel baseTypeModel)
Description copied from interface:MappingModelSets the base type for this mapping. This will be the base for the import. Example: Product.- Specified by:
setBaseTypeModelin interfaceMappingModel
-
deepCopy
public MappingModel deepCopy()
Description copied from interface:MappingModelMakes a deep copy of the mapping. Used for the mapping load function.- Specified by:
deepCopyin interfaceMappingModel- Returns:
- a deep copy of the mapping: also a MappingModel object
-
isCatalogVersionOption
public boolean isCatalogVersionOption()
Description copied from interface:MappingModelReturn if a user want to set the catalog version manually or not for each subtype- Specified by:
isCatalogVersionOptionin interfaceMappingModel
-
setCatalogVersionOption
public void setCatalogVersionOption(boolean isCVOptionSelected)
Description copied from interface:MappingModelSet the option for the catalog version- Specified by:
setCatalogVersionOptionin interfaceMappingModel
-
-