Rename TQRootBean to QueryBean

This commit is contained in:
Rob Bygrave
2024-04-05 22:08:26 +13:00
parent b34704a1fa
commit 1f841982a5
12 changed files with 27 additions and 27 deletions
+1 -1
View File
@@ -100,7 +100,7 @@
<extensions>true</extensions>
<configuration>
<tiles>
<tile>io.ebean.tile:enhancement:14.1.0</tile>
<tile>io.ebean.tile:enhancement:14.2.0</tile>
</tiles>
</configuration>
</plugin>
@@ -57,7 +57,7 @@ import java.util.stream.Stream;
* @param <R> the specific root query bean type (e.g. QCustomer)
*/
@NonNullApi
public abstract class TQRootBean<T, R> implements IQueryBean<T, R> {
public abstract class QueryBean<T, R> implements IQueryBean<T, R> {
/**
* The underlying query.
@@ -88,21 +88,21 @@ public abstract class TQRootBean<T, R> implements IQueryBean<T, R> {
/**
* Construct using the type of bean to query on and the default database.
*/
public TQRootBean(Class<T> beanType) {
public QueryBean(Class<T> beanType) {
this(beanType, DB.getDefault());
}
/**
* Construct using the type of bean to query on and a given database.
*/
public TQRootBean(Class<T> beanType, Database database) {
public QueryBean(Class<T> beanType, Database database) {
this(database.find(beanType));
}
/**
* Construct with a transaction.
*/
protected TQRootBean(Class<T> beanType, Transaction transaction) {
protected QueryBean(Class<T> beanType, Transaction transaction) {
this(beanType);
query.usingTransaction(transaction);
}
@@ -110,7 +110,7 @@ public abstract class TQRootBean<T, R> implements IQueryBean<T, R> {
/**
* Construct with a database and transaction.
*/
protected TQRootBean(Class<T> beanType, Database database, Transaction transaction) {
protected QueryBean(Class<T> beanType, Database database, Transaction transaction) {
this(beanType, database);
query.usingTransaction(transaction);
}
@@ -119,7 +119,7 @@ public abstract class TQRootBean<T, R> implements IQueryBean<T, R> {
* Construct using a query.
*/
@SuppressWarnings("unchecked")
public TQRootBean(Query<T> query) {
public QueryBean(Query<T> query) {
this.query = query;
this.root = (R) this;
}
@@ -129,13 +129,13 @@ public abstract class TQRootBean<T, R> implements IQueryBean<T, R> {
* values for select() and fetch().
*/
@SuppressWarnings("unchecked")
public TQRootBean(boolean aliasDummy) {
public QueryBean(boolean aliasDummy) {
this.query = null;
this.root = (R) this;
}
/** Construct for FilterMany */
protected TQRootBean(ExpressionList<T> filter) {
protected QueryBean(ExpressionList<T> filter) {
this.query = null;
this.root = null;
this.whereStack = new ArrayStack<>();
@@ -46,7 +46,7 @@ public abstract class TQAssocBean<T, R, QB> extends TQAssoc<T, R> {
* Eagerly fetch this association fetching all the properties.
*/
public final R fetch() {
((TQRootBean) _root).query().fetch(_name);
((QueryBean) _root).query().fetch(_name);
return _root;
}
@@ -54,7 +54,7 @@ public abstract class TQAssocBean<T, R, QB> extends TQAssoc<T, R> {
* Eagerly fetch this association using a "query join".
*/
public final R fetchQuery() {
((TQRootBean) _root).query().fetchQuery(_name);
((QueryBean) _root).query().fetchQuery(_name);
return _root;
}
@@ -63,7 +63,7 @@ public abstract class TQAssocBean<T, R, QB> extends TQAssoc<T, R> {
* Cache misses are populated via fetchQuery().
*/
public final R fetchCache() {
((TQRootBean) _root).query().fetchCache(_name);
((QueryBean) _root).query().fetchCache(_name);
return _root;
}
@@ -71,7 +71,7 @@ public abstract class TQAssocBean<T, R, QB> extends TQAssoc<T, R> {
* Use lazy loading for fetching this association.
*/
public final R fetchLazy() {
((TQRootBean) _root).query().fetchLazy(_name);
((QueryBean) _root).query().fetchLazy(_name);
return _root;
}
@@ -79,7 +79,7 @@ public abstract class TQAssocBean<T, R, QB> extends TQAssoc<T, R> {
* Eagerly fetch this association with the properties specified.
*/
public final R fetch(String properties) {
((TQRootBean) _root).query().fetch(_name, properties);
((QueryBean) _root).query().fetch(_name, properties);
return _root;
}
@@ -87,7 +87,7 @@ public abstract class TQAssocBean<T, R, QB> extends TQAssoc<T, R> {
* Eagerly fetch this association using a "query join" with the properties specified.
*/
public final R fetchQuery(String properties) {
((TQRootBean) _root).query().fetchQuery(_name, properties);
((QueryBean) _root).query().fetchQuery(_name, properties);
return _root;
}
@@ -96,7 +96,7 @@ public abstract class TQAssocBean<T, R, QB> extends TQAssoc<T, R> {
* Cache misses are populated via fetchQuery().
*/
public final R fetchCache(String properties) {
((TQRootBean) _root).query().fetchCache(_name, properties);
((QueryBean) _root).query().fetchCache(_name, properties);
return _root;
}
@@ -177,7 +177,7 @@ public abstract class TQAssocBean<T, R, QB> extends TQAssoc<T, R> {
}
private SpiQueryFetch spiQuery() {
return (SpiQueryFetch) ((TQRootBean) _root).query();
return (SpiQueryFetch) ((QueryBean) _root).query();
}
private Set<String> properties(TQProperty<?, ?>... props) {
@@ -41,7 +41,7 @@ public class TQProperty<R, T> implements Query.Property<T> {
* Internal method to return the underlying expression list.
*/
protected final ExpressionList<?> expr() {
return ((TQRootBean<?, ?>) _root).peekExprList();
return ((QueryBean<?, ?>) _root).peekExprList();
}
/**