class KewTypeBoServiceImpl implements KewTypeRepositoryService {

    @Override
    public List<KewTypeDefinition> findAllTypesByNamespace(final String namespace) {
        if (StringUtils.isBlank(namespace)) {
            throw new RiceIllegalArgumentException("namespace is blank");
        }

        QueryByCriteria.Builder criteria = QueryByCriteria.Builder.create();
        criteria.setPredicates(equal("namespace", namespace), equal("active", Boolean.TRUE));
        Collection<KewTypeBo> kewTypeBos = dataObjectService.findMatching(KewTypeBo.class,
                criteria.build()).getResults();

        return convertListOfBosToImmutables(kewTypeBos);
    }

}