68 |
} |
} |
69 |
|
|
70 |
public void renameResultTables() throws SQLException { |
public void renameResultTables() throws SQLException { |
71 |
|
if (LookupMain.test_mode == true) { |
72 |
|
throw new RuntimeException("Can not rename tables in test mode"); |
73 |
|
} |
74 |
|
|
75 |
Constants consts = Constants.getInstance(); |
Constants consts = Constants.getInstance(); |
76 |
String ext = consts.getTableExtension(); |
String ext = consts.getTableExtension(); |
77 |
|
|
105 |
"FROM fulddaekning.adressetabel a " + |
"FROM fulddaekning.adressetabel a " + |
106 |
"LEFT JOIN bogleveringer.postnummerdistributor p on (a.postnr=p.postnr) " + |
"LEFT JOIN bogleveringer.postnummerdistributor p on (a.postnr=p.postnr) " + |
107 |
"WHERE rute IS NULL " + //Ingen dækning |
"WHERE rute IS NULL " + //Ingen dækning |
108 |
//"AND a.postnr BETWEEN ? AND ? " + |
"AND a.postnr BETWEEN ? AND ? " + |
|
"AND a.postnr BETWEEN 8000 and 8600 " + |
|
|
//"AND a.postnr BETWEEN 9000 AND 9300 " + |
|
109 |
"AND latitude IS NOT NULL " + |
"AND latitude IS NOT NULL " + |
110 |
"AND longitude IS NOT NULL " + |
"AND longitude IS NOT NULL " + |
111 |
"AND gadeid IS NOT NULL " + |
"AND gadeid IS NOT NULL " + |
112 |
"AND (a.distributor IS NULL OR a.distributor<>'LUKKET') " + |
"AND (a.distributor IS NULL OR a.distributor<>'LUKKET') " |
113 |
"LIMIT 2500"; |
; |
114 |
|
|
115 |
|
if (LookupMain.test_mode == true) { |
116 |
|
sql = sql + " LIMIT 100 "; |
117 |
|
} |
118 |
|
|
119 |
PreparedStatement stmt = conn.prepareStatement(sql); |
PreparedStatement stmt = conn.prepareStatement(sql); |
120 |
//stmt.setInt(1, minPostnr); |
stmt.setInt(1, minPostnr); |
121 |
//stmt.setInt(2, maxPostnr); |
stmt.setInt(2, maxPostnr); |
122 |
|
|
123 |
List<Adresse> list = hentAdresseListe( stmt ); |
List<Adresse> list = hentAdresseListe( stmt ); |
124 |
alleIkkeDaekkede = list.toArray( new Adresse[ list.size() ] ); |
alleIkkeDaekkede = list.toArray( new Adresse[ list.size() ] ); |
167 |
"AND latitude IS NOT NULL " + |
"AND latitude IS NOT NULL " + |
168 |
"AND longitude IS NOT NULL " + |
"AND longitude IS NOT NULL " + |
169 |
"AND a.distributor = ? "; |
"AND a.distributor = ? "; |
170 |
|
|
171 |
|
if (LookupMain.test_mode == true) { |
172 |
|
sql = sql + " AND a.postnr BETWEEN 6000 and 7200 "; |
173 |
|
} |
174 |
|
|
175 |
// Forward only + concur_read_only + fetchsize tvinger driver til at hente en række af gangen (bedre performance ved store result sets) |
// Forward only + concur_read_only + fetchsize tvinger driver til at hente en række af gangen (bedre performance ved store result sets) |
176 |
// Se http://dev.mysql.com/doc/connector-j/en/connector-j-reference-implementation-notes.html |
// Se http://dev.mysql.com/doc/connector-j/en/connector-j-reference-implementation-notes.html |