this.metadataProvider = metadataProvider;
this.pluginRepositoryManager = pluginRepositoryManager;
this.datastoreSession = datastoreSession;
this.entityCache = new TransactionalCache<>();
this.relationCache = new TransactionalCache<>();
DatastoreTransaction datastoreTransaction = datastoreSession.getDatastoreTransaction();
this.xoTransaction = datastoreTransaction != null ? new XOTransactionImpl(datastoreTransaction) : null;
List<XOInterceptor> interceptorChain = new ArrayList<>();
interceptorChain.add(new ConcurrencyInterceptor(concurrencyMode));
interceptorChain.add(new TransactionInterceptor(xoTransaction, defaultTransactionAttribute));
this.interceptorFactory = new InterceptorFactory(interceptorChain);