use of org.apache.cayenne.access.DataRowStore in project cayenne by apache.
the class DataContextFactory method createFromGenericChannel.
protected ObjectContext createFromGenericChannel(DataChannel parent) {
// for new dataRowStores use the same name for all stores
// it makes it easier to track the event subject
DataRowStore snapshotCache = (dataDomain.isSharedCacheEnabled()) ? dataDomain.getSharedSnapshotCache() : dataRowStoreFactory.createDataRowStore(dataDomain.getName());
DataContext context = newInstance(parent, objectStoreFactory.createObjectStore(snapshotCache));
context.setValidatingObjectsOnCommit(dataDomain.isValidatingObjectsOnCommit());
context.setQueryCache(new NestedQueryCache(queryCache));
return context;
}
use of org.apache.cayenne.access.DataRowStore in project cayenne by apache.
the class DataContextFactory method createdFromDataDomain.
protected ObjectContext createdFromDataDomain(DataDomain parent) {
// for new dataRowStores use the same name for all stores
// it makes it easier to track the event subject
DataRowStore snapshotCache = (parent.isSharedCacheEnabled()) ? parent.getSharedSnapshotCache() : dataRowStoreFactory.createDataRowStore(parent.getName());
DataContext context = newInstance(parent, objectStoreFactory.createObjectStore(snapshotCache));
context.setValidatingObjectsOnCommit(parent.isValidatingObjectsOnCommit());
context.setQueryCache(new NestedQueryCache(queryCache));
context.setTransactionFactory(transactionFactory);
return context;
}
Aggregations