mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
QueryBean generation - use full class names for TQRootBean, TQAssocBean
Rather than imports, such that these are not possible name clashes with beans of the exact same name.
This commit is contained in:
@@ -19,9 +19,6 @@ interface Constants {
|
||||
String DBJSONB = "io.ebean.annotation.DbJsonB";
|
||||
String DBNAME = "io.ebean.annotation.DbName";
|
||||
|
||||
String TQROOTBEAN = "io.ebean.typequery.TQRootBean";
|
||||
String TQASSOCBEAN = "io.ebean.typequery.TQAssocBean";
|
||||
String TQASSOC = "io.ebean.typequery.TQAssoc";
|
||||
String DB = "io.ebean.DB";
|
||||
|
||||
String MODULEINFO = "io.ebean.config.ModuleInfo";
|
||||
|
||||
+3
-10
@@ -76,13 +76,6 @@ class SimpleQueryBeanWriter {
|
||||
|
||||
private void gatherPropertyDetails() {
|
||||
importTypes.add(beanFullName);
|
||||
if (embeddable) {
|
||||
importTypes.add(Constants.TQASSOC);
|
||||
} else {
|
||||
importTypes.add(Constants.TQASSOCBEAN);
|
||||
importTypes.add(Constants.TQROOTBEAN);
|
||||
}
|
||||
|
||||
if (implementsInterface != null) {
|
||||
implementsInterfaceFullName = implementsInterface.getQualifiedName().toString();
|
||||
boolean nested = implementsInterface.getNestingKind().isNested();
|
||||
@@ -233,7 +226,7 @@ class SimpleQueryBeanWriter {
|
||||
writer.append("public final class Q%s {", shortName).eol();
|
||||
} else {
|
||||
writer.append(Constants.AT_TYPEQUERYBEAN).eol();
|
||||
writer.append("public final class Q%s extends TQRootBean<%1$s,Q%1$s> {", shortName).eol();
|
||||
writer.append("public final class Q%s extends io.ebean.typequery.TQRootBean<%1$s,Q%1$s> {", shortName).eol();
|
||||
}
|
||||
writer.eol();
|
||||
}
|
||||
@@ -272,9 +265,9 @@ class SimpleQueryBeanWriter {
|
||||
writer.append(" ").append(Constants.AT_GENERATED).eol();
|
||||
writer.append(" ").append(Constants.AT_TYPEQUERYBEAN).eol();
|
||||
if (embeddable) {
|
||||
writer.append(" public static final class Assoc<R> extends TQAssoc<%s,R> {", shortInnerName).eol();
|
||||
writer.append(" public static final class Assoc<R> extends io.ebean.typequery.TQAssoc<%s,R> {", shortInnerName).eol();
|
||||
} else {
|
||||
writer.append(" public static final class Assoc<R> extends TQAssocBean<%s,R,Q%s> {", shortName, shortInnerName).eol();
|
||||
writer.append(" public static final class Assoc<R> extends io.ebean.typequery.TQAssocBean<%s,R,Q%s> {", shortName, shortInnerName).eol();
|
||||
}
|
||||
for (PropertyMeta property : properties) {
|
||||
writer.append(" ");
|
||||
|
||||
Reference in New Issue
Block a user