protected ServerCriteria getFetchCriteria(DSRequest request) {
OperationMode[] modesFilter = getArrayFilter(request, FILTER_OPERATION_MODE, OperationMode.class);
if (modesFilter == null || modesFilter.length == 0) {
return null; // user didn't select any modes - return null to indicate no data should be displayed
}
ServerCriteria criteria = new ServerCriteria();
// printRequestCriteria(request);
criteria.addFilterId(getFilter(request, FIELD_ID.propertyName(), Integer.class));
criteria.addFilterName(getFilter(request, FIELD_NAME.propertyName(), String.class));
criteria.addFilterAddress(getFilter(request, FILTER_ADDRESS, String.class));
criteria.addFilterPort(getFilter(request, FILTER_PORT, Integer.class));
criteria.addFilterSecurePort(getFilter(request, FILTER_SECURE_PORT, Integer.class));
criteria.addFilterOperationMode(modesFilter);
criteria.addFilterComputePower(getFilter(request, FILTER_COMPUTE_POWER, Integer.class));
criteria.addFilterAffinityGroupId(getFilter(request, FILTER_AFFINITY_GROUP_ID, Integer.class));
//@todo: Remove me when finished debugging search expression
Log.debug(" *** ServerCriteria Search String: " + getFilter(request, "search", String.class));
criteria.setSearchExpression(getFilter(request, "search", String.class));
return criteria;
}