mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1100 - Refactor OrmQueryPlanKey to use string expression for where
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package io.ebeaninternal.server.expression;
|
||||
|
||||
import io.ebeaninternal.api.HashQueryPlanBuilder;
|
||||
import io.ebeaninternal.api.ManyWhereJoins;
|
||||
import io.ebeaninternal.api.SpiExpression;
|
||||
import io.ebeaninternal.api.SpiExpressionRequest;
|
||||
@@ -94,8 +93,13 @@ class IsEmptyExpression extends AbstractExpression {
|
||||
* Based on the type and propertyName.
|
||||
*/
|
||||
@Override
|
||||
public void queryPlanHash(HashQueryPlanBuilder builder) {
|
||||
builder.add(IsEmptyExpression.class).add(propName);
|
||||
public void queryPlanHash(StringBuilder builder) {
|
||||
if (empty) {
|
||||
builder.append("IsEmpty[");
|
||||
} else {
|
||||
builder.append("IsNotEmpty[");
|
||||
}
|
||||
builder.append(propName).append("]");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -103,16 +107,6 @@ class IsEmptyExpression extends AbstractExpression {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSameByPlan(SpiExpression other) {
|
||||
if (!(other instanceof IsEmptyExpression)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
IsEmptyExpression that = (IsEmptyExpression) other;
|
||||
return this.propName.equals(that.propName) && this.empty == that.empty;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSameByBind(SpiExpression other) {
|
||||
return (other instanceof IsEmptyExpression);
|
||||
|
||||
Reference in New Issue
Block a user