connect = connection;
}
@Override
public void handle(ActionEvent arg0) {
SQLQuery query = new SearchRoomQuery(connect, results);
LinkedList<Object> args = new LinkedList<Object>();
Integer pc = Integer.MAX_VALUE;
Integer cost = Integer.MAX_VALUE;
try {
pc = Integer.parseInt(tfpcount.getText());
} catch (NumberFormatException e) {
// ignore
}
try {
cost = Integer.parseInt(tfcost.getText());
} catch (NumberFormatException e) {
// ignore
}
args.addLast(pc);
args.addLast(cost);
args.addLast(new Boolean(chckbxdesc.isSelected()));
args.addLast(chbbar.getValue());
try {
query.prepareQuery(args);
query.doQuery();
query.close();
} catch (SQLException e) {
results.appendText(e.getMessage() + '\n');
e.printStackTrace();
}
}