private boolean containsSameAliases( ComplexConjunctiveQuery complexQuery, SimpleConjunctiveQuery simpleQuery) { for (SetAlias simple : simpleQuery.getVariables()) { if (SpicyEngineUtility.containsVariableWithSameId(complexQuery.getGenerators(), simple)) { return true; } } return false; }
private SetAlias findVariable(SetAlias joinVariable, SimpleConjunctiveQuery view) { for (SetAlias viewVariable : view.getVariables()) { if (viewVariable.getGenerators().contains(joinVariable)) { return viewVariable; } } throw new IllegalArgumentException( "Unable to find variable " + joinVariable + " in view " + view); }