getProjectController().getPreferenceForDataDomain().node(
"DataNode").node(node.getName()));
String key = (nodeDefaults != null) ? nodeDefaults.getLocalDataSource() : null;
if (key != null) {
DBConnectionInfo info = (DBConnectionInfo) getApplication()
.getCayenneProjectPreferences()
.getDetailObject(DBConnectionInfo.class)
.getObject(key);
if (info != null) {
return info;
}
}
// extract data from the node
if (!XMLPoolingDataSourceFactory.class.getName().equals(
node.getDataSourceFactoryType())) {
return null;
}
// create transient object..
DBConnectionInfo nodeInfo = new DBConnectionInfo();
nodeInfo.copyFrom(node.getDataSourceDescriptor());
nodeInfo.setDbAdapter(node.getAdapterType());
return nodeInfo;
}