1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package net.sf.emarket.trade.domain;
21
22 import java.sql.Timestamp;
23
24 import net.sf.emarket.order.domain.Order;
25
26 public class ReceivedOrder extends Order {
27
28 private Timestamp receivedTime = null;
29 private String processingStatus = null;
30
31 public ReceivedOrder(){
32 }
33
34 public ReceivedOrder( Order order){
35 setAcctId(order.getAcctId());
36 setCommission(order.getCommission());
37 setCreationTime(order.getCreationTime());
38 setExchange(order.getExchange());
39 setId(order.getId());
40 setLimitPrice(order.getLimitPrice());
41 setOrderTerm(order.getOrderTerm());
42 setOrderType(order.getOrderType());
43 setPriceType(order.getPriceType());
44 setQuantity(order.getQuantity());
45 setQuoteId(order.getQuoteId());
46 setStatus(order.getStatus());
47 setSymbol(order.getSymbol());
48 setTime(order.getTime());
49 setTotalCost(order.getTotalCost());
50 }
51
52 public Timestamp getReceivedTime() {
53 return receivedTime;
54 }
55
56 public void setReceivedTime(Timestamp receivedTime) {
57 this.receivedTime = receivedTime;
58 }
59
60 public String getProcessingStatus() {
61 return processingStatus;
62 }
63
64 public void setProcessingStatus(String processingStatus) {
65 this.processingStatus = processingStatus;
66 }
67
68 public static final String PROCESSING_STATUS_NOT_RECEIVED = "NOT_RECEIVED";
69 public static final String PROCESSING_STATUS_RECEIVED = "RECEIVED";
70 public static final String PROCESSING_STATUS_PROCESSING = "PROCESSING";
71 public static final String PROCESSING_STATUS_MATCHED = "MATCHED";
72 public static final String PROCESSING_STATUS_PARTIALLY_MATCHED = "PARTIALLY_MATCHED";
73
74
75 public int compareCreateTimeTo( Order o ){
76 return (int) getCreationTime().compareTo(o.getCreationTime());
77 }
78 }