Package dev.morphia.query
Enum FilterOperator
- java.lang.Object
-
- java.lang.Enum<FilterOperator>
-
- dev.morphia.query.FilterOperator
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<FilterOperator>
public enum FilterOperator extends java.lang.Enum<FilterOperator>
- Author:
- Scott Hernandez
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALL
ELEMENT_MATCH
EQUAL
EXISTS
GEO_NEAR
GEO_WITHIN
GREATER_THAN
GREATER_THAN_OR_EQUAL
IN
INTERSECTS
LESS_THAN
LESS_THAN_OR_EQUAL
MOD
NEAR
NEAR_SPHERE
NOT
NOT_EQUAL
NOT_IN
SIZE
TYPE
WHERE
WITHIN
Deprecated.New in server version 2.4: $geoWithin replaces $within which is deprecated.WITHIN_BOX
WITHIN_CIRCLE
WITHIN_CIRCLE_SPHERE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FilterOperator
fromString(java.lang.String operator)
Creates a FilterOperator from a Stringboolean
matches(java.lang.String filter)
Returns true if the given filter matches the filters on this FilterOperatorjava.lang.String
val()
static FilterOperator
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static FilterOperator[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
WITHIN_CIRCLE
public static final FilterOperator WITHIN_CIRCLE
-
WITHIN_CIRCLE_SPHERE
public static final FilterOperator WITHIN_CIRCLE_SPHERE
-
WITHIN_BOX
public static final FilterOperator WITHIN_BOX
-
EQUAL
public static final FilterOperator EQUAL
-
NOT_EQUAL
public static final FilterOperator NOT_EQUAL
-
GREATER_THAN
public static final FilterOperator GREATER_THAN
-
GREATER_THAN_OR_EQUAL
public static final FilterOperator GREATER_THAN_OR_EQUAL
-
LESS_THAN
public static final FilterOperator LESS_THAN
-
LESS_THAN_OR_EQUAL
public static final FilterOperator LESS_THAN_OR_EQUAL
-
EXISTS
public static final FilterOperator EXISTS
-
TYPE
public static final FilterOperator TYPE
-
NOT
public static final FilterOperator NOT
-
MOD
public static final FilterOperator MOD
-
SIZE
public static final FilterOperator SIZE
-
IN
public static final FilterOperator IN
-
NOT_IN
public static final FilterOperator NOT_IN
-
ALL
public static final FilterOperator ALL
-
ELEMENT_MATCH
public static final FilterOperator ELEMENT_MATCH
-
WHERE
public static final FilterOperator WHERE
-
NEAR
public static final FilterOperator NEAR
-
NEAR_SPHERE
public static final FilterOperator NEAR_SPHERE
-
WITHIN
@Deprecated public static final FilterOperator WITHIN
Deprecated.New in server version 2.4: $geoWithin replaces $within which is deprecated.
-
GEO_NEAR
public static final FilterOperator GEO_NEAR
-
GEO_WITHIN
public static final FilterOperator GEO_WITHIN
-
INTERSECTS
public static final FilterOperator INTERSECTS
-
-
Method Detail
-
values
public static FilterOperator[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (FilterOperator c : FilterOperator.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static FilterOperator valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
fromString
public static FilterOperator fromString(java.lang.String operator)
Creates a FilterOperator from a String- Parameters:
operator
- the String to convert- Returns:
- the FilterOperator
-
matches
public boolean matches(java.lang.String filter)
Returns true if the given filter matches the filters on this FilterOperator- Parameters:
filter
- the filter to check- Returns:
- true if the given filter matches the filters on this FilterOperator
-
val
public java.lang.String val()
- Returns:
- the value of this FilterOperator
-
-