mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Rename TQRootBean to QueryBean
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
+8
-8
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
+1
-1
@@ -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>
|
||||
|
||||
+1
-1
@@ -337,7 +337,7 @@ class SimpleQueryBeanWriter {
|
||||
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();
|
||||
|
||||
@@ -53,8 +53,8 @@
|
||||
<ebean-migration.version>14.0.0</ebean-migration.version>
|
||||
<ebean-test-containers.version>7.3</ebean-test-containers.version>
|
||||
<ebean-datasource.version>8.12</ebean-datasource.version>
|
||||
<ebean-agent.version>14.1.0</ebean-agent.version>
|
||||
<ebean-maven-plugin.version>14.1.0</ebean-maven-plugin.version>
|
||||
<ebean-agent.version>14.2.0</ebean-agent.version>
|
||||
<ebean-maven-plugin.version>14.2.0</ebean-maven-plugin.version>
|
||||
<surefire.useModulePath>false</surefire.useModulePath>
|
||||
</properties>
|
||||
|
||||
|
||||
+1
-1
@@ -225,7 +225,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 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();
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user