use of org.hibernate.dialect.Dialect in project jbosstools-hibernate by jbosstools.
the class DummyMetadataBuildingContextTest method testInstance.
@Test
public void testInstance() {
assertNotNull(DummyMetadataBuildingContext.INSTANCE);
StandardServiceRegistry serviceRegistry = DummyMetadataBuildingContext.INSTANCE.getBootstrapContext().getServiceRegistry();
JdbcServices jdbcServices = serviceRegistry.getService(JdbcServices.class);
Dialect dialect = jdbcServices.getDialect();
assertTrue(dialect instanceof MockDialect);
}
use of org.hibernate.dialect.Dialect in project jbosstools-hibernate by jbosstools.
the class ColumnFacadeImpl method getSqlType.
@Override
public String getSqlType(IConfiguration configuration) {
Column targetColumn = (Column) getTarget();
Configuration configurationTarget = (Configuration) ((IFacade) configuration).getTarget();
Properties properties = configurationTarget.getProperties();
StandardServiceRegistryBuilder ssrb = new StandardServiceRegistryBuilder();
ssrb.applySettings(properties);
StandardServiceRegistry ssr = ssrb.build();
DialectFactory df = ssr.getService(DialectFactory.class);
Dialect dialectTarget = df.buildDialect(properties, null);
return targetColumn.getSqlType(dialectTarget, MetadataHelper.getMetadata(configurationTarget));
}
use of org.hibernate.dialect.Dialect in project jbosstools-hibernate by jbosstools.
the class ColumnFacadeImpl method getSqlType.
@Override
public String getSqlType(IConfiguration configuration) {
Column targetColumn = (Column) getTarget();
Configuration configurationTarget = (Configuration) ((IFacade) configuration).getTarget();
Properties properties = configurationTarget.getProperties();
StandardServiceRegistryBuilder ssrb = new StandardServiceRegistryBuilder();
ssrb.applySettings(properties);
StandardServiceRegistry ssr = ssrb.build();
DialectFactory df = ssr.getService(DialectFactory.class);
Dialect dialectTarget = df.buildDialect(properties, null);
return targetColumn.getSqlType(dialectTarget, MetadataHelper.getMetadata(configurationTarget));
}
use of org.hibernate.dialect.Dialect in project jbosstools-hibernate by jbosstools.
the class ColumnFacadeImpl method getSqlType.
@Override
public String getSqlType(IConfiguration configuration) {
Column targetColumn = (Column) getTarget();
Configuration configurationTarget = (Configuration) ((IFacade) configuration).getTarget();
Properties properties = configurationTarget.getProperties();
StandardServiceRegistryBuilder ssrb = new StandardServiceRegistryBuilder();
ssrb.applySettings(properties);
StandardServiceRegistry ssr = ssrb.build();
DialectFactory df = ssr.getService(DialectFactory.class);
Dialect dialectTarget = df.buildDialect(properties, null);
return targetColumn.getSqlType(dialectTarget, MetadataHelper.getMetadata(configurationTarget));
}
use of org.hibernate.dialect.Dialect in project jbosstools-hibernate by jbosstools.
the class DummyMetadataBuildingContextTest method testInstance.
@Test
public void testInstance() {
assertNotNull(DummyMetadataBuildingContext.INSTANCE);
StandardServiceRegistry serviceRegistry = DummyMetadataBuildingContext.INSTANCE.getBootstrapContext().getServiceRegistry();
JdbcServices jdbcServices = serviceRegistry.getService(JdbcServices.class);
Dialect dialect = jdbcServices.getDialect();
assertTrue(dialect instanceof MockDialect);
}
Aggregations