if (containedClass.isInstance(value)) {
return getVertexForInstanceOfDataType(value, cascade, objectsBeingUpdated, allowIdGeneration);
}
Class<? extends Object> valueClass = value.getClass();
if (repository.containsKey(valueClass)) {
FinderCrudService service = repository.get(valueClass);
if (service instanceof AbstractBluePrintsBackedFinderService) {
return ((AbstractBluePrintsBackedFinderService) service).getVertexFor(value, cascade, objectsBeingUpdated);
} else {
throw new IncompatibleServiceException(service, valueClass);
}