T
- The type of entity beanpublic interface BeanDocType<T>
Modifier and Type | Method and Description |
---|---|
void |
applyPath(Query<T> spiQuery)
Apply the appropriate fetch path to the query such that the query returns beans matching
the document store structure with the expected embedded properties.
|
void |
deleteById(Object idValue,
io.ebeanservice.docstore.api.DocStoreUpdateContext txn)
Add a delete by Id to the doc store.
|
FetchPath |
getEmbedded(String path)
Return the FetchPath for the embedded document.
|
FetchPath |
getEmbeddedManyRoot(String path)
For embedded 'many' properties we need a FetchPath relative to the root which is used to
build and replace the embedded list.
|
String |
getIndexName()
Return the doc store index name for this bean type.
|
String |
getIndexType()
Return the doc store index type for this bean type.
|
void |
index(Object idValue,
T bean,
io.ebeanservice.docstore.api.DocStoreUpdateContext txn)
Store the bean in the doc store index.
|
String |
rawProperty(String property)
Return a 'raw' property mapped for the given property.
|
void |
updateEmbedded(Object idValue,
String embeddedProperty,
String embeddedRawContent,
io.ebeanservice.docstore.api.DocStoreUpdateContext txn)
Add a embedded document update to the doc store.
|
String getIndexType()
String getIndexName()
void applyPath(Query<T> spiQuery)
FetchPath getEmbedded(String path)
FetchPath getEmbeddedManyRoot(String path)
String rawProperty(String property)
void index(Object idValue, T bean, io.ebeanservice.docstore.api.DocStoreUpdateContext txn) throws IOException
This somewhat assumes the bean is fetched with appropriate path properties to match the expected document structure.
IOException
void deleteById(Object idValue, io.ebeanservice.docstore.api.DocStoreUpdateContext txn) throws IOException
IOException
void updateEmbedded(Object idValue, String embeddedProperty, String embeddedRawContent, io.ebeanservice.docstore.api.DocStoreUpdateContext txn) throws IOException
idValue
- the Id value of the bean holding the embedded documentembeddedProperty
- the embedded propertyembeddedRawContent
- the content of the embedded document in JSON formtxn
- the doc store transaction to add the update toIOException
Copyright © 2019. All rights reserved.