}
@Override
protected DriftDefinitionTemplateCriteria getFetchCriteria(DSRequest request) {
DriftDefinitionTemplateCriteria criteria = new DriftDefinitionTemplateCriteria();
criteria.addFilterResourceTypeId(resourceTypeId);
// I'm fetching these only to get the count of defs for the template. If it ends up being too slow
// then we'll probably need to create a criteria method that returns a composite.
criteria.fetchDriftDefinitions(true);
// filter out unsortable fields (i.e. fields sorted client-side only)
PageControl pageControl = getPageControl(request);
pageControl.removeOrderingField(ATTR_DEFINED_BY);
pageControl.removeOrderingField(ATTR_PINNED);
pageControl.removeOrderingField(ATTR_NUM_DEFINITIONS);
pageControl.removeOrderingField(ATTR_IS_ENABLED);
pageControl.removeOrderingField(ATTR_DRIFT_HANDLING_MODE);
pageControl.removeOrderingField(ATTR_INTERVAL);
pageControl.removeOrderingField(ATTR_BASE_DIR_STRING);
criteria.setPageControl(pageControl);
return criteria;
}