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 Details

    • SequenceIdTranslator

      public SequenceIdTranslator()
  • Method Details

    • importValue

      public Object importValue(String valueExpr, Item toItem) throws JaloInvalidParameterException
      Description copied from class: AbstractValueTranslator
      Translates a tokenized csv value for import usage. This means that the result object must be a instance of the expected attribute type.
      Specified by:
      importValue in class AbstractValueTranslator
      Parameters:
      valueExpr - expression to translate
      toItem - 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 String exportValue(Object value) throws JaloInvalidParameterException
      Description copied from class: AbstractValueTranslator
      Translates 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:
      exportValue in class AbstractValueTranslator
      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(Long sequenceId, Long curSeqId)
      Verify, if the sequence is valid
      Parameters:
      sequenceId -
      curSeqId -
      Returns:
      true, if the sequenceId is invalid