Class Barcode

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

@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:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private @NotEmpty 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).
    void
    Set the Barcode value.
    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

    • value

      @NotEmpty private @NotEmpty 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
    • setValue

      public void setValue(String value)
      Set the Barcode value.
      Parameters:
      value - The value to set
    • 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