Class DefaultUpdateListener
- java.lang.Object
-
- org.projectbarbel.histo.extension.AbstractUpdateListener<com.googlecode.cqengine.IndexedCollection<BitemporalVersion>,BitemporalVersion>
-
- org.projectbarbel.histo.extension.DefaultUpdateListener
-
- All Implemented Interfaces:
UpdateListenerProtocol<com.googlecode.cqengine.IndexedCollection<BitemporalVersion>,BitemporalVersion>
public class DefaultUpdateListener extends AbstractUpdateListener<com.googlecode.cqengine.IndexedCollection<BitemporalVersion>,BitemporalVersion>
Default listener implementation. Can be used to shadow backbone into a persistentIndexedCollection
.- Author:
- Niklas Schlimm
-
-
Field Summary
-
Fields inherited from class org.projectbarbel.histo.extension.AbstractUpdateListener
documentIdFieldName, gson, managedType, mode, persistedType, shadow, VERSION_ID, versionIdFieldName
-
-
Constructor Summary
Constructors Constructor Description DefaultUpdateListener(Class<?> managedType, com.google.gson.Gson gson)
-
Method Summary
Modifier and Type Method Description long
delete(String versionId)
long
deleteJournal(Object id)
BitemporalVersion
fromPersistenceObjectJsonToStoredDocument(String json)
String
fromStroredDocumentToPersistenceObjectJson(BitemporalVersion document)
com.googlecode.cqengine.IndexedCollection<BitemporalVersion>
getExternalDataResource()
void
insertDocuments(List<BitemporalVersion> documentsToInsert)
Iterable<BitemporalVersion>
queryJournal(Object documentId)
-
Methods inherited from class org.projectbarbel.histo.extension.AbstractUpdateListener
fromStoredDocumentToPersistenceObject, handleInitialization, handleLoadOperation, handleUnLoadOperation, handleUpdate
-
-
-
-
Constructor Detail
-
DefaultUpdateListener
public DefaultUpdateListener(Class<?> managedType, com.google.gson.Gson gson)
-
-
Method Detail
-
getExternalDataResource
public com.googlecode.cqengine.IndexedCollection<BitemporalVersion> getExternalDataResource()
-
insertDocuments
public void insertDocuments(List<BitemporalVersion> documentsToInsert)
-
queryJournal
public Iterable<BitemporalVersion> queryJournal(Object documentId)
-
delete
public long delete(String versionId)
-
deleteJournal
public long deleteJournal(Object id)
-
fromStroredDocumentToPersistenceObjectJson
public String fromStroredDocumentToPersistenceObjectJson(BitemporalVersion document)
- Specified by:
fromStroredDocumentToPersistenceObjectJson
in classAbstractUpdateListener<com.googlecode.cqengine.IndexedCollection<BitemporalVersion>,BitemporalVersion>
-
fromPersistenceObjectJsonToStoredDocument
public BitemporalVersion fromPersistenceObjectJsonToStoredDocument(String json)
- Specified by:
fromPersistenceObjectJsonToStoredDocument
in classAbstractUpdateListener<com.googlecode.cqengine.IndexedCollection<BitemporalVersion>,BitemporalVersion>
-
-