Implemention for getting Custom Criteria from DB