Refactor internals OrmQueryProperties invert isEmpty() -> nonEmpty()

This commit is contained in:
robin
2021-02-16 20:37:58 +13:00
parent 98a89156bf
commit e5ec72df5c
3 changed files with 5 additions and 8 deletions
@@ -111,7 +111,7 @@ public class OrmQueryDetail implements Serializable {
*/
public String asStringDebug() {
StringBuilder sb = new StringBuilder();
if (!baseProps.isEmpty()) {
if (baseProps.notEmpty()) {
baseProps.asStringDebug("select ", sb);
}
if (fetchPaths != null) {
@@ -214,7 +214,7 @@ public class OrmQueryProperties implements Serializable {
*/
@SuppressWarnings("unchecked")
public void configureBeanQuery(SpiQuery<?> query) {
if (!isEmpty()) {
if (notEmpty()) {
query.selectProperties(this);
}
@@ -252,8 +252,8 @@ public class OrmQueryProperties implements Serializable {
/**
* Return true if the properties and configuration are empty.
*/
boolean isEmpty() {
return !allProperties && included == null;
boolean notEmpty() {
return allProperties || included != null;
}
public void asStringDebug(String prefix, StringBuilder sb) {