Class Problem

java.lang.Object
org.openwms.values.Problem
All Implemented Interfaces:
Serializable

@Embeddable public class Problem extends Object implements Serializable
A Problem is used to signal an occurred failure.
Author:
Heiko Scherrer
See Also:
  • Field Details

    • occurred

      private Date occurred
      Timestamp when the Problem occurred.
    • messageNo

      private int messageNo
      Message number of the Problem.
    • message

      private String message
      Message text about the Problem.
    • DEF_MESSAGE_LENGTH

      public static final int DEF_MESSAGE_LENGTH
      See Also:
  • Constructor Details

    • Problem

      public Problem()
      Creates a new Problem instance.
    • Problem

      public Problem(String message)
      Create a new Problem instance with a message text.
      Parameters:
      message - text as String
    • Problem

      public Problem(String message, int messageNo)
      Create a new Problem instance with a message text and a message number.
      Parameters:
      message - text as String
      messageNo - message number
  • Method Details

    • trim

      private String trim(String message)
    • getOccurred

      public Date getOccurred()
      Return the Date when the Problem has occurred.
      Returns:
      Date when occurred.
    • setOccurred

      public void setOccurred(Date occurred)
      Set the Date when the Problem occurred.
      Parameters:
      occurred - The Date to set.
    • getMessageNo

      public int getMessageNo()
      Get the messageNo.
      Returns:
      The messageNo.
    • setMessageNo

      public void setMessageNo(int messageNo)
      Set the messageNo.
      Parameters:
      messageNo - The messageNo to set.
    • getMessage

      public String getMessage()
      Get the message.
      Returns:
      The message.
    • setMessage

      public void setMessage(String message)
      Set the message.
      Parameters:
      message - The message to set.
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object