adding missing @Override's
Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/2656dc80 Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/2656dc80 Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/2656dc80 Branch: refs/heads/master Commit: 2656dc804c8c8e22ad7f63debffa3bf05c17d902 Parents: e73365a Author: Andrus Adamchik <and...@objectstyle.com> Authored: Sun Nov 27 17:15:27 2016 +0300 Committer: Andrus Adamchik <and...@objectstyle.com> Committed: Sun Nov 27 17:15:27 2016 +0300 ---------------------------------------------------------------------- .../access/HierarchicalObjectResolver.java | 32 +++++++++++++++----- 1 file changed, 25 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cayenne/blob/2656dc80/cayenne-server/src/main/java/org/apache/cayenne/access/HierarchicalObjectResolver.java ---------------------------------------------------------------------- diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/HierarchicalObjectResolver.java b/cayenne-server/src/main/java/org/apache/cayenne/access/HierarchicalObjectResolver.java index e220f9c..104dd76 100644 --- a/cayenne-server/src/main/java/org/apache/cayenne/access/HierarchicalObjectResolver.java +++ b/cayenne-server/src/main/java/org/apache/cayenne/access/HierarchicalObjectResolver.java @@ -19,13 +19,6 @@ package org.apache.cayenne.access; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; - import org.apache.cayenne.CayenneRuntimeException; import org.apache.cayenne.DataRow; import org.apache.cayenne.Persistent; @@ -40,6 +33,13 @@ import org.apache.cayenne.query.PrefetchTreeNode; import org.apache.cayenne.query.QueryMetadata; import org.apache.cayenne.reflect.ClassDescriptor; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + /** * Processes a number of DataRow sets corresponding to a given prefetch tree, resolving * DataRows to an object tree. Can process any combination of joint and disjoint sets, per @@ -103,6 +103,7 @@ class HierarchicalObjectResolver { final class DisjointProcessor implements PrefetchProcessor { + @Override public boolean startDisjointPrefetch(PrefetchTreeNode node) { PrefetchProcessorNode processorNode = (PrefetchProcessorNode) node; @@ -124,6 +125,7 @@ class HierarchicalObjectResolver { return true; } + @Override public boolean startDisjointByIdPrefetch(PrefetchTreeNode node) { PrefetchProcessorNode processorNode = (PrefetchProcessorNode) node; @@ -248,6 +250,7 @@ class HierarchicalObjectResolver { } } + @Override public boolean startJointPrefetch(PrefetchTreeNode node) { // delegate processing of the top level joint prefetch to a joint processor, @@ -297,14 +300,17 @@ class HierarchicalObjectResolver { return true; } + @Override public boolean startPhantomPrefetch(PrefetchTreeNode node) { return true; } + @Override public boolean startUnknownPrefetch(PrefetchTreeNode node) { throw new CayenneRuntimeException("Unknown prefetch node: " + node); } + @Override public void finishPrefetch(PrefetchTreeNode node) { // now that all the children are processed, we can clear the dupes @@ -346,16 +352,19 @@ class HierarchicalObjectResolver { this.currentFlatRow = currentFlatRow; } + @Override public boolean startDisjointPrefetch(PrefetchTreeNode node) { // disjoint prefetch that is not the root terminates the walk... // don't process the root node itself.. return node == rootNode; } + @Override public boolean startDisjointByIdPrefetch(PrefetchTreeNode node) { return startDisjointPrefetch(node); } + @Override public boolean startJointPrefetch(PrefetchTreeNode node) { PrefetchProcessorJointNode processorNode = (PrefetchProcessorJointNode) node; @@ -388,14 +397,17 @@ class HierarchicalObjectResolver { return processorNode.isJointChildren(); } + @Override public boolean startPhantomPrefetch(PrefetchTreeNode node) { return ((PrefetchProcessorNode) node).isJointChildren(); } + @Override public boolean startUnknownPrefetch(PrefetchTreeNode node) { throw new CayenneRuntimeException("Unknown prefetch node: " + node); } + @Override public void finishPrefetch(PrefetchTreeNode node) { // noop } @@ -405,18 +417,22 @@ class HierarchicalObjectResolver { // relationships and also fires snapshot update events final class PostProcessor implements PrefetchProcessor { + @Override public void finishPrefetch(PrefetchTreeNode node) { } + @Override public boolean startDisjointPrefetch(PrefetchTreeNode node) { ((PrefetchProcessorNode) node).connectToParents(); return true; } + @Override public boolean startDisjointByIdPrefetch(PrefetchTreeNode node) { return startDisjointPrefetch(node); } + @Override public boolean startJointPrefetch(PrefetchTreeNode node) { PrefetchProcessorJointNode processorNode = (PrefetchProcessorJointNode) node; @@ -433,10 +449,12 @@ class HierarchicalObjectResolver { return true; } + @Override public boolean startPhantomPrefetch(PrefetchTreeNode node) { return true; } + @Override public boolean startUnknownPrefetch(PrefetchTreeNode node) { throw new CayenneRuntimeException("Unknown prefetch node: " + node); }