QueryBean generation - use fully qualify use of DB

This commit is contained in:
Rob Bygrave
2023-11-29 00:22:45 +13:00
parent a8ce726e47
commit 3fd9ae06db
2 changed files with 2 additions and 7 deletions
@@ -19,8 +19,6 @@ interface Constants {
String DBJSONB = "io.ebean.annotation.DbJsonB";
String DBNAME = "io.ebean.annotation.DbName";
String DB = "io.ebean.DB";
String MODULEINFO = "io.ebean.config.ModuleInfo";
String METAINF_MANIFEST = "META-INF/ebean-generated-info.mf";
String METAINF_SERVICES_MODULELOADER = "META-INF/services/io.ebean.config.EntityClassRegister";
@@ -85,9 +85,6 @@ class SimpleQueryBeanWriter {
importTypes.add(Constants.JAVA_COLLECTION);
importTypes.add(implementsInterfaceFullName);
}
if (dbName != null) {
importTypes.add(Constants.DB);
}
addClassProperties();
}
@@ -164,7 +161,7 @@ class SimpleQueryBeanWriter {
if (dbName == null) {
writer.append(" super(%s.class);", shortName).eol();
} else {
writer.append(" super(%s.class, DB.byName(\"%s\"));", shortName, dbName).eol();
writer.append(" super(%s.class, io.ebean.DB.byName(\"%s\"));", shortName, dbName).eol();
}
writer.append(" }").eol();
writer.eol();
@@ -174,7 +171,7 @@ class SimpleQueryBeanWriter {
if (dbName == null) {
writer.append(" super(%s.class, transaction);", shortName).eol();
} else {
writer.append(" super(%s.class, DB.byName(\"%s\"), transaction);", shortName, dbName).eol();
writer.append(" super(%s.class, io.ebean.DB.byName(\"%s\"), transaction);", shortName, dbName).eol();
}
writer.append(" }").eol();