Class SequenceIdTranslator
- java.lang.Object
-
- de.hybris.platform.impex.jalo.translators.AbstractValueTranslator
-
- de.hybris.platform.acceleratorservices.dataimport.batch.converter.SequenceIdTranslator
-
- Direct Known Subclasses:
GreaterSequenceIdTranslator
public class SequenceIdTranslator extends AbstractValueTranslator
Translator for the sequenceId attribute comparing the sequenceId (e.g. UTC) of the import with the stored value in the database.
-
-
Constructor Summary
Constructors Constructor Description SequenceIdTranslator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringexportValue(java.lang.Object value)Translates an attribute value for export usage.java.lang.ObjectimportValue(java.lang.String valueExpr, Item toItem)Translates a tokenized csv value for import usage.protected booleanisInValidSequenceId(java.lang.Long sequenceId, java.lang.Long curSeqId)Verify, if the sequence is valid-
Methods inherited from class de.hybris.platform.impex.jalo.translators.AbstractValueTranslator
clearStatus, createTranslator, createTranslator, createTranslator, debug, error, getColumnDescriptor, getFlexibleSearch, info, init, isDebugEnabled, isInfoEnabled, setEmpty, setError, validate, warn, wasEmpty, wasUnresolved
-
-
-
-
Method Detail
-
importValue
public java.lang.Object importValue(java.lang.String valueExpr, Item toItem) throws JaloInvalidParameterExceptionDescription copied from class:AbstractValueTranslatorTranslates a tokenized csv value for import usage. This means that the result object must be a instance of the expected attribute type.- Specified by:
importValuein classAbstractValueTranslator- Parameters:
valueExpr- expression to translatetoItem- the target item in case it already exist, null otherwise (for partOf attributes!)- Returns:
- Object translated value
- Throws:
JaloInvalidParameterException- value can not be translated with this translator or is invalid
-
exportValue
public java.lang.String exportValue(java.lang.Object value) throws JaloInvalidParameterExceptionDescription copied from class:AbstractValueTranslatorTranslates an attribute value for export usage. This means the attribute value must be transformed into a string which should be re-importable again.- Specified by:
exportValuein classAbstractValueTranslator- Parameters:
value- value to translate- Returns:
- String translated value
- Throws:
JaloInvalidParameterException- value can not be translated with this translator or is invalid
-
isInValidSequenceId
protected boolean isInValidSequenceId(java.lang.Long sequenceId, java.lang.Long curSeqId)Verify, if the sequence is valid- Parameters:
sequenceId-curSeqId-- Returns:
- true, if the sequenceId is invalid
-
-