throw new XOException("Property '" + DELEGATE_KEY + "' must be specified using the class name of a data store provider.");
}
Class<XODatastoreProvider> delegateProviderType = ClassHelper.getType(delegateProviderName);
XODatastoreProvider<EntityMetadata, EntityDiscriminator, RelationMetadata, RelationDiscriminator> delegateProvider = ClassHelper.newInstance(delegateProviderType);
Datastore<?, EntityMetadata, EntityDiscriminator, RelationMetadata, RelationDiscriminator> delegateDatastore = delegateProvider.createDatastore(xoUnit);
TraceMonitor traceMonitor = new TraceMonitor(xoUnit);
InterceptorFactory interceptorFactory = new InterceptorFactory(Arrays.asList(new TraceMonitorInterceptor(traceMonitor)));
return new TraceDatastore<>(interceptorFactory.addInterceptor(delegateDatastore, Datastore.class), interceptorFactory, traceMonitor);
}