add missing static imports to generated source

This commit is contained in:
Gavin King 2024-03-01 19:04:29 +01:00
parent 11fa929f20
commit af285657db
1 changed files with 3 additions and 0 deletions

View File

@ -527,6 +527,7 @@ public abstract class AbstractQueryMethod implements MetaAttribute {
} }
else if ( type.startsWith(JD_ORDER) else if ( type.startsWith(JD_ORDER)
|| type.startsWith(JD_PAGE_REQUEST) ) { || type.startsWith(JD_PAGE_REQUEST) ) {
annotationMetaEntity.staticImport("org.hibernate.query.SortDirection", "*");
declaration declaration
.append("\tfor (var _sort : ") .append("\tfor (var _sort : ")
.append(name) .append(name)
@ -544,6 +545,7 @@ public abstract class AbstractQueryMethod implements MetaAttribute {
} }
else if ( type.startsWith(JD_SORT) && type.endsWith("...") ) { else if ( type.startsWith(JD_SORT) && type.endsWith("...") ) {
// almost identical // almost identical
annotationMetaEntity.staticImport("org.hibernate.query.SortDirection", "*");
declaration declaration
.append("\tfor (var _sort : ") .append("\tfor (var _sort : ")
.append(name) .append(name)
@ -560,6 +562,7 @@ public abstract class AbstractQueryMethod implements MetaAttribute {
.append("\t}\n"); .append("\t}\n");
} }
else if ( type.startsWith(JD_SORT) ) { else if ( type.startsWith(JD_SORT) ) {
annotationMetaEntity.staticImport("org.hibernate.query.SortDirection", "*");
declaration declaration
.append("\t_orders.add(") .append("\t_orders.add(")
.append(annotationMetaEntity.staticImport(HIB_ORDER, "by")) .append(annotationMetaEntity.staticImport(HIB_ORDER, "by"))