From 0d848e931119cabcbcbf622b579ae05c522a5b7a Mon Sep 17 00:00:00 2001 From: Robin Bygrave Date: Mon, 20 Jul 2015 12:44:26 +1200 Subject: [PATCH] Internal SpiQuery : remove unused context additions --- .../com/avaje/ebeaninternal/api/SpiQuery.java | 16 ---------- .../server/querydefn/DefaultOrmQuery.java | 31 ------------------- 2 files changed, 47 deletions(-) diff --git a/src/main/java/com/avaje/ebeaninternal/api/SpiQuery.java b/src/main/java/com/avaje/ebeaninternal/api/SpiQuery.java index 690a12058..a137661c9 100644 --- a/src/main/java/com/avaje/ebeaninternal/api/SpiQuery.java +++ b/src/main/java/com/avaje/ebeaninternal/api/SpiQuery.java @@ -342,11 +342,6 @@ public interface SpiQuery extends Query { */ String getLazyLoadProperty(); - /** - * Return the lazy load path. - */ - String getLazyLoadManyPath(); - /** * Used to hook back a lazy loading query to the original query (query * point). @@ -477,22 +472,11 @@ public interface SpiQuery extends Query { */ Boolean isReadOnly(); - /** - * Adds this bean to the persistence context prior to executing the query. - */ - void contextAdd(EntityBean bean); - /** * Return the query timeout. */ int getTimeout(); - /** - * Return the objects that should be added to the persistence context prior - * to executing the query. - */ - ArrayList getContextAdditions(); - /** * Return the bind parameters. */ diff --git a/src/main/java/com/avaje/ebeaninternal/server/querydefn/DefaultOrmQuery.java b/src/main/java/com/avaje/ebeaninternal/server/querydefn/DefaultOrmQuery.java index 9fa53c56f..5b5e332c5 100644 --- a/src/main/java/com/avaje/ebeaninternal/server/querydefn/DefaultOrmQuery.java +++ b/src/main/java/com/avaje/ebeaninternal/server/querydefn/DefaultOrmQuery.java @@ -51,11 +51,6 @@ public class DefaultOrmQuery implements SpiQuery { private transient final ExpressionFactory expressionFactory; - /** - * Used to add beans to the PersistanceContext prior to query. - */ - private transient ArrayList contextAdditions; - /** * For lazy loading of ManyToMany we need to add a join to the intersection table. This is that * join to the intersection table. @@ -313,10 +308,6 @@ public class DefaultOrmQuery implements SpiQuery { this.lazyLoadProperty = lazyLoadProperty; } - public String getLazyLoadManyPath() { - return lazyLoadManyPath; - } - public ExpressionFactory getExpressionFactory() { return expressionFactory; } @@ -752,8 +743,6 @@ public class DefaultOrmQuery implements SpiQuery { hc = hc * 31 + (whereExpressions == null ? 0 : whereExpressions.queryBindHash()); hc = hc * 31 + (havingExpressions == null ? 0 : havingExpressions.queryBindHash()); hc = hc * 31 + (bindParams == null ? 0 : bindParams.queryBindHash()); - hc = hc * 31 + (contextAdditions == null ? 0 : contextAdditions.hashCode()); - return hc; } @@ -1091,26 +1080,6 @@ public class DefaultOrmQuery implements SpiQuery { return detail; } - /** - * Return any beans that should be added to the persistence context prior to executing the query. - */ - public final ArrayList getContextAdditions() { - return contextAdditions; - } - - /** - * Add a bean to the context additions. - *

- * These are added to the persistence context before executing the query. - *

- */ - public void contextAdd(EntityBean bean) { - if (contextAdditions == null) { - contextAdditions = new ArrayList(); - } - contextAdditions.add(bean); - } - public String toString() { return "Query [" + whereExpressions + "]"; }