summaryrefslogtreecommitdiffstats
path: root/Parse/SqlPoller.java
blob: 2d528dd5ebdd6a92d725b6a50606f7f36e33fee0 (plain) (blame)
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
package Parse;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.concurrent.Callable;

import DataStructure.MobilePhone;

public class SqlPoller implements Callable<ArrayList<MobilePhone>> {
	static long last_id;
	static Connection cn;

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

	public SqlPoller() {
		try {
			if (cn == null || cn.isClosed()) {
				Class.forName("com.mysql.jdbc.Driver");
				cn = DriverManager.getConnection(
						"jdbc:mysql://132.230.4.13:3306/logging", "richard",
						"uh237Aug.ad7");
			}
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	@Override
	public ArrayList<MobilePhone> call() throws Exception {
		// make a statement

		// TODO Auto-generated method stub
		return null;
	}
}