Package org.neo4j.ogm.cypher
Class Filter
java.lang.Object
org.neo4j.ogm.cypher.Filter
- All Implemented Interfaces:
FilterWithRelationship
A parameter along with filter information to be added to a query.
- Author:
- Luanne Misquitta, Jasper Blues, Michael J. Simons
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionFilter
(String propertyName, ComparisonOperator comparisonOperator) Filter
(String propertyName, ComparisonOperator comparisonOperator, Object propertyValue) Filter
(String propertyName, FilterFunction filterFunction) Filter
(DistanceComparison distanceComparisonFunction, ComparisonOperator comparisonOperator) Filter
(FilterFunction function) -
Method Summary
Modifier and TypeMethodDescriptionConvenience method to chain filters usingBooleanOperator.AND
.Class<?>
Class<?>
Sets this filter to ignore the case in a property comparison when using the EQUALS operator.boolean
boolean
boolean
isNested()
boolean
Convenience method to chain filters usingBooleanOperator.OR
.void
setBooleanOperator
(BooleanOperator booleanOperator) static void
setNameFromProperty
(Filter filter, String propertyName) void
setNegated
(boolean negated) void
setNestedEntityTypeLabel
(String nestedEntityTypeLabel) void
setNestedPath
(Filter.NestedPathSegment... path) void
setNestedPropertyName
(String nestedPropertyName) void
setNestedPropertyType
(Class<?> nestedPropertyType) void
setNestedRelationshipEntity
(boolean nestedRelationshipEntity) void
setOwnerEntityType
(Class<?> ownerEntityType) void
setPropertyConverter
(AttributeConverter propertyConverter) void
setRelationshipDirection
(Relationship.Direction relationshipDirection) void
setRelationshipType
(String relationshipType)
-
Constructor Details
-
Filter
-
Filter
-
Filter
-
Filter
-
Filter
-
-
Method Details
-
setNameFromProperty
-
getRelationshipDirection
-
setRelationshipDirection
- Specified by:
setRelationshipDirection
in interfaceFilterWithRelationship
-
getPropertyName
-
getBooleanOperator
-
setBooleanOperator
-
and
Convenience method to chain filters usingBooleanOperator.AND
.- Parameters:
filter
- to be chained- Returns:
- new
Filters
object containing both filters.
-
or
Convenience method to chain filters usingBooleanOperator.OR
.- Parameters:
filter
- to be chained.- Returns:
- new
Filters
object containing both filters.
-
ignoreCase
Sets this filter to ignore the case in a property comparison when using the EQUALS operator.- Returns:
- the same filter instance
- Throws:
IllegalStateException
- if the filters function is null, not a property comparison or the operator of the is not an EQUALS-operator.- Since:
- 3.1.1
-
isNegated
public boolean isNegated()- Returns:
true
if this filter expression is to be negated when it's appended to the query,false
if not
-
setNegated
public void setNegated(boolean negated) - Parameters:
negated
- Whether or not the filter expression is to be negated
-
getOwnerEntityType
-
setOwnerEntityType
-
getNestedPropertyName
-
setNestedPropertyName
-
getRelationshipType
-
setRelationshipType
- Specified by:
setRelationshipType
in interfaceFilterWithRelationship
-
isNested
public boolean isNested() -
getNestedPropertyType
-
setNestedPropertyType
-
getNestedEntityTypeLabel
-
setNestedEntityTypeLabel
-
setNestedPath
-
getNestedPath
-
isDeepNested
public boolean isDeepNested() -
isNestedRelationshipEntity
public boolean isNestedRelationshipEntity() -
setNestedRelationshipEntity
public void setNestedRelationshipEntity(boolean nestedRelationshipEntity) -
getPropertyConverter
-
setPropertyConverter
-
toCypher
- Parameters:
nodeIdentifier
- The node identifieraddWhereClause
- The add where clause.- Returns:
- The filter state as a CYPHER fragment.
-
parameters
-