344 |
return station; |
return station; |
345 |
} |
} |
346 |
|
|
347 |
|
public boolean hasDisabledStation(final String name) throws SQLException { |
348 |
|
String SQL = "Select count(*) as antal from trainstations where name = '" + name + "' and enabled=false " ; |
349 |
|
|
350 |
|
Connection conn = DBConnection.getConnection(); |
351 |
|
Statement stmt = conn.createStatement(); |
352 |
|
ResultSet rs = stmt.executeQuery( SQL ); |
353 |
|
|
354 |
|
rs.next(); |
355 |
|
|
356 |
|
int antal = rs.getInt(1); |
357 |
|
|
358 |
|
rs.close(); |
359 |
|
stmt.close(); |
360 |
|
conn.close(); |
361 |
|
|
362 |
|
return (antal > 0); |
363 |
|
} |
364 |
|
|
365 |
|
|
366 |
@Deprecated |
@Deprecated |