Class ShippingStringListConverter

java.lang.Object
org.openwms.wms.shipping.impl.ShippingStringListConverter
All Implemented Interfaces:
javax.persistence.AttributeConverter<List<String>,String>

public class ShippingStringListConverter extends Object implements javax.persistence.AttributeConverter<List<String>,String>
A StringListConverter is a JPA AttributeConverter that is able to convert a String into a List of strings and vice-versa.
Author:
Heiko Scherrer
  • Field Details

    • STRING_LIST_LENGTH

      public static final int STRING_LIST_LENGTH
      Default length of the string list.
      See Also:
    • SEPARATOR

      public static final String SEPARATOR
      Default separator sign of a string list.
      See Also:
  • Constructor Details

    • ShippingStringListConverter

      public ShippingStringListConverter()
  • Method Details

    • getListLength

      protected int getListLength()
      Return the maximum list length.
      Returns:
      The maximum list length
      See Also:
    • getSeparator

      protected String getSeparator()
      Return the separator that is used to separate the String into a List of Strings.
      Returns:
      The separator as String
      See Also:
    • convertToDatabaseColumn

      public String convertToDatabaseColumn(List<String> attribute)
      Specified by:
      convertToDatabaseColumn in interface javax.persistence.AttributeConverter<List<String>,String>
    • convertToEntityAttribute

      public List<String> convertToEntityAttribute(String dbData)
      Specified by:
      convertToEntityAttribute in interface javax.persistence.AttributeConverter<List<String>,String>