Implementation for getCustomCriteria