Class NoOpDocumentElement
- java.lang.Object
-
- org.hibernate.search.engine.backend.document.spi.NoOpDocumentElement
-
- All Implemented Interfaces:
DocumentElement
public class NoOpDocumentElement extends Object implements DocumentElement
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addNullObject(String relativeFieldName)
Add anull
object to a field in this document element.void
addNullObject(IndexObjectFieldReference fieldReference)
Add anull
object to the referenced field in this document element.DocumentElement
addObject(String relativeFieldName)
Add a new object to a field in this document element.DocumentElement
addObject(IndexObjectFieldReference fieldReference)
Add a new object 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)
Add a new value to a field in this document element.static NoOpDocumentElement
get()
-
-
-
Method Detail
-
get
public static NoOpDocumentElement get()
-
addValue
public <F> void addValue(IndexFieldReference<F> fieldReference, F value)
Description copied from interface:DocumentElement
Add a new value to a field in this document element.This method can be called multiple times for the same field, which will result in multiple values being added to the same field.
- Specified by:
addValue
in interfaceDocumentElement
- Type Parameters:
F
- The type of values for the given field.- Parameters:
fieldReference
- A reference to the field to add a value to. References are returned byIndexSchemaFieldFinalStep.toReference()
in thefield definition DSL
.value
- The value to add to the field.
-
addObject
public DocumentElement addObject(IndexObjectFieldReference fieldReference)
Description copied from interface:DocumentElement
Add a new object to a field in this document element.- Specified by:
addObject
in interfaceDocumentElement
- Parameters:
fieldReference
- A reference to the object field to add an object to. References are returned byIndexSchemaFieldFinalStep.toReference()
in thefield definition DSL
.- Returns:
- The new object, that can be populated with its own fields.
-
addNullObject
public void addNullObject(IndexObjectFieldReference fieldReference)
Description copied from interface:DocumentElement
Add anull
object to the referenced field in this document element.The
null
object may have a representation in the backend (such as a JSONnull
), or it may be ignored completely, depending on the backend implementation.- Specified by:
addNullObject
in interfaceDocumentElement
- Parameters:
fieldReference
- A reference to the object field to add anull
object to. References are returned byIndexSchemaFieldFinalStep.toReference()
in thefield definition DSL
.
-
addValue
public void addValue(String relativeFieldName, Object value)
Description copied from interface:DocumentElement
Add a new value to a field in this document element.This method can be called multiple times for the same field, which will result in multiple values being added to the same field.
- Specified by:
addValue
in interfaceDocumentElement
- Parameters:
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 throughIndexSchemaElement.field(String, Function)
, or indirectly throughIndexSchemaElement.fieldTemplate(String, Function)
.value
- The value to add to the field.
-
addObject
public DocumentElement addObject(String relativeFieldName)
Description copied from interface:DocumentElement
Add a new object to a field in this document element.- Specified by:
addObject
in interfaceDocumentElement
- Parameters:
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 throughIndexSchemaElement.objectField(String, ObjectStructure)
, or indirectly throughIndexSchemaElement.objectFieldTemplate(String, ObjectStructure)
.- Returns:
- The new object, that can be populated with its own fields.
-
addNullObject
public void addNullObject(String relativeFieldName)
Description copied from interface:DocumentElement
Add anull
object to a field in this document element.The
null
object may have a representation in the backend (such as a JSONnull
), or it may be ignored completely, depending on the backend implementation.- Specified by:
addNullObject
in interfaceDocumentElement
- Parameters:
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 throughIndexSchemaElement.objectField(String, ObjectStructure)
, or indirectly throughIndexSchemaElement.objectFieldTemplate(String, ObjectStructure)
.
-
-