use of org.apache.cayenne.access.dbsync.SkipSchemaUpdateStrategy in project cayenne by apache.
the class SchemaBuilder method initNode.
private void initNode(DataMap map) throws Exception {
DataNode node = new DataNode(map.getName());
node.setJdbcEventLogger(jdbcEventLogger);
node.setAdapter(dbAdapter);
node.setDataSource(dataSourceFactory.getSharedDataSource());
// setup test extended types
node.getAdapter().getExtendedTypes().registerType(new StringET1ExtendedType());
// tweak mapping with a delegate
for (Procedure proc : map.getProcedures()) {
unitDbAdapter.tweakProcedure(proc);
}
filterDataMap(map);
node.addDataMap(map);
node.setSchemaUpdateStrategy(new SkipSchemaUpdateStrategy());
node.setRowReaderFactory(new DefaultRowReaderFactory());
node.setBatchTranslatorFactory(new DefaultBatchTranslatorFactory());
node.setSelectTranslatorFactory(new DefaultSelectTranslatorFactory());
domain.addNode(node);
}
use of org.apache.cayenne.access.dbsync.SkipSchemaUpdateStrategy in project cayenne by apache.
the class ServerCaseDataNodeFactory method createDataNode.
@Override
public DataNode createDataNode(DataNodeDescriptor nodeDescriptor) throws Exception {
DataNode dataNode = new DataNode(nodeDescriptor.getName());
dataNode.setJdbcEventLogger(jdbcEventLogger);
dataNode.setRowReaderFactory(rowReaderFactory);
dataNode.setBatchTranslatorFactory(batchTranslatorFactory);
dataNode.setSelectTranslatorFactory(selectTranslatorFactory);
// shared or dedicated DataSources can be mapped per DataMap
dataNode.setDataSource(dataSourceFactory.getDataSource(nodeDescriptor.getName()));
dataNode.setAdapter(adapter);
dataNode.setSchemaUpdateStrategy(new SkipSchemaUpdateStrategy());
dataNode.setSqlTemplateProcessor(sqlTemplateProcessor);
return dataNode;
}
Aggregations