public void validateQuery(ERD2WQueryPage sender) {
d2wContext = sender.d2wContext();
// First check to see if there are any query values.
WODisplayGroup displayGroup = sender.displayGroup();
if (displayGroup.queryMatch().allKeys().count() == 0 && displayGroup.queryMin().allKeys().count() == 0 &&
displayGroup.queryMax().allKeys().count() == 0 && displayGroup.queryBindings().allKeys().count() == 0 &&
!ERXValueUtilities.booleanValueWithDefault(d2wContext.valueForKey(ValidationKeys.AllowsEmptyQuery), true)) {
throw ERXValidationFactory.defaultFactory().createCustomException(null, ErrorKeys.QueryEmpty);
}