use of org.jboss.tools.hibernate.runtime.common.IFacade in project jbosstools-hibernate by jbosstools.
the class ServiceImpl method newSchemaExport.
@Override
public ISchemaExport newSchemaExport(IConfiguration hcfg) {
ISchemaExport result = null;
if (hcfg instanceof IFacade) {
Configuration configuration = (Configuration) ((IFacade) hcfg).getTarget();
MetadataImplementor metadata = (MetadataImplementor) MetadataHelper.getMetadata(configuration);
SchemaExport schemaExport = new SchemaExport(metadata);
result = facadeFactory.createSchemaExport(schemaExport);
}
return result;
}
use of org.jboss.tools.hibernate.runtime.common.IFacade in project jbosstools-hibernate by jbosstools.
the class ServiceImpl method newHQLQueryPlan.
@Override
public IHQLQueryPlan newHQLQueryPlan(String query, boolean shallow, ISessionFactory sessionFactory) {
assert sessionFactory instanceof IFacade;
SessionFactoryImpl factory = (SessionFactoryImpl) ((IFacade) sessionFactory).getTarget();
Map<String, Filter> enabledFilters = Collections.emptyMap();
HQLQueryPlan queryPlan = new HQLQueryPlan(query, shallow, enabledFilters, factory);
return facadeFactory.createHQLQueryPlan(queryPlan);
}
use of org.jboss.tools.hibernate.runtime.common.IFacade in project jbosstools-hibernate by jbosstools.
the class ServiceImpl method newDatabaseCollector.
@Override
public IDatabaseCollector newDatabaseCollector(IJDBCReader jdbcReader) {
assert jdbcReader instanceof IFacade;
JDBCReader jdbcReaderTarget = (JDBCReader) ((IFacade) jdbcReader).getTarget();
MetaDataDialect metadataDialect = jdbcReaderTarget.getMetaDataDialect();
return facadeFactory.createDatabaseCollector(new DefaultDatabaseCollector(metadataDialect));
}
use of org.jboss.tools.hibernate.runtime.common.IFacade in project jbosstools-hibernate by jbosstools.
the class ServiceImpl method newJoinedSubclass.
@Override
public IPersistentClass newJoinedSubclass(IPersistentClass persistentClass) {
assert persistentClass instanceof IFacade;
IPersistentClass result = facadeFactory.createPersistentClass(new JoinedSubclass((PersistentClass) ((IFacade) persistentClass).getTarget(), null));
((AbstractPersistentClassFacade) result).setSuperClass(persistentClass);
return result;
}
use of org.jboss.tools.hibernate.runtime.common.IFacade in project jbosstools-hibernate by jbosstools.
the class ServiceImpl method newJoinedSubclass.
@Override
public IPersistentClass newJoinedSubclass(IPersistentClass persistentClass) {
assert persistentClass instanceof IFacade;
IPersistentClass result = facadeFactory.createPersistentClass(new JoinedSubclass((PersistentClass) ((IFacade) persistentClass).getTarget(), null));
((AbstractPersistentClassFacade) result).setSuperClass(persistentClass);
return result;
}
Aggregations