statement.setInt(1, resource.getResourceID());
ResultSet result = statement.executeQuery();
if (result.next()) {
int count = result.getInt("count");
if (count > 0) {
throw new ResourceHasActiveProjectException();
}
}
} catch (SQLException e) {
throw new DAOException();