return new GraphD2RQ(mapping);
}
private Mapping generateMapping() {
Mapping mapping = new Mapping();
Database database = new Database(dbURI);
database.setJDBCDSN(jdbcURL);
database.setJDBCDriver(driver);
database.setUsername(user);
database.setPassword(password);
database.setStartupSQLScript(ResourceFactory.createResource("file:" + script));
mapping.addDatabase(database);
ClassMap classMap = new ClassMap(classMapURI);
classMap.setDatabase(database);
classMap.setURIPattern("row/@@T_" + datatype + ".ID@@");
mapping.addClassMap(classMap);