1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package net.sf.emarket.quote.domain;
21
22 import java.io.Serializable;
23 import java.sql.Timestamp;
24
25 import javax.persistence.Entity;
26
27 @Entity
28 public class Instrument implements Serializable{
29
30 private static final long serialVersionUID = 2199980212558657684L;
31
32 public static final String STATUS_ACTIVE = "ACTIVE";
33 public static final String STATUS_STOPPED = "STOPPED";
34 public static final String STATUS_NEW = "NEW";
35
36
37 private String symbol=null;
38 private String type = null;
39 private String exchange = null;
40 private String description = null;
41 private String exchangeType = null;
42 private String status = null;
43 private Timestamp time = null;
44
45 public String getSymbol() {
46 return symbol;
47 }
48
49
50 @Override
51 public int hashCode() {
52 int result = symbol != null ? symbol.hashCode() : 0;
53 result = 31 * result + (type != null ? type.hashCode() : 0);
54 result = 31 * result + (exchange != null ? exchange.hashCode() : 0);
55 result = 31 * result + (description != null ? description.hashCode() : 0);
56 result = 31 * result + (exchangeType != null ? exchangeType.hashCode() : 0);
57 result = 31 * result + (status != null ? status.hashCode() : 0);
58 result = 31 * result + (time != null ? time.hashCode() : 0);
59 return result;
60 }
61
62 public void setSymbol(String symbol) {
63 this.symbol = symbol;
64
65 }
66 public String getType() {
67 return type;
68 }
69 public void setType(String type) {
70 this.type = type;
71 }
72 public String getExchange() {
73 return exchange;
74 }
75 public void setExchange(String exchange) {
76 this.exchange = exchange;
77 }
78 public String getDescription() {
79 return description;
80 }
81 public void setDescription(String description) {
82 this.description = description;
83 }
84 public String getExchangeType() {
85 return exchangeType;
86 }
87 public void setExchangeType(String exchangeType) {
88 this.exchangeType = exchangeType;
89 }
90 public String getStatus() {
91 return status;
92 }
93 public void setStatus(String status) {
94 this.status = status;
95 }
96 public Timestamp getTime() {
97 return time;
98 }
99 public void setTime(Timestamp time) {
100 this.time = time;
101 }
102
103 @Override
104 public boolean equals(Object o) {
105 if (this == o) return true;
106 if (o == null || getClass() != o.getClass()) return false;
107
108 Instrument that = (Instrument) o;
109
110 if (symbol != null ? !symbol.equals(that.symbol) : that.symbol != null) return false;
111
112 return true;
113 }
114
115 }