View Javadoc

1   package test.crispy.example.model;
2   
3   import java.io.Serializable;
4   
5   public class ValidationError implements Serializable {
6   	
7   	private static final long serialVersionUID = 5930253049442253128L;
8   	
9   	private int code = 0;
10  	private String message = "No message available!";
11  
12  	public ValidationError() { }
13  	public ValidationError(int pvCode, String pvMessage) { 
14  		setCode(pvCode);
15  		setMessage(pvMessage);
16  	}
17  	
18  	public void setCode(int pvCode) { code = pvCode; }
19  	public int getCode() { return code; }
20  	
21  	public void setMessage(String pvMessage) { message = pvMessage; }
22  	public String getMessage() { return message; }
23  	
24  	public String toString() {
25  		return code + " - " + message + " - " + super.toString();
26  	}
27  }