@Override public void visit(NodeDepth depth) { symbols.add(depth.getSelectorName()); }
/** * {@inheritDoc} * * @see java.lang.Object#hashCode() */ @Override public int hashCode() { return getSelectorNames().hashCode(); }
/** * {@inheritDoc} * * @see org.modeshape.graph.query.QueryBuilder.DynamicOperandBuilder#depth(java.lang.String) */ public ComparisonBuilder depth(String table) { return comparisonBuilder(new NodeDepth(selector(table))); }
/** * {@inheritDoc} * * @see org.modeshape.graph.query.QueryBuilder.OrderByOperandBuilder#depth(java.lang.String) */ public OrderByBuilder depth(String table) { return addOrdering(new NodeDepth(selector(table))); }
/** * @see org.xcmis.search.Visitors.AbstractModelVisitor#visit(org.xcmis.search.model.operand.NodeDepth) */ @Override public void visit(NodeDepth depth) throws VisitException { checkSelectorExistance(depth.getSelectorName()); }
/** * {@inheritDoc} * * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof NodeDepth) { NodeDepth that = (NodeDepth)obj; return this.getSelectorNames().equals(that.getSelectorNames()); } return false; }
/** * {@inheritDoc} * * @see QueryObjectModelVisitor#visit(NodeDepth) */ public void visit(NodeDepth depth) { append("DEPTH(").append(depth.getSelectorName()).append(')'); }
/** * Get the selector symbol upon which this operand applies. * * @return the one selector names used by this operand; never null */ public SelectorName getSelectorName() { return getSelectorNames().iterator().next(); }