private ZoneTypeDAO() {
}
public static ZoneType getZoneType(int zone_type_id) throws SQLException {
ZoneType zoneType = null;
String query = "SELECT * FROM `zone_type` WHERE `zone_type_id` = ?";
Connection connection = null;
PreparedStatement pstmt = null;
try {
connection = DAO.getDataSource().getConnection();
pstmt = connection.prepareStatement(query);
pstmt.setInt(1, zone_type_id);
ResultSet rs = pstmt.executeQuery();
if (rs.next()) {
zoneType = new ZoneType(zone_type_id, rs.getBoolean("contains_water"));
}
pstmt.close();
} finally {
if (connection != null) {