-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtuple.java
More file actions
113 lines (96 loc) · 2.37 KB
/
Copy pathtuple.java
File metadata and controls
113 lines (96 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Calendar;
import java.util.Date;
import org.apache.commons.collections4.MultiValuedMap;
import org.apache.commons.collections4.multimap.ArrayListValuedHashMap;
import java.sql.*;
public class tuple {
private String product_id;
private String customer_id;
private String store_id;
private String customer_name;
private String t_id;
private String store_name;
private Date t_date;
private int quantity;
private Integer transaction_id;
public int trans;
public tuple()
{
this.product_id="";
this.customer_id="";
this.store_id="";
this.customer_name="";
this.store_name="";
this.t_id="";
this.t_date=null;
this.quantity=0;
this.transaction_id=0;
this.trans=this.transaction_id;
}
public tuple(ResultSet transactions) throws SQLException
{
this.product_id=transactions.getString("PRODUCT_ID");
this.customer_id=transactions.getString("CUSTOMER_ID");
this.store_id=transactions.getString("STORE_ID");
// this.customer_name=transactions.getString("CUSTOMER_NAME");
this.store_name=transactions.getString("STORE_NAME");
this.t_id=transactions.getString("TIME_ID");
this.t_date=transactions.getDate("T_DATE");
this.quantity=transactions.getInt("QUANTITY");
this.transaction_id=transactions.getInt("TRANSACTION_ID");
this.trans=this.transaction_id;
}
public String getProductID()
{
return this.product_id;
}
public String getCustomerID()
{
return this.customer_id;
}
// public String getCustomerName()
// {
// return "Bukhari";
// }
public String getStoreID()
{
return this.store_id;
}
public String getStoreName()
{
return this.store_name;
}
public int getQuantity()
{
return this.quantity;
}
public String getT_id()
{
return this.t_id;
}
public Date getDate()
{
return this.t_date;
}
public int getID()
{
return this.transaction_id;
}
@Override
public boolean equals(Object obj)
{
tuple x=(tuple) obj;
//// System.out.print("Transaction ID: "+this.transaction_id +" Object TD : "+x.transaction_id+"\n");
if(this.transaction_id == x.transaction_id)
return true;
return false;
}
@Override
public int hashCode() {
return transaction_id.hashCode();
}
}