Search in sources :

Example 1 with ConfigurationFactory

use of org.hibernate.console.ConfigurationFactory in project jbosstools-hibernate by jbosstools.

the class HibernateExtension method buildWith.

public IConfiguration buildWith(final IConfiguration cfg, final boolean includeMappings) {
    reinitClassLoader();
    // TODO handle user libraries here
    executionContext = new DefaultExecutionContext(prefs.getName(), classLoader);
    IConfiguration result = (IConfiguration) execute(new Command() {

        public Object execute() {
            ConfigurationFactory cf = new ConfigurationFactory(prefs, fakeDrivers);
            return cf.createConfiguration(cfg, includeMappings);
        }
    });
    return result;
}
Also used : DefaultExecutionContext(org.hibernate.console.execution.DefaultExecutionContext) Command(org.hibernate.console.execution.ExecutionContext.Command) ConfigurationFactory(org.hibernate.console.ConfigurationFactory) IConfiguration(org.jboss.tools.hibernate.runtime.spi.IConfiguration)

Aggregations

ConfigurationFactory (org.hibernate.console.ConfigurationFactory)1 DefaultExecutionContext (org.hibernate.console.execution.DefaultExecutionContext)1 Command (org.hibernate.console.execution.ExecutionContext.Command)1 IConfiguration (org.jboss.tools.hibernate.runtime.spi.IConfiguration)1