Skip to content

Commit

Permalink
Merge pull request #3385 from ebean-orm/feature/rename-tqrootbean
Browse files Browse the repository at this point in the history
Rename TQRootBean to QueryBean
  • Loading branch information
rbygrave authored Apr 12, 2024
2 parents 7720229 + 405834f commit 1b1dce9
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion ebean-postgis-types/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,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>
Expand Down
2 changes: 1 addition & 1 deletion ebean-querybean/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
* @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.
Expand Down Expand Up @@ -88,29 +88,29 @@ 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);
}

/**
* 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);
}
Expand All @@ -119,7 +119,7 @@ protected TQRootBean(Class<T> beanType, Database database, Transaction transacti
* Construct using a query.
*/
@SuppressWarnings("unchecked")
public TQRootBean(Query<T> query) {
public QueryBean(Query<T> query) {
this.query = query;
this.root = (R) this;
}
Expand All @@ -129,13 +129,13 @@ public TQRootBean(Query<T> query) {
* 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<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ public TQAssocBean(String name, R root, String prefix) {
* Eagerly fetch this association fetching all the properties.
*/
public final R fetch() {
((TQRootBean) _root).query().fetch(_name);
((QueryBean) _root).query().fetch(_name);
return _root;
}

/**
* Eagerly fetch this association using a "query join".
*/
public final R fetchQuery() {
((TQRootBean) _root).query().fetchQuery(_name);
((QueryBean) _root).query().fetchQuery(_name);
return _root;
}

Expand All @@ -63,31 +63,31 @@ public final R fetchQuery() {
* Cache misses are populated via fetchQuery().
*/
public final R fetchCache() {
((TQRootBean) _root).query().fetchCache(_name);
((QueryBean) _root).query().fetchCache(_name);
return _root;
}

/**
* Use lazy loading for fetching this association.
*/
public final R fetchLazy() {
((TQRootBean) _root).query().fetchLazy(_name);
((QueryBean) _root).query().fetchLazy(_name);
return _root;
}

/**
* 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;
}

/**
* 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;
}

Expand All @@ -96,7 +96,7 @@ public final R fetchQuery(String properties) {
* 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;
}

Expand Down Expand Up @@ -177,7 +177,7 @@ private R fetchNested(FetchGroup<T> nestedGroup, FetchConfig fetchConfig) {
}

private SpiQueryFetch spiQuery() {
return (SpiQueryFetch) ((TQRootBean) _root).query();
return (SpiQueryFetch) ((QueryBean) _root).query();
}

private Set<String> properties(TQProperty<?, ?>... props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public String toString() {
* Internal method to return the underlying expression list.
*/
protected final ExpressionList<?> expr() {
return ((TQRootBean<?, ?>) _root).peekExprList();
return ((QueryBean<?, ?>) _root).peekExprList();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion ebean-redis/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,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>
Expand Down
2 changes: 1 addition & 1 deletion ebean-spring-txn/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,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>
Expand Down
2 changes: 1 addition & 1 deletion ebean-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ private void writeClass() {
writer.append(" */").eol();
writer.append(Constants.AT_GENERATED).eol();
writer.append(Constants.AT_TYPEQUERYBEAN).eol();
writer.append("class Q%s : io.ebean.typequery.TQRootBean<%s, Q%s> {", shortName, beanFullName, shortName).eol();
writer.append("class Q%s : io.ebean.typequery.QueryBean<%s, Q%s> {", shortName, beanFullName, shortName).eol();
}

writer.eol();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ private void writeClass() {
writer.append("public final class Q%s {", shortName).eol();
} else {
writer.append(Constants.AT_TYPEQUERYBEAN).eol();
writer.append("public final class Q%s extends io.ebean.typequery.TQRootBean<%s,Q%s> {", shortName, beanFullName, shortName).eol();
writer.append("public final class Q%s extends io.ebean.typequery.QueryBean<%s,Q%s> {", shortName, beanFullName, shortName).eol();
}
writer.eol();
}
Expand Down
2 changes: 1 addition & 1 deletion tests/test-java16/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,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>
Expand Down

0 comments on commit 1b1dce9

Please sign in to comment.