Package org.kiwiproject.spring.data
Enum Class KiwiSpringMongoQueries.PartialMatchType
java.lang.Object
java.lang.Enum<KiwiSpringMongoQueries.PartialMatchType>
org.kiwiproject.spring.data.KiwiSpringMongoQueries.PartialMatchType
- All Implemented Interfaces:
Serializable,Comparable<KiwiSpringMongoQueries.PartialMatchType>,Constable
- Enclosing class:
- KiwiSpringMongoQueries
public static enum KiwiSpringMongoQueries.PartialMatchType
extends Enum<KiwiSpringMongoQueries.PartialMatchType>
Defines whether to require a partial or exact match.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRequires an equal match, and is case-sensitive.Permits regex matching in a case-insensitive manner. -
Method Summary
Modifier and TypeMethodDescriptionfrom(boolean value) Convert the given boolean into aKiwiSpringMongoQueries.PartialMatchType.fromBooleanString(String value) Convert the given string into aKiwiSpringMongoQueries.PartialMatchType, where "truthy" values are considered to representPARTIAL_MATCH, and "falsy" values are considered to meanEQUAL_MATCH.Returns the enum constant of this class with the specified name.values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PARTIAL_MATCH
Permits regex matching in a case-insensitive manner.- See Also:
-
Criteria.regex(String)
-
EQUAL_MATCH
Requires an equal match, and is case-sensitive.- See Also:
-
Criteria.is(Object)
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
fromBooleanString
Convert the given string into aKiwiSpringMongoQueries.PartialMatchType, where "truthy" values are considered to representPARTIAL_MATCH, and "falsy" values are considered to meanEQUAL_MATCH.Accepts various values, such as "true", "false", "yes", "no", etc. and null is treated as false.
- Parameters:
value- the value to convert- Returns:
- the
KiwiSpringMongoQueries.PartialMatchType - Implementation Note:
- Uses
Object.toString()to perform the conversion
-
from
Convert the given boolean into aKiwiSpringMongoQueries.PartialMatchType. True is converted toPARTIAL_MATCHand false is converted toEQUAL_MATCH.- Parameters:
value- the value to convert- Returns:
- the
KiwiSpringMongoQueries.PartialMatchType
-