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);
PropertyBridge propertyBridge = new PropertyBridge(propertyBridgeURI);
propertyBridge.setBelongsToClassMap(classMap);
propertyBridge.addProperty(valueProperty);
propertyBridge.setColumn("T_" + datatype + ".VALUE");
classMap.addPropertyBridge(propertyBridge);
return mapping;
}