Package ca.uhn.fhir.jpa.model.search
Class HSearchElementCache
java.lang.Object
ca.uhn.fhir.jpa.model.search.HSearchElementCache
Provide a lookup of created Hibernate Search DocumentElement entries.
The Hibernate Search DocumentElement api only supports create - it does not support fetching an existing element.
This class demand-creates object elements for a given path.
-
Constructor Summary
ConstructorDescriptionHSearchElementCache
(org.hibernate.search.engine.backend.document.DocumentElement theRoot) Create the helper rooted on the given DocumentElement -
Method Summary
Modifier and TypeMethodDescriptionorg.hibernate.search.engine.backend.document.DocumentElement
getObjectElement
(String... thePath) Fetch or create an Object DocumentElement with thePath from the root element.org.hibernate.search.engine.backend.document.DocumentElement
getObjectElement
(List<String> thePath) Fetch or create an Object DocumentElement with thePath from the root element.
-
Constructor Details
-
HSearchElementCache
Create the helper rooted on the given DocumentElement- Parameters:
theRoot
- the document root
-
-
Method Details
-
getObjectElement
public org.hibernate.search.engine.backend.document.DocumentElement getObjectElement(@Nonnull String... thePath) Fetch or create an Object DocumentElement with thePath from the root element.- Parameters:
thePath
- the property names of the object path. E.g. "sp","code","token"- Returns:
- the existing or created element
-
getObjectElement
public org.hibernate.search.engine.backend.document.DocumentElement getObjectElement(@Nonnull List<String> thePath) Fetch or create an Object DocumentElement with thePath from the root element.- Parameters:
thePath
- the property names of the object path. E.g. "sp","code","token"- Returns:
- the existing or created element
-