View Javadoc
1   package org.oxerr.commons.ws.rs.exceptionmapper;
2   
3   import java.io.Serializable;
4   
5   /**
6    * Response entity for exceptions.
7    */
8   public class ErrorEntity implements Serializable {
9   
10  	private static final long serialVersionUID = 2016123001L;
11  
12  	private Integer code;
13  	private String message;
14  	private Throwable exception;
15  
16  	public ErrorEntity() {
17  	}
18  
19  	public ErrorEntity(Integer code, String message) {
20  		this.code = code;
21  		this.message = message;
22  	}
23  
24  	public ErrorEntity(Integer code, String message, Throwable exception) {
25  		this.code = code;
26  		this.message = message;
27  		this.exception = exception;
28  	}
29  
30  	public Integer getCode() {
31  		return code;
32  	}
33  
34  	public void setCode(Integer code) {
35  		this.code = code;
36  	}
37  
38  	public String getMessage() {
39  		return message;
40  	}
41  
42  	public void setMessage(String message) {
43  		this.message = message;
44  	}
45  
46  	public Throwable getException() {
47  		return exception;
48  	}
49  
50  	public void setException(Throwable exception) {
51  		this.exception = exception;
52  	}
53  
54  }