Package com.cloudimpl.outstack.runtime
Class EventRepositoy<T extends RootEntity>
java.lang.Object
com.cloudimpl.outstack.runtime.EventRepositoy<T>
- Type Parameters:
T-
- All Implemented Interfaces:
QueryOperations<T>
- Direct Known Subclasses:
MemEventRepository
public abstract class EventRepositoy<T extends RootEntity> extends java.lang.Object implements QueryOperations<T>
- Author:
- nuwan
-
Field Summary
Fields Modifier and Type Field Description protected ResourceHelperresourceHelperprotected java.lang.Class<T>rootTypestatic java.lang.StringTID_PREFIXprotected java.lang.Stringversion -
Constructor Summary
Constructors Constructor Description EventRepositoy(java.lang.Class<T> rootType, ResourceHelper resourceHelper, EventStream eventStream) -
Method Summary
Modifier and Type Method Description abstract <T extends Entity>
TapplyEvent(Event event)java.lang.StringgenerateTid()<K extends Entity, C extends ChildEntity<T>>
java.util.Optional<K>loadEntityWithClone(java.lang.Class<T> rootType, java.lang.String id, java.lang.Class<C> childType, java.lang.String childId, java.lang.String tenantId)abstract voidsaveTx(EntityContextProvider.Transaction transaction)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.cloudimpl.outstack.runtime.QueryOperations
getAllByRootType, getAllChildByType, getChildById, getEventsByChildId, getEventsByRootId, getRootById
-
Field Details
-
TID_PREFIX
public static final java.lang.String TID_PREFIX- See Also:
- Constant Field Values
-
rootType
-
resourceHelper
-
version
protected final java.lang.String version
-
-
Constructor Details
-
EventRepositoy
public EventRepositoy(java.lang.Class<T> rootType, ResourceHelper resourceHelper, EventStream eventStream)
-
-
Method Details
-
generateTid
public java.lang.String generateTid() -
saveTx
-
applyEvent
-
loadEntityWithClone
public <K extends Entity, C extends ChildEntity<T>> java.util.Optional<K> loadEntityWithClone(java.lang.Class<T> rootType, java.lang.String id, java.lang.Class<C> childType, java.lang.String childId, java.lang.String tenantId)
-