#1100 - Refactor OrmQueryPlanKey to use string expression for where

This commit is contained in:
rob bygrave
2017-08-31 02:11:49 +12:00
parent a695fb59b2
commit f83c7fdac8
54 changed files with 359 additions and 723 deletions
@@ -1,7 +1,6 @@
package io.ebeaninternal.server.expression;
import io.ebean.LikeType;
import io.ebeaninternal.api.HashQueryPlanBuilder;
import io.ebeaninternal.api.SpiExpression;
import io.ebeaninternal.api.SpiExpressionRequest;
import io.ebeaninternal.server.el.ElPropertyValue;
@@ -50,9 +49,8 @@ class NativeILikeExpression extends AbstractExpression {
* Based on caseInsensitive and the property name.
*/
@Override
public void queryPlanHash(HashQueryPlanBuilder builder) {
builder.add(NativeILikeExpression.class).add(propName);
builder.bind(1);
public void queryPlanHash(StringBuilder builder) {
builder.append("NativeILike[").append(propName).append("]");
}
@Override
@@ -60,16 +58,6 @@ class NativeILikeExpression extends AbstractExpression {
return val.hashCode();
}
@Override
public boolean isSameByPlan(SpiExpression other) {
if (!(other instanceof NativeILikeExpression)) {
return false;
}
NativeILikeExpression that = (NativeILikeExpression) other;
return this.propName.equals(that.propName);
}
@Override
public boolean isSameByBind(SpiExpression other) {
NativeILikeExpression that = (NativeILikeExpression) other;