Package io.ebean.plugin
Interface BeanDocType<T>
-
- Type Parameters:
T
- The type of entity bean
public interface BeanDocType<T>
Doc store functions for a specific entity bean type.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method 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, DocUpdateContext txn)
Add a delete by Id to the doc store.default FetchPath
embedded(String path)
Return the FetchPath for the embedded document.default FetchPath
embeddedManyRoot(String path)
For embedded 'many' properties we need a FetchPath relative to the root which is used to build and replace the embedded list.FetchPath
getEmbedded(String path)
Deprecated.FetchPath
getEmbeddedManyRoot(String path)
Deprecated.String
getIndexName()
Deprecated.String
getIndexType()
Deprecated.void
index(Object idValue, T bean, DocUpdateContext txn)
Store the bean in the doc store index.default String
indexName()
Return the doc store index name for this bean type.default String
indexType()
Return the doc store index type for this bean type.String
rawProperty(String property)
Return a 'raw' property mapped for the given property.void
updateEmbedded(Object idValue, String embeddedProperty, String embeddedRawContent, DocUpdateContext txn)
Add a embedded document update to the doc store.
-
-
-
Method Detail
-
getIndexType
@Deprecated String getIndexType()
Deprecated.Deprecated migrate to indexType().
-
getIndexName
@Deprecated String getIndexName()
Deprecated.Deprecated migrate to indexName().
-
applyPath
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.
-
getEmbedded
@Deprecated FetchPath getEmbedded(String path)
Deprecated.Deprecated migrate to embedded().
-
embeddedManyRoot
default FetchPath embeddedManyRoot(String path)
For embedded 'many' properties we need a FetchPath relative to the root which is used to build and replace the embedded list.
-
getEmbeddedManyRoot
@Deprecated FetchPath getEmbeddedManyRoot(String path)
Deprecated.Deprecated migrate to embeddedManyRoot().
-
rawProperty
String rawProperty(String property)
Return a 'raw' property mapped for the given property. If none exists the given property is returned.
-
index
void index(Object idValue, T bean, DocUpdateContext txn) throws IOException
Store the bean in the doc store index.This somewhat assumes the bean is fetched with appropriate path properties to match the expected document structure.
- Throws:
IOException
-
deleteById
void deleteById(Object idValue, DocUpdateContext txn) throws IOException
Add a delete by Id to the doc store.- Throws:
IOException
-
updateEmbedded
void updateEmbedded(Object idValue, String embeddedProperty, String embeddedRawContent, DocUpdateContext txn) throws IOException
Add a embedded document update to the doc store.- Parameters:
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 to- Throws:
IOException
-
-