switch (operator) { case WorkflowQuery.AND: return Expression.and(buildExpression(query),buildExpression(query)); case WorkflowQuery.OR: return Expression.or(buildExpression(query),buildExpression(query)); case WorkflowQuery.XOR: throw new StoreException("XOR Operator in Queries not supported by " + this.getClass().getName()); default: throw new StoreException("Operator '"+operator+"' is not supported by " + this.getClass().getName()); } } }
int operator = query.getOperator(); WorkflowQuery left = query.getLeft(); WorkflowQuery right = query.getRight();  switch (operator) { case WorkflowQuery.AND: return Expression.and(buildExpression(query), buildExpression(query));  case WorkflowQuery.OR: return Expression.or(buildExpression(query), buildExpression(query));  case WorkflowQuery.XOR: throw new StoreException("XOR Operator in Queries not supported by " + this.getClass().getName());  default: throw new StoreException("Operator '" + operator + "' is not supported by " + this.getClass().getName()); } } }
		private Expression buildExpression(WorkflowQuery query) throws StoreException		{			if (query.getLeft() == null) 			{				if (query.getRight() == null) 					return getExpression(query); //leaf node				else 				   throw new StoreException("Invalid WorkflowQuery object.  QueryLeft is null but QueryRight is not.");   			} 			else 			{				if (query.getRight() == null)				  throw new StoreException("Invalid WorkflowQuery object.  QueryLeft is not null but QueryRight is.");            				int operator = query.getOperator();				WorkflowQuery left = query.getLeft();				WorkflowQuery right = query.getRight();				switch (operator) 				{				  case WorkflowQuery.AND:					return Expression.and(buildExpression(query),buildExpression(query));				  case WorkflowQuery.OR:					return Expression.or(buildExpression(query),buildExpression(query));				  case WorkflowQuery.XOR:					throw new StoreException("XOR Operator in Queries not supported by " + this.getClass().getName());				  default:					throw new StoreException("Operator '"+operator+"' is not supported by " + this.getClass().getName());				}			}		}