View Javadoc

1   package test.crispy.example.model;
2   
3   public class Status {
4   
5   	private String name = null;
6   	private String description = null;
7   	private Object result = null;
8   	
9   	public Status() { }
10  	public Status(String pvName) { 
11  		setName(pvName);
12  	}
13  	public Status(String pvName, String pvDescription) { 
14  		setName(pvName);
15  		setDescription(pvDescription);
16  	}
17  	
18  	public void setResult(Object pvResult) { result = pvResult; }
19  	public Object getResult() { return result; }
20  	
21  	public void setName(String pvName) { name = pvName; }
22  	public String getName() { return name; }
23  	
24  	public String getDescription() { return description; }
25  	public void setDescription(String pvDescription) { description = pvDescription; }
26  	
27      public boolean equals(Object pvObj) {
28          if (pvObj == null)
29              return false;
30          if (!Status.class.isAssignableFrom(pvObj.getClass()))
31              return false;
32          return this.getName().equals(((Status) pvObj).getName());
33      }
34  
35      public int hashCode() {
36          if (getName() == null)
37              return super.hashCode();
38          return getName().hashCode();
39      }
40  	
41  }