class ServiceRegistryImpl implements ServiceRegistry {

	@Override
	public List<ServiceInfo> getAllServicesForInstance(String instanceId) throws RiceIllegalArgumentException {
		if (StringUtils.isBlank(instanceId)) {
			throw new RiceIllegalArgumentException("instanceId cannot be blank");
		}
        QueryByCriteria.Builder builder = QueryByCriteria.Builder.create();
        builder.setPredicates(equal("instanceId",instanceId));
        List<ServiceInfoBo> serviceInfoBos = getDataObjectService().findMatching(
                ServiceInfoBo.class,builder.build()).getResults();
		return convertServiceInfoBoList(serviceInfoBos);
	}

}