Filter.PathRestriction, Filter.PropertyRestriction
EMPTY_FILTER
Constructor and Description |
---|
FilterImpl(Filter filter) |
FilterImpl(SelectorImpl selector,
java.lang.String queryStatement,
QueryLimits settings)
Create a filter.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsNativeConstraint()
Whether the filter contains a native condition.
|
java.util.List<java.lang.String> |
getFulltextConditions()
Get the fulltext search conditions, if any.
|
FullTextExpression |
getFullTextConstraint()
Get the fulltext search condition expression, if any.
|
@NotNull java.util.Set<java.lang.String> |
getMixinTypes()
Returns the names of all matching mixin node types.
|
@Nullable java.lang.String |
getNodeType()
Returns the name of the filter node type.
|
java.lang.String |
getPath()
Get the path.
|
java.lang.String |
getPathPlan()
Get the plan for the path.
|
Filter.PathRestriction |
getPathRestriction()
Get the path restriction type.
|
@NotNull java.util.Set<java.lang.String> |
getPrimaryTypes()
Returns the names of all matching primary node types.
|
Filter.PropertyRestriction |
getPropertyRestriction(java.lang.String propertyName)
Get the most restrictive property restriction for the given property, if
any.
|
java.util.Collection<Filter.PropertyRestriction> |
getPropertyRestrictions()
Get the list of property restrictions, if any.
|
java.util.List<Filter.PropertyRestriction> |
getPropertyRestrictions(java.lang.String propertyName)
Get the all property restriction for the given property.
|
QueryLimits |
getQueryLimits() |
@Nullable java.lang.String |
getQueryStatement()
Get the complete query statement.
|
SelectorImpl |
getSelector() |
@NotNull java.util.Set<java.lang.String> |
getSupertypes()
Returns the names of the filter node type and all its supertypes.
|
boolean |
isAccessible(java.lang.String path)
check whether a certain (valid) path is accessible (can be read) from the user associated with the query Session
|
boolean |
isAlwaysFalse()
If the filter condition can not possibly match any row, due to a
contradiction in the query (for example "x=1 and x=2").
|
boolean |
isDistinct() |
boolean |
isPrepared(SelectorImpl selector)
Whether the given selector is already prepared during the prepare phase
of a join.
|
boolean |
isPreparing() |
boolean |
matchesAllTypes()
Checks whether nodes of all types can match this filter.
|
static FilterImpl |
newTestInstance()
Create a new filter instance that is used for unit testing.
|
void |
restrictFulltextCondition(java.lang.String condition) |
void |
restrictPath(java.lang.String addedPath,
Filter.PathRestriction addedPathRestriction) |
void |
restrictProperty(java.lang.String propertyName,
Operator op,
PropertyValue v) |
void |
restrictProperty(java.lang.String propertyName,
Operator op,
PropertyValue v,
int propertyType) |
void |
restrictPropertyAsList(java.lang.String propertyName,
java.util.List<PropertyValue> list) |
void |
setAlwaysFalse() |
void |
setDistinct(boolean distinct) |
void |
setFullTextConstraint(FullTextExpression constraint) |
void |
setMatchesAllTypes(boolean matchesAllTypes) |
void |
setPath(java.lang.String path) |
void |
setPreparing(boolean preparing) |
boolean |
testPath(java.lang.String path) |
java.lang.String |
toString() |
public FilterImpl(SelectorImpl selector, java.lang.String queryStatement, QueryLimits settings)
selector
- the selector for the given filterqueryStatement
- the query statementpublic FilterImpl(Filter filter)
public static FilterImpl newTestInstance()
public void setPreparing(boolean preparing)
public boolean isPreparing()
public boolean isPrepared(SelectorImpl selector)
selector
- the selector to testpublic java.lang.String getPath()
public Filter.PathRestriction getPathRestriction()
Filter
getPathRestriction
in interface Filter
public java.lang.String getPathPlan()
Filter
getPathPlan
in interface Filter
public void setPath(java.lang.String path)
public boolean isDistinct()
public void setDistinct(boolean distinct)
public void setAlwaysFalse()
public boolean isAlwaysFalse()
Filter
isAlwaysFalse
in interface Filter
public SelectorImpl getSelector()
@Nullable public @Nullable java.lang.String getNodeType()
Filter
getNodeType
in interface Filter
public boolean matchesAllTypes()
Filter
matchesAllTypes
in interface Filter
true
iff there are no type restrictions@NotNull public @NotNull java.util.Set<java.lang.String> getSupertypes()
Filter
getSupertypes
in interface Filter
@NotNull public @NotNull java.util.Set<java.lang.String> getPrimaryTypes()
Filter
getPrimaryTypes
in interface Filter
@NotNull public @NotNull java.util.Set<java.lang.String> getMixinTypes()
Filter
getMixinTypes
in interface Filter
public java.util.Collection<Filter.PropertyRestriction> getPropertyRestrictions()
Filter
getPropertyRestrictions
in interface Filter
public Filter.PropertyRestriction getPropertyRestriction(java.lang.String propertyName)
Filter
getPropertyRestriction
in interface Filter
propertyName
- the property namepublic boolean testPath(java.lang.String path)
public void restrictPropertyAsList(java.lang.String propertyName, java.util.List<PropertyValue> list)
public void restrictProperty(java.lang.String propertyName, Operator op, PropertyValue v)
public void restrictProperty(java.lang.String propertyName, Operator op, PropertyValue v, int propertyType)
public java.util.List<Filter.PropertyRestriction> getPropertyRestrictions(java.lang.String propertyName)
Filter
getPropertyRestrictions
in interface Filter
propertyName
- the property namepublic java.lang.String toString()
toString
in class java.lang.Object
public void restrictPath(java.lang.String addedPath, Filter.PathRestriction addedPathRestriction)
public java.util.List<java.lang.String> getFulltextConditions()
Filter
getFulltextConditions
in interface Filter
public void restrictFulltextCondition(java.lang.String condition)
public void setFullTextConstraint(FullTextExpression constraint)
public FullTextExpression getFullTextConstraint()
Filter
getFullTextConstraint
in interface Filter
public boolean containsNativeConstraint()
Filter
containsNativeConstraint
in interface Filter
@Nullable public @Nullable java.lang.String getQueryStatement()
Filter
getQueryStatement
in interface Filter
public void setMatchesAllTypes(boolean matchesAllTypes)
public QueryLimits getQueryLimits()
getQueryLimits
in interface Filter
public boolean isAccessible(java.lang.String path)
Filter
isAccessible
in interface Filter
path
- a valid JCR pathtrue
if path can be read by the calling user, false
otherwise.Copyright © 2012–2022 The Apache Software Foundation. All rights reserved.