Class Barcode

java.lang.Object
org.openwms.common.transport.barcode.Barcode
All Implemented Interfaces:
Serializable

@Configurable(autowire=BY_TYPE, preConstruction=true) @Embeddable public class Barcode extends Object implements Serializable
A Barcode is a printable item with an unique identifier to label TransportUnits. The identifier has a defined number of characters whereas these characters are aligned either left or right. Non filled positions of a Barcode are padded with a so called padding character.
Author:
Heiko Scherrer
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    A BARCODE_ALIGN defines whether the Barcode is applied LEFT or RIGHT.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Length of a standard 1D Barcode field.
    static char
    Defines a character used for padding.
    If the actually length of the Barcode is less than the maximum defined length the rest will be filled with padder characters.
    private String
    'Identifier' of the Barcode.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Dear JPA...
    private
    Barcode(String value)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Return the Barcode value.
    int
    static Barcode
    of(String value)
    Simple factory method to replace default constructor in application logic (still needed for framework stuff).
    Return the value of the Barcode as String.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • BARCODE_LENGTH

      public static final int BARCODE_LENGTH
      Length of a standard 1D Barcode field.
      See Also:
    • PADDER

      public static char PADDER
      Defines a character used for padding.
      If the actually length of the Barcode is less than the maximum defined length the rest will be filled with padder characters.
    • value

      private String value
      'Identifier' of the Barcode.

      Note:It is not guaranteed that this field must be unique.

  • Constructor Details

    • Barcode

      protected Barcode()
      Dear JPA...
    • Barcode

      private Barcode(String value)
  • Method Details

    • of

      public static Barcode of(String value)
      Simple factory method to replace default constructor in application logic (still needed for framework stuff).
      Parameters:
      value - The value of the Barcode as String
      Returns:
      Formatted Barcode instance
    • getValue

      public String getValue()
      Return the Barcode value.
      Returns:
      The value of the Barcode
    • toString

      public String toString()
      Return the value of the Barcode as String.
      Overrides:
      toString in class Object
      Returns:
      As String
      See Also:
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object