public interface DocumentElement
Instances may represent the document root as well as a partial view of the document, for instance a view on a specific "object" field nested inside the document.
| Modifier and Type | Method and Description |
|---|---|
void |
addNullObject(IndexObjectFieldReference fieldReference)
Add a
null object to the referenced field in this document element. |
void |
addNullObject(String relativeFieldName)
Add a
null object to a field in this document element. |
DocumentElement |
addObject(IndexObjectFieldReference fieldReference)
Add a new object to a field in this document element.
|
DocumentElement |
addObject(String relativeFieldName)
Add a new object to a field in this document element.
|
<F> void |
addValue(IndexFieldReference<F> fieldReference,
F value)
Add a new value to a field in this document element.
|
void |
addValue(String relativeFieldName,
Object value)
Add a new value to a field in this document element.
|
<F> void addValue(IndexFieldReference<F> fieldReference, F value)
This method can be called multiple times for the same field, which will result in multiple values being added to the same field.
F - The type of values for the given field.fieldReference - A reference to the field to add a value to.
References are returned by IndexSchemaFieldFinalStep.toReference()
in the field definition DSL.value - The value to add to the field.SearchException - If the field is defined in a different document element.DocumentElement addObject(IndexObjectFieldReference fieldReference)
fieldReference - A reference to the object field to add an object to.
References are returned by IndexSchemaFieldFinalStep.toReference()
in the field definition DSL.SearchException - If the field is defined in a different document element.void addNullObject(IndexObjectFieldReference fieldReference)
null object to the referenced field in this document element.
The null object may have a representation in the backend (such as a JSON null),
or it may be ignored completely, depending on the backend implementation.
fieldReference - A reference to the object field to add a null object to.
References are returned by IndexSchemaFieldFinalStep.toReference()
in the field definition DSL.SearchException - If the field is defined in a different document element.void addValue(String relativeFieldName, Object value)
This method can be called multiple times for the same field, which will result in multiple values being added to the same field.
relativeFieldName - The name of the field to add a value to, relative to this document element.
The field must have been defined previously, either directly
through IndexSchemaElement.field(String, Function),
or indirectly through IndexSchemaElement.fieldTemplate(String, Function).value - The value to add to the field.SearchException - If the field is not defined
or if value has an incorrect type of this field.DocumentElement addObject(String relativeFieldName)
relativeFieldName - The name of the object field to add a value to, relative to this document element.
The field must have been defined previously, either directly
through IndexSchemaElement.objectField(String, ObjectFieldStorage),
or indirectly through IndexSchemaElement.objectFieldTemplate(String, ObjectFieldStorage).SearchException - If the field is not defined
or is not an object field.void addNullObject(String relativeFieldName)
null object to a field in this document element.
The null object may have a representation in the backend (such as a JSON null),
or it may be ignored completely, depending on the backend implementation.
relativeFieldName - The name of the object field to add a value to, relative to this document element.
The field must have been defined previously, either directly
through IndexSchemaElement.objectField(String, ObjectFieldStorage),
or indirectly through IndexSchemaElement.objectFieldTemplate(String, ObjectFieldStorage).SearchException - If the field is not defined
or is not an object field.Copyright © 2006-2020 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.