@Retention(value=RUNTIME) @Target(value={FIELD,METHOD}) @Documented public @interface IndexedEmbedded
@*To*
, @Embedded
, @CollectionOfEmbedded
) is to be indexed in
the root entity index. This allows queries involving associated objects properties.Modifier and Type | Fields and Description |
---|---|
static String |
DEFAULT_NULL_TOKEN
Value for the
indexNullAs() parameter indicating that null values should be indexed using the null
token given through the Environment.DEFAULT_NULL_TOKEN configuration property. |
static String |
DO_NOT_INDEX_NULL
Default value for the
indexNullAs() parameter. |
Modifier and Type | Optional Element and Description |
---|---|
int |
depth
Stop indexing embedded elements when
depth is reached. |
boolean |
includeEmbeddedObjectId
Returns
true , if the id of the embedded object should be included into the index,
false otherwise. |
String[] |
includePaths
List which paths of the object graph should be included
in the index, and need to match the field names used to store them in the index, so they will
also match the field names used to specify full text queries.
|
String |
indexNullAs |
String |
prefix
Field name prefix, defaults to
propertyname. . |
Class<?> |
targetElement
Overrides the target type of an association, in case a collection overrides the type of the collection generics.
|
public static final String DO_NOT_INDEX_NULL
indexNullAs()
parameter. Indicates that null
values should not be indexed.public static final String DEFAULT_NULL_TOKEN
indexNullAs()
parameter indicating that null
values should be indexed using the null
token given through the Environment.DEFAULT_NULL_TOKEN
configuration property.
If no value is given for that property, the token _null_
will be used.public abstract String prefix
propertyname.
.public abstract String[] includePaths
List which paths of the object graph should be included in the index, and need to match the field names used to store them in the index, so they will also match the field names used to specify full text queries.
Defined paths are going to be indexed even if they exceed the depth
threshold.
When includePaths
is not empty, the default value for depth
is 0.
Defined paths are implicitly prefixed with the prefix()
.
public abstract int depth
depth
is reached.
depth=1
means the associated element is indexed, but not its embedded elements.
The default value depends on the value of the includePaths
attribute: if no paths
are defined, the default is Integer.MAX_VALUE
; if any includePaths
are
defined, the default depth
is interpreted as 0 if not specified to a different value
than it's default.
Note that when defining any path to the includePaths
attribute the default is zero also
when explicitly set to Integer.MAX_VALUE
.
Integer.MAX_VALUE
public abstract Class<?> targetElement
void.class
public abstract String indexNullAs
null
. Per default
IndexedEmbedded.DO_NOT_INDEX_NULL
is
returned indicating that null values are not indexed.public abstract boolean includeEmbeddedObjectId
true
, if the id of the embedded object should be included into the index,
false
otherwise. The default is false
.
Note
:
If the id property is explicitly listed via includePaths()
, then the id is included even if this value
is false
.
true
, if the id of the embedded object should be included into the index,
false
otherwise.Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved