Skip to content

Commit d18ef5e

Browse files
committed
JBIDE-27439: Set up a runtime plugin for the Hibernate 6.0.x releases - Add 'FacadeFactoryTest#testCreateQueryExporter()'
Signed-off-by: Koen Aers <koen.aers@gmail.com>
1 parent bc4084b commit d18ef5e

File tree

3 files changed

+10
-8
lines changed
  • orm
    • plugin/runtime/org.jboss.tools.hibernate.runtime.v_6_0/src/org/jboss/tools/hibernate/runtime/v_6_0/internal
    • test/runtime/org.jboss.tools.hibernate.runtime.v_6_0.test/src/org/jboss/tools/hibernate/runtime/v_6_0/internal

3 files changed

+10
-8
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.project
22
.classpath
3+
.java-version
34
.settings/
45
lib/
56
target/

orm/plugin/runtime/org.jboss.tools.hibernate.runtime.v_6_0/src/org/jboss/tools/hibernate/runtime/v_6_0/internal/FacadeFactoryImpl.java

-8
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import org.jboss.tools.hibernate.runtime.spi.IHQLCodeAssist;
1616
import org.jboss.tools.hibernate.runtime.spi.IHQLCompletionProposal;
1717
import org.jboss.tools.hibernate.runtime.spi.IHQLQueryPlan;
18-
import org.jboss.tools.hibernate.runtime.spi.IHbm2DDLExporter;
1918
import org.jboss.tools.hibernate.runtime.spi.IHibernateMappingExporter;
2019
import org.jboss.tools.hibernate.runtime.spi.IJDBCReader;
2120
import org.jboss.tools.hibernate.runtime.spi.IJoin;
@@ -24,7 +23,6 @@
2423
import org.jboss.tools.hibernate.runtime.spi.IPrimaryKey;
2524
import org.jboss.tools.hibernate.runtime.spi.IProperty;
2625
import org.jboss.tools.hibernate.runtime.spi.IQuery;
27-
import org.jboss.tools.hibernate.runtime.spi.IQueryExporter;
2826
import org.jboss.tools.hibernate.runtime.spi.IQueryTranslator;
2927
import org.jboss.tools.hibernate.runtime.spi.ISchemaExport;
3028
import org.jboss.tools.hibernate.runtime.spi.ISession;
@@ -50,12 +48,6 @@ public IGenericExporter createGenericExporter(Object target) {
5048
return new GenericExporterFacadeImpl(this, target);
5149
}
5250

53-
@Override
54-
public IQueryExporter createQueryExporter(Object target) {
55-
// TODO Auto-generated method stub
56-
return null;
57-
}
58-
5951
@Override
6052
public ITableFilter createTableFilter(Object target) {
6153
// TODO Auto-generated method stub

orm/test/runtime/org.jboss.tools.hibernate.runtime.v_6_0.test/src/org/jboss/tools/hibernate/runtime/v_6_0/internal/FacadeFactoryTest.java

+9
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import org.hibernate.tool.internal.export.common.GenericExporter;
2121
import org.hibernate.tool.internal.export.ddl.DdlExporter;
2222
import org.hibernate.tool.internal.export.hbm.Cfg2HbmTool;
23+
import org.hibernate.tool.internal.export.query.QueryExporter;
2324
import org.hibernate.tool.internal.reveng.strategy.OverrideRepository;
2425
import org.jboss.tools.hibernate.runtime.common.IFacade;
2526
import org.jboss.tools.hibernate.runtime.spi.IArtifactCollector;
@@ -29,6 +30,7 @@
2930
import org.jboss.tools.hibernate.runtime.spi.INamingStrategy;
3031
import org.jboss.tools.hibernate.runtime.spi.IOverrideRepository;
3132
import org.jboss.tools.hibernate.runtime.spi.IPersistentClass;
33+
import org.jboss.tools.hibernate.runtime.spi.IQueryExporter;
3234
import org.jboss.tools.hibernate.runtime.spi.IReverseEngineeringSettings;
3335
import org.jboss.tools.hibernate.runtime.spi.IReverseEngineeringStrategy;
3436
import org.jboss.tools.hibernate.runtime.spi.ISchemaExport;
@@ -119,6 +121,13 @@ public void testCreateGenericExporter() {
119121
assertSame(genericExporter, ((IFacade)facade).getTarget());
120122
}
121123

124+
@Test
125+
public void testCreateQueryExporter() {
126+
QueryExporter queryExporter = new QueryExporter();
127+
IQueryExporter facade = facadeFactory.createQueryExporter(queryExporter);
128+
Assert.assertSame(queryExporter, ((IFacade)facade).getTarget());
129+
}
130+
122131
@Test
123132
public void testCreateHbm2DDLExporter() {
124133
DdlExporter ddlExporter = new DdlExporter();

0 commit comments

Comments
 (0)