Package org.openwms.values
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:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getMessage()
Get the message.int
getMessageNo()
Get the messageNo.Date
getOccurred()
Return the Date when theProblem
has occurred.int
hashCode()
void
setMessage(String message)
Set the message.void
setMessageNo(int messageNo)
Set the messageNo.void
setOccurred(Date occurred)
Set the Date when theProblem
occurred.private String
trim(String message)
-
-
-
Field Detail
-
occurred
private Date occurred
Timestamp when theProblem
occurred.
-
messageNo
private int messageNo
Message number of theProblem
.
-
message
private String message
Message text about theProblem
.
-
DEF_MESSAGE_LENGTH
public static final int DEF_MESSAGE_LENGTH
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Problem
public Problem()
Creates a newProblem
instance.
-
Problem
public Problem(String message)
Create a newProblem
instance with a message text.- Parameters:
message
- text as String
-
Problem
public Problem(String message, int messageNo)
Create a newProblem
instance with a message text and a message number.- Parameters:
message
- text as StringmessageNo
- message number
-
-
Method Detail
-
getOccurred
public Date getOccurred()
Return the Date when theProblem
has occurred.- Returns:
- Date when occurred.
-
setOccurred
public void setOccurred(Date occurred)
Set the Date when theProblem
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.
-
-