S
- the source class expected by the persister. A persister class is only compatible with source classes that
are equal to or extend S.@StableMinor(version="12.5", sinceVersion="10.0") public interface ISourceBigDataPersister<S extends Source<?>>
portal big data repository
.
The usual implementation of this interface is to create document types
in initBigData(S)
,
update document types in updateBigData(S)
, add and delete documents
in addDocuments(S, lumis.doui.source.ISourceData...)
and deleteDocuments(S, java.lang.String...)
, and delete the document types (and, in cascade its documents) in
deleteBigData(Source)
.
Modifier and Type | Method and Description |
---|---|
void |
addContextDocuments(String sourceId,
String contextId)
Adds all
documents corresponding to the given source and context to the portal big data
repository. |
void |
addDocuments(S source,
Collection<? extends ISourceData> data)
Adds
documents to the portal big data repository for the given source data entries. |
void |
addDocuments(S source,
ISourceData... data)
Adds
documents to the portal big data repository for the given source data entries. |
void |
deleteBigData(S source)
Deletes all structure stored in the portal big data repository relative to a source.
|
void |
deleteContextDocuments(String sourceId,
String contextId)
Deletes
documents from the portal big data repository for the specified source in a context. |
void |
deleteDocuments(S source,
Collection<String> itemIds)
Deletes
documents from the portal big data repository that corresponds to the data with the
given primary key values. |
void |
deleteDocuments(S source,
String... itemIds)
Deletes
documents from the portal big data repository that corresponds to the data with the
given primary key values. |
void |
initBigData(S source)
Initializes the big data repository with elements specifics to a source.
|
void |
updateBigData(S source)
Updates the big data repository according to a source.
|
void initBigData(S source)
This method is called at some moment between the service registration and its use, or when the source big data
will be recreated (after deleteBigData(S)
is called to delete anything related to the source).
This method will usually create the document types
that addDocuments(S, lumis.doui.source.ISourceData...)
for the source
will use.
source
- the source.void updateBigData(S source)
This method is called at some moment between the service registration and its use.
This method will usually update the document types
for the source.
source
- the source.void deleteBigData(S source)
This method is called when a source will cease to exist or when recreating the big data for a source.
This method must delete elements created by initBigData(S)
and documents added by addDocuments(S, lumis.doui.source.ISourceData...)
.
This method will usually delete the document types
created in initBigData(S)
and used
by addDocuments(S, lumis.doui.source.ISourceData...)
, which will remove related documents in cascade.
source
- the source.void addContextDocuments(String sourceId, String contextId)
documents
corresponding to the given source and context to the portal big data
repository.
This method is usually called when re-indexing a source after its documents have been deleted.
sourceId
- the source identifier.contextId
- the context identifier. Usually a service or service instance identifier.void deleteContextDocuments(String sourceId, String contextId)
documents
from the portal big data repository for the specified source in a context.sourceId
- the source identifier.contextId
- the context identifier.void addDocuments(S source, ISourceData... data)
documents
to the portal big data repository for the given source data entries.source
- the source.data
- the source's data to be used to generate the documents.void addDocuments(S source, Collection<? extends ISourceData> data)
documents
to the portal big data repository for the given source data entries.source
- the source.data
- the source's data to be used to generate the documents.void deleteDocuments(S source, String... itemIds)
documents
from the portal big data repository that corresponds to the data with the
given primary key values.source
- the source.itemIds
- the source data primary key values.void deleteDocuments(S source, Collection<String> itemIds)
documents
from the portal big data repository that corresponds to the data with the
given primary key values.source
- the source.itemIds
- the source data primary key values.LumisXP 12.5.0.200928 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.