Enum Class ValueModel
- All Implemented Interfaces:
Serializable
,Comparable<ValueModel>
,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDeprecated, for removal: This API element is subject to removal in a future version.This model does not apply conversion and allows working with the types as defined on the index side.This is the default model that allows working with the types as defined on the entity side.This model does not apply conversion and allows working with the types that the backend operates with on a low level.This model applies formatting and parsing allowing working with the string representation of values. -
Method Summary
Modifier and TypeMethodDescriptionstatic ValueModel
Returns the enum constant of this class with the specified name.static ValueModel[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MAPPING
This is the default model that allows working with the types as defined on the entity side.For field values passed to the DSL (for example the parameter of a match predicate), the
DSL converter
defined in the mapping will be used. This generally means values passed to the DSL will be expected to have the same type as the entity property used to populate the index field.For identifier values passed to the DSL (for example the parameter of an ID predicate), the identifier converter defined in the mapping will be used. This generally means values passed to the DSL will be expected to have the same type as the entity property used to generate document identifiers.
For fields values returned by the backend (for example in projections), the
projection converter
defined in the mapping will be used. This generally means the projected values will have the same type as the entity property used to populate the index field.If no converter was defined in the mapping, this option won't have any effect.
Please refer to the reference documentation for more information.
-
INDEX
This model does not apply conversion and allows working with the types as defined on the index side.For field values passed to the DSL (for example the parameter of a match predicate), no converter will be used. This generally means values passed to the DSL will be expected to have the same type as the index field.
For identifier values passed to the DSL (for example the parameter of an ID predicate), no converter will be used. This means values passed to the DSL will be expected to be strings that match document identifiers exactly.
For fields values returned by the backend (for example in projections), no converter will be used. This generally means the projected values will have the same type as the index field.
Please refer to the reference documentation for more information.
-
STRING
This model applies formatting and parsing allowing working with the string representation of values.For string values passed to the DSL (for example the parameter of a match predicate), the
parser converter
defined in the mapping will be used. This generally means strings passed to the DSL will be expected to be formatted in a way that parsing of them can be done in the same way asindexing-null-as
parsing is performed.For identifier values passed to the DSL (for example the parameter of an ID predicate), the identifier parser converter defined in the mapping will be used.
For fields values returned by the backend (for example in projections), the
IndexFieldTypeConverterStep.formatter(FromDocumentValueConverter)
formatter} defined in the mapping will be used. This generally means the projected values will be strings that can be parsed back via theparser converter
.Please refer to the reference documentation for more information.
-
RAW
This model does not apply conversion and allows working with the types that the backend operates with on a low level.The values are passed straight to the backend as is. Conversion is disabled. Any encoding and decoding is also disabled.
For field values passed to the DSL (for example the parameter of a match predicate), no converter will be used. This generally means values passed to the DSL will be expected to have the same type as the type that backend uses to represent the index field.
For identifier values passed to the DSL (for example the parameter of an ID predicate), no converter will be used. This means values passed to the DSL will be expected to be strings that match document identifiers exactly.
For fields values returned by the backend (for example in projections), no converter will be used. This generally means the projected values will have the same type as the type that backend uses to represent the index field.
Requesting a raw value model representation requires working with backend specific types which are dependent on a particular backend implementation, hence these types are not guaranteed to be stable, and may change in the future.
Please refer to the reference documentation for more information.
-
DEFAULT
Deprecated, for removal: This API element is subject to removal in a future version.This constant is deprecated and will be removed at the same time as theValueConvert
enum is removed. Do not use this value explicitly.The result of applying this constant is the same asMAPPING
.The constant is only available to ease migration from the
ValueConvert
enum, and will be removed in the future.
-
-
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
-
ValueConvert
enum is removed.