Package org.kiwiproject.spring.data
Enum KiwiSpringMongoQueries.PartialMatchType
- java.lang.Object
-
- java.lang.Enum<KiwiSpringMongoQueries.PartialMatchType>
-
- org.kiwiproject.spring.data.KiwiSpringMongoQueries.PartialMatchType
-
- All Implemented Interfaces:
Serializable,Comparable<KiwiSpringMongoQueries.PartialMatchType>
- Enclosing class:
- KiwiSpringMongoQueries
public static enum KiwiSpringMongoQueries.PartialMatchType extends Enum<KiwiSpringMongoQueries.PartialMatchType>
Defines whether to require a partial or exact match.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description EQUAL_MATCHRequires an equal match, and is case-sensitive.PARTIAL_MATCHPermits regex matching in a case-insensitive manner.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static KiwiSpringMongoQueries.PartialMatchTypefrom(boolean value)Convert the given boolean into aKiwiSpringMongoQueries.PartialMatchType.static KiwiSpringMongoQueries.PartialMatchTypefromBooleanString(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.static KiwiSpringMongoQueries.PartialMatchTypevalueOf(String name)Returns the enum constant of this type with the specified name.static KiwiSpringMongoQueries.PartialMatchType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PARTIAL_MATCH
public static final KiwiSpringMongoQueries.PartialMatchType PARTIAL_MATCH
Permits regex matching in a case-insensitive manner.- See Also:
Criteria.regex(String)
-
EQUAL_MATCH
public static final KiwiSpringMongoQueries.PartialMatchType EQUAL_MATCH
Requires an equal match, and is case-sensitive.- See Also:
Criteria.is(Object)
-
-
Method Detail
-
values
public static KiwiSpringMongoQueries.PartialMatchType[] 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 (KiwiSpringMongoQueries.PartialMatchType c : KiwiSpringMongoQueries.PartialMatchType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static KiwiSpringMongoQueries.PartialMatchType valueOf(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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
fromBooleanString
public static KiwiSpringMongoQueries.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.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
public static KiwiSpringMongoQueries.PartialMatchType from(boolean value)
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
-
-