}
public void init(SGFactory pFactory) {
super.init(pFactory);
sgFactory = pFactory;
SchemaReader schemaReader = pFactory.getGenerator().getSchemaReader();
if (schemaReader instanceof JaxMeSchemaReader) {
JaxMeSchemaReader jaxmeSchemaReader = (JaxMeSchemaReader) schemaReader;
jaxmeSchemaReader.addXsObjectCreator(new XsObjectCreator(){
public XsObject newBean(XsObject pParent, Locator pLocator, XsQName pQName) throws SAXException {
if (pParent instanceof XsEAppinfo) {
if (JAXME_JDBC_SCHEMA_URI.equals(pQName.getNamespaceURI())) {
if ("table".equals(pQName.getLocalName())) {
return new TableDetails(JaxMeJdbcSG.this, pParent);
} else if ("connection".equals(pQName.getLocalName())) {
return new ConnectionDetails(JaxMeJdbcSG.this, pParent);
} else {
throw new LocSAXException("Invalid element name: " + pQName, pLocator);
}
}
}
return null;
}
});
} else {
throw new IllegalStateException("The schema reader " + schemaReader.getClass().getName() +
" is not an instance of " + JaxMeSchemaReader.class.getName());
}
String s = schemaReader.getGenerator().getProperty("jdbc.sqlFactory");
if (s == null) {
sqlFactory = new SQLFactoryImpl();
} else {
Class c;
try {