public boolean supports(Class arg0) {
return clazz.isAssignableFrom(arg0);
}
public void validate(Object arg0, Errors arg1) {
PJSearchDTO dto = (PJSearchDTO) arg0;
if (dto.getSearchMode() != null) {
if (dto.getAdvancedSyntax()) {
ValidationUtils.rejectIfEmptyOrWhitespace(arg1, "queryString",
"error.validation.hku.search.query.empty");
}
} else if (dto.getCodeSearchMode() != null) {
ValidationUtils.rejectIfEmptyOrWhitespace(arg1, "codeQuery",
"error.validation.hku.search.query.empty");
} else {
arg1.reject("error.validation.hku.search.unknow-mode");
}