Class SimpleTransaction<T extends RootEntity>
java.lang.Object
com.cloudimpl.outstack.runtime.repo.SimpleTransaction<T>
- All Implemented Interfaces:
ITransaction<T>,QueryOperations<T>
public class SimpleTransaction<T extends RootEntity> extends java.lang.Object implements ITransaction<T>
- Author:
- nuwan
-
Constructor Summary
Constructors Constructor Description SimpleTransaction(java.lang.Class<? extends RootEntity> rootType, QueryOperations<T> queryOperation) -
Method Summary
Modifier and Type Method Description voidapply(Event e)ResultSet<T>getAllByRootType(java.lang.Class<T> rootType, java.lang.String tenantId, Query.PagingRequest paging)ResultSet<T>getAllByRootType(java.lang.Class<T> rootType, java.util.Collection<java.lang.String> tenantId, Query.PagingRequest paging)<C extends ChildEntity<T>>
ResultSet<C>getAllChildByType(java.lang.Class<T> rootType, java.lang.String id, java.lang.Class<C> childType, java.lang.String tenantId, Query.PagingRequest paging)<T1 extends ChildEntity<T>>
ResultSet<T1>getAllChildByType(java.lang.Class<T> rootType, java.lang.String id, java.lang.Class<T1> childType, java.util.Collection<java.lang.String> tenantId, Query.PagingRequest paging)<K> KgetAttachment()<C extends ChildEntity<T>>
java.util.Optional<C>getChildById(java.lang.Class<T> rootType, java.lang.String id, java.lang.Class<C> childType, java.lang.String childId, java.lang.String tenantId)<C extends ChildEntity<T>, K extends Entity, Z extends EntityQueryContext>
ZgetContext(java.lang.Class<K> entityType)java.util.Map<java.lang.String,Entity>getDeletedEntities()java.util.Collection<Entity>getEntityList()java.util.List<Event>getEventList()<C extends ChildEntity<T>>
ResultSet<Event<C>>getEventsByChildId(java.lang.Class<T> rootType, java.lang.String id, java.lang.Class<C> childType, java.lang.String childId, java.lang.String tenantId, Query.PagingRequest paging)ResultSet<Event<T>>getEventsByRootId(java.lang.Class<T> rootType, java.lang.String rootId, java.lang.String tenantId, Query.PagingRequest paging)InputMetaProvidergetInputMetaProvider()java.util.Map<java.lang.String,Entity>getRenameEntities()<K> KgetReply()java.util.Optional<T>getRootById(java.lang.Class<T> rootType, java.lang.String id, java.lang.String tenantId)java.lang.Class<T>getRootType()booleanisIdExist(java.lang.String id, java.lang.String tenantId)voidsetAttachment(java.lang.Object attachment)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.ITransaction
getTxList, isEntityRenamed
-
Constructor Details
-
SimpleTransaction
public SimpleTransaction(java.lang.Class<? extends RootEntity> rootType, QueryOperations<T> queryOperation)
-
-
Method Details
-
getEventList
- Specified by:
getEventListin interfaceITransaction<T extends RootEntity>
-
apply
-
getEntityList
- Specified by:
getEntityListin interfaceITransaction<T extends RootEntity>
-
getDeletedEntities
- Specified by:
getDeletedEntitiesin interfaceITransaction<T extends RootEntity>
-
getRenameEntities
- Specified by:
getRenameEntitiesin interfaceITransaction<T extends RootEntity>
-
setAttachment
public void setAttachment(java.lang.Object attachment)- Specified by:
setAttachmentin interfaceITransaction<T extends RootEntity>
-
getAttachment
public <K> K getAttachment()- Specified by:
getAttachmentin interfaceITransaction<T extends RootEntity>
-
getReply
public <K> K getReply()- Specified by:
getReplyin interfaceITransaction<T extends RootEntity>
-
getContext
public <C extends ChildEntity<T>, K extends Entity, Z extends EntityQueryContext> Z getContext(java.lang.Class<K> entityType)- Specified by:
getContextin interfaceITransaction<T extends RootEntity>
-
getInputMetaProvider
- Specified by:
getInputMetaProviderin interfaceITransaction<T extends RootEntity>
-
getAllByRootType
public ResultSet<T> getAllByRootType(java.lang.Class<T> rootType, java.lang.String tenantId, Query.PagingRequest paging)- Specified by:
getAllByRootTypein interfaceQueryOperations<T extends RootEntity>
-
getAllByRootType
public ResultSet<T> getAllByRootType(java.lang.Class<T> rootType, java.util.Collection<java.lang.String> tenantId, Query.PagingRequest paging)- Specified by:
getAllByRootTypein interfaceQueryOperations<T extends RootEntity>
-
getRootById
public java.util.Optional<T> getRootById(java.lang.Class<T> rootType, java.lang.String id, java.lang.String tenantId)- Specified by:
getRootByIdin interfaceQueryOperations<T extends RootEntity>
-
getChildById
public <C extends ChildEntity<T>> java.util.Optional<C> getChildById(java.lang.Class<T> rootType, java.lang.String id, java.lang.Class<C> childType, java.lang.String childId, java.lang.String tenantId)- Specified by:
getChildByIdin interfaceQueryOperations<T extends RootEntity>
-
getAllChildByType
public <C extends ChildEntity<T>> ResultSet<C> getAllChildByType(java.lang.Class<T> rootType, java.lang.String id, java.lang.Class<C> childType, java.lang.String tenantId, Query.PagingRequest paging)- Specified by:
getAllChildByTypein interfaceQueryOperations<T extends RootEntity>
-
getAllChildByType
public <T1 extends ChildEntity<T>> ResultSet<T1> getAllChildByType(java.lang.Class<T> rootType, java.lang.String id, java.lang.Class<T1> childType, java.util.Collection<java.lang.String> tenantId, Query.PagingRequest paging)- Specified by:
getAllChildByTypein interfaceQueryOperations<T extends RootEntity>
-
getEventsByRootId
public ResultSet<Event<T>> getEventsByRootId(java.lang.Class<T> rootType, java.lang.String rootId, java.lang.String tenantId, Query.PagingRequest paging)- Specified by:
getEventsByRootIdin interfaceQueryOperations<T extends RootEntity>
-
getEventsByChildId
public <C extends ChildEntity<T>> ResultSet<Event<C>> getEventsByChildId(java.lang.Class<T> rootType, java.lang.String id, java.lang.Class<C> childType, java.lang.String childId, java.lang.String tenantId, Query.PagingRequest paging)- Specified by:
getEventsByChildIdin interfaceQueryOperations<T extends RootEntity>
-
isIdExist
public boolean isIdExist(java.lang.String id, java.lang.String tenantId)- Specified by:
isIdExistin interfaceQueryOperations<T extends RootEntity>
-
getRootType
- Specified by:
getRootTypein interfaceITransaction<T extends RootEntity>
-