Merged 5.2.N (5.2.1) to HEAD (5.2)

130645 amorarasu: REPO-484: Code formatting.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@132160 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2016-11-03 13:13:52 +00:00
parent 42b43437bc
commit ef04cb8bcf

View File

@@ -76,7 +76,6 @@ public abstract class QueryHelper
*/
void in(String property, boolean negated, String... propertyValues);
/**
* Called any time a MATCHES clause is encountered.
* @param property Name of the property
@@ -127,7 +126,6 @@ public abstract class QueryHelper
*/
public static void walk(Query query, WalkerCallback callback)
{
CommonTree tree = query.getTree();
if (tree != null)
{
@@ -168,7 +166,8 @@ public abstract class QueryHelper
List<Tree> children = getChildren(tree);
//Don't need the first item because its the property name
String[] inVals = new String[children.size()-1];
for (int i = 1; i < children.size(); i++) {
for (int i = 1; i < children.size(); i++)
{
inVals[i-1] = stripQuotes(children.get(i).getText());
}
callback.in(tree.getChild(0).getText(), negated, inVals);
@@ -201,14 +200,16 @@ public abstract class QueryHelper
case WhereClauseParser.OR:
callback.or();
List<Tree> children = getChildren(tree);
for (Tree child : children) {
for (Tree child : children)
{
callbackTree(child, callback, negated);
}
return;
case WhereClauseParser.AND:
callback.and();
List<Tree> childrenOfAnd = getChildren(tree);
for (Tree child : childrenOfAnd) {
for (Tree child : childrenOfAnd)
{
callbackTree(child, callback, negated);
}
return;
@@ -224,30 +225,30 @@ public abstract class QueryHelper
* @param tree the current tree
* @return siblings - all the elements at the same level in the tree
*/
// public static List<Tree> getYoungerSiblings(Tree tree)
// {
// Tree parent = tree.getParent();
//
// if (parent!=null && parent.getChildCount() > 0)
// {
// List<Tree> sibs = new ArrayList<Tree>(parent.getChildCount()-1);
// boolean laterChildren = false;
// for (int i = 0; i < parent.getChildCount(); i++) {
// Tree child = parent.getChild(i);
// if (tree.equals(child))
// {
// laterChildren = true;
// }
// else
// {
// if (laterChildren) sibs.add(child);
// }
// }
// return sibs;
// }
//
//
// }
// public static List<Tree> getYoungerSiblings(Tree tree)
// {
// Tree parent = tree.getParent();
//
// if (parent!=null && parent.getChildCount() > 0)
// {
// List<Tree> sibs = new ArrayList<Tree>(parent.getChildCount()-1);
// boolean laterChildren = false;
// for (int i = 0; i < parent.getChildCount(); i++) {
// Tree child = parent.getChild(i);
// if (tree.equals(child))
// {
// laterChildren = true;
// }
// else
// {
// if (laterChildren) sibs.add(child);
// }
// }
// return sibs;
// }
//
//
// }
/**
* Gets the children as a List