|
3 | 3 | import java.io.Serializable;
|
4 | 4 |
|
5 | 5 | public class Result implements Serializable {
|
6 |
| - private boolean conn_established = false; |
7 | 6 | /** Type of query listed in LauncherDB starting from 1 */
|
8 |
| - private byte RESULT_TYPE = 0; |
9 |
| - private String resultString = null; |
10 |
| - private int resultInt = 0; |
11 |
| - private Exception e; |
12 |
| - private Boolean truefalse = false; |
13 |
| - |
| 7 | + private byte RESULT_TYPE = 0; |
| 8 | + private Exception exception; |
| 9 | + private String resultString; |
| 10 | + private int resultInt; |
| 11 | + private long resultLong; |
| 12 | + private float resultFloat; |
| 13 | + private double resutDouble; |
| 14 | + private boolean resultBoolean; |
| 15 | + private int[] resultIntArray; |
| 16 | + |
14 | 17 | public Result(int i) {
|
15 | 18 | this.RESULT_TYPE = Byte.parseByte(Integer.toString(i));
|
16 | 19 | }
|
17 |
| - |
18 |
| - public boolean isConn_established() { |
19 |
| - return this.conn_established; |
| 20 | + |
| 21 | + public synchronized Exception getException() { |
| 22 | + return this.exception; |
20 | 23 | }
|
21 |
| - |
22 |
| - public void setConn_established(boolean conn_established) { |
23 |
| - this.conn_established = conn_established; |
| 24 | + |
| 25 | + public synchronized void setException(Exception exception) { |
| 26 | + this.exception = exception; |
24 | 27 | }
|
25 |
| - |
26 |
| - public byte getRESULT_TYPE() { |
27 |
| - return this.RESULT_TYPE; |
28 |
| - } |
29 |
| - |
30 |
| - public void setRESULT_TYPE(byte rESULT_TYPE) { |
31 |
| - this.RESULT_TYPE = rESULT_TYPE; |
32 |
| - } |
33 |
| - |
34 |
| - public String getResultString() { |
| 28 | + |
| 29 | + public synchronized String getResultString() { |
35 | 30 | return this.resultString;
|
36 | 31 | }
|
37 |
| - |
38 |
| - public void setResultString(String resultString) { |
| 32 | + |
| 33 | + public synchronized void setResultString(String resultString) { |
39 | 34 | this.resultString = resultString;
|
40 | 35 | }
|
41 |
| - |
42 |
| - public int getResultInt() { |
| 36 | + |
| 37 | + public synchronized int getResultInt() { |
43 | 38 | return this.resultInt;
|
44 | 39 | }
|
45 |
| - |
46 |
| - public void setResultInt(int resultInt) { |
| 40 | + |
| 41 | + public synchronized void setResultInt(int resultInt) { |
47 | 42 | this.resultInt = resultInt;
|
48 | 43 | }
|
49 |
| - |
50 |
| - public Exception getE() { |
51 |
| - return this.e; |
| 44 | + |
| 45 | + public synchronized long getResultLong() { |
| 46 | + return this.resultLong; |
52 | 47 | }
|
53 |
| - |
54 |
| - public void setE(Exception e) { |
55 |
| - this.e = e; |
| 48 | + |
| 49 | + public synchronized void setResultLong(long resultLong) { |
| 50 | + this.resultLong = resultLong; |
56 | 51 | }
|
57 |
| - |
58 |
| - public Boolean getTruefalse() { |
59 |
| - return truefalse; |
| 52 | + |
| 53 | + public synchronized float getResultFloat() { |
| 54 | + return this.resultFloat; |
60 | 55 | }
|
61 |
| - |
62 |
| - public void setTruefalse(Boolean truefalse) { |
63 |
| - this.truefalse = truefalse; |
| 56 | + |
| 57 | + public synchronized void setResultFloat(float resultFloat) { |
| 58 | + this.resultFloat = resultFloat; |
| 59 | + } |
| 60 | + |
| 61 | + public synchronized double getResutDouble() { |
| 62 | + return this.resutDouble; |
| 63 | + } |
| 64 | + |
| 65 | + public synchronized void setResutDouble(double resutDouble) { |
| 66 | + this.resutDouble = resutDouble; |
| 67 | + } |
| 68 | + |
| 69 | + public synchronized boolean isResultBoolean() { |
| 70 | + return this.resultBoolean; |
| 71 | + } |
| 72 | + |
| 73 | + public synchronized void setResultBoolean(boolean resultBoolean) { |
| 74 | + this.resultBoolean = resultBoolean; |
| 75 | + } |
| 76 | + |
| 77 | + public synchronized int[] getResultIntArray() { |
| 78 | + return this.resultIntArray; |
| 79 | + } |
| 80 | + |
| 81 | + public synchronized void setResultIntArray(int[] resultIntArray) { |
| 82 | + this.resultIntArray = resultIntArray; |
| 83 | + } |
| 84 | + |
| 85 | + public synchronized byte getRESULT_TYPE() { |
| 86 | + return this.RESULT_TYPE; |
64 | 87 | }
|
65 |
| - |
66 | 88 | }
|
0 commit comments