14f34ba4813fbae53fb52d93250b38c730480f64
[jalview.git] / src / vamsas / objects / simple / WsJobId.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
3  * Copyright (C) 2014 The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
10  *  
11  * Jalview is distributed in the hope that it will be useful, but 
12  * WITHOUT ANY WARRANTY; without even the implied warranty 
13  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14  * PURPOSE.  See the GNU General Public License for more details.
15  * 
16  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
17  * The Jalview Authors are detailed in the 'AUTHORS' file.
18  */
19 package vamsas.objects.simple;
20
21 public class WsJobId implements java.io.Serializable
22 {
23   private java.lang.String jobId;
24
25   private int status;
26
27   public WsJobId()
28   {
29   }
30
31   public WsJobId(java.lang.String jobId, int status)
32   {
33     this.jobId = jobId;
34     this.status = status;
35   }
36
37   /**
38    * Gets the jobId value for this WsJobId.
39    * 
40    * @return jobId
41    */
42   public java.lang.String getJobId()
43   {
44     return jobId;
45   }
46
47   /**
48    * Sets the jobId value for this WsJobId.
49    * 
50    * @param jobId
51    */
52   public void setJobId(java.lang.String jobId)
53   {
54     this.jobId = jobId;
55   }
56
57   /**
58    * Gets the status value for this WsJobId.
59    * 
60    * @return status
61    */
62   public int getStatus()
63   {
64     return status;
65   }
66
67   /**
68    * Sets the status value for this WsJobId.
69    * 
70    * @param status
71    */
72   public void setStatus(int status)
73   {
74     this.status = status;
75   }
76
77   private java.lang.Object __equalsCalc = null;
78
79   public synchronized boolean equals(java.lang.Object obj)
80   {
81     if (!(obj instanceof WsJobId))
82       return false;
83     WsJobId other = (WsJobId) obj;
84     if (obj == null)
85       return false;
86     if (this == obj)
87       return true;
88     if (__equalsCalc != null)
89     {
90       return (__equalsCalc == obj);
91     }
92     __equalsCalc = obj;
93     boolean _equals;
94     _equals = true
95             && ((this.jobId == null && other.getJobId() == null) || (this.jobId != null && this.jobId
96                     .equals(other.getJobId())))
97             && this.status == other.getStatus();
98     __equalsCalc = null;
99     return _equals;
100   }
101
102   private boolean __hashCodeCalc = false;
103
104   public synchronized int hashCode()
105   {
106     if (__hashCodeCalc)
107     {
108       return 0;
109     }
110     __hashCodeCalc = true;
111     int _hashCode = 1;
112     if (getJobId() != null)
113     {
114       _hashCode += getJobId().hashCode();
115     }
116     _hashCode += getStatus();
117     __hashCodeCalc = false;
118     return _hashCode;
119   }
120
121 }