protected PropertyExistence propertyExistence( SelectorName selector, String propertyName ) { return new PropertyExistence(selector, propertyName); }
@Override public void visit( PropertyExistence existence ) { requireColumn(existence.selectorName(), existence.getPropertyName()); }
protected boolean indexAppliesTo( PropertyExistence constraint ) { // The selected node type must match or be a subtype of the indexed node type, and // one of the indexed columns must match the property ... return matchesSelectorName(constraint.getSelectorName()) && defn.appliesToProperty(constraint.getPropertyName()); }
String property = exist.getPropertyName(); if ("jcr:path".equals(property) || "jcr:name".equals(property) || "mode:localName".equals(property) || "jcr:localName".equals(property) || "mode:depth".equals(property) || "jcr:depth".equals(property) || "jcr:score".equals(property) || "mode:id".equals(property)) { return new PropertyExistence(exist.selectorName(), "jcr:primaryType");
@Override public void visit( PropertyExistence prop ) { symbols.add(prop.selectorName()); }
String property = exist.getPropertyName(); if ("jcr:path".equals(property) || "jcr:name".equals(property) || "mode:localName".equals(property) || "jcr:localName".equals(property) || "mode:depth".equals(property) || "jcr:depth".equals(property) || "jcr:score".equals(property) || "mode:id".equals(property)) { return new PropertyExistence(exist.selectorName(), "jcr:primaryType");
@Override public void visit( PropertyExistence prop ) { symbols.add(prop.selectorName()); }
@Override public void visit( PropertyExistence prop ) { addColumnFor(prop.selectorName(), prop.getPropertyName()); }
SelectorName replacement = rewrittenSelectors.get(existence.selectorName()); if (replacement == null) return existence; return new PropertyExistence(replacement, existence.getPropertyName());
protected PropertyExistence propertyExistence( SelectorName selector, String propertyName ) { return new PropertyExistence(selector, propertyName); }
protected boolean indexAppliesTo( PropertyExistence constraint ) { // The selected node type must match or be a subtype of the indexed node type, and // one of the indexed columns must match the property ... return matchesSelectorName(constraint.getSelectorName()) && defn.appliesToProperty(constraint.getPropertyName()); }
@Override public String getSelectorName() { return selectorName().getString(); }
@Override public void visit( PropertyExistence prop ) { addColumnFor(prop.selectorName(), prop.getPropertyName()); }
SelectorName replacement = rewrittenSelectors.get(existence.selectorName()); if (replacement == null) return existence; return new PropertyExistence(replacement, existence.getPropertyName());
/** * Define a constraint clause that the node within the named table has at least one value for the named property. * * @param table the name of the table; may not be null and must refer to a valid name or alias of a table appearing in the * FROM clause * @param propertyName the name of the property * @return the constraint builder that was used to create this clause; never null */ public ConstraintBuilder hasProperty( String table, String propertyName ) { return setConstraint(new PropertyExistence(selector(table), propertyName)); }
@Override public String getSelectorName() { return selectorName().getString(); }
@Override public void visit( PropertyExistence prop ) { addColumnFor(prop.selectorName(), prop.getPropertyName()); }
if (!mapping.getOriginalName().equals(existence.selectorName())) return existence; Column sourceColumn = mapping.getMappedColumn(existence.getPropertyName()); if (sourceColumn == null) return existence; node.addSelector(sourceColumn.selectorName()); return new PropertyExistence(sourceColumn.selectorName(), sourceColumn.getPropertyName());
/** * Define a constraint clause that the node within the named table has at least one value for the named property. * * @param table the name of the table; may not be null and must refer to a valid name or alias of a table appearing in the * FROM clause * @param propertyName the name of the property * @return the constraint builder that was used to create this clause; never null */ public ConstraintBuilder hasProperty( String table, String propertyName ) { return setConstraint(new PropertyExistence(selector(table), propertyName)); }
@Override public void visit( PropertyExistence obj ) { verify(obj.selectorName(), obj.getPropertyName(), this.validateColumnExistence); }