Package com.cloudimpl.outstack.runtime
Class EntityQueryContextProvider.ReadOnlyTransaction<R extends RootEntity>
java.lang.Object
com.cloudimpl.outstack.runtime.EntityQueryContextProvider.ReadOnlyTransaction<R>
- All Implemented Interfaces:
ITransaction<R>,QueryOperations<R>
- Direct Known Subclasses:
EntityContextProvider.Transaction
- Enclosing class:
- EntityQueryContextProvider<T extends RootEntity>
public static class EntityQueryContextProvider.ReadOnlyTransaction<R extends RootEntity> extends java.lang.Object implements ITransaction<R>
-
Field Summary
Fields Modifier and Type Field Description protected booleanasyncprotected java.util.function.Supplier<java.lang.String>idGeneratorprotected QueryOperations<R>queryOperationprotected java.util.function.Function<java.lang.Class<? extends RootEntity>,QueryOperations<?>>queryOperationSelectorprotected java.lang.Objectreplyprotected java.lang.StringrootTidprotected java.lang.StringtenantIdprotected java.util.function.Consumer<java.lang.Object>validatorprotected java.lang.Stringversion -
Constructor Summary
Constructors Constructor Description ReadOnlyTransaction(java.lang.Class<R> type, java.util.function.Supplier<java.lang.String> idGenerator, java.lang.String rootTid, java.lang.String tenantId, QueryOperations<R> queryOperation, java.util.function.Consumer<java.lang.Object> validator, java.util.function.Function<java.lang.Class<? extends RootEntity>,QueryOperations<?>> queryOperationSelector, java.lang.String version, boolean async, java.util.function.Supplier<java.util.function.BiFunction<java.lang.String,java.lang.Object,reactor.core.publisher.Mono>> requestHandler) -
Method Summary
Modifier and Type Method Description ResultSet<R>getAllByRootType(java.lang.Class<R> rootType, java.lang.String tenantId, Query.PagingRequest paging)ResultSet<R>getAllByRootType(java.lang.Class<R> rootType, java.util.Collection<java.lang.String> tenantId, Query.PagingRequest paging)<T extends ChildEntity<R>>
ResultSet<T>getAllChildByType(java.lang.Class<R> rootType, java.lang.String id, java.lang.Class<T> childType, java.lang.String tenantId, Query.PagingRequest pageable)<T extends ChildEntity<R>>
ResultSet<T>getAllChildByType(java.lang.Class<R> rootType, java.lang.String id, java.lang.Class<T> childType, java.util.Collection<java.lang.String> tenantId, Query.PagingRequest paging)<K> KgetAttachment()<T extends ChildEntity<R>>
java.util.Optional<T>getChildById(java.lang.Class<R> rootType, java.lang.String id, java.lang.Class<T> childType, java.lang.String childId, java.lang.String tenantId)<C extends ChildEntity<R>, 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()<T extends ChildEntity<R>>
ResultSet<Event<T>>getEventsByChildId(java.lang.Class<R> rootType, java.lang.String id, java.lang.Class<T> childType, java.lang.String childId, java.lang.String tenantId, Query.PagingRequest paging)ResultSet<Event<R>>getEventsByRootId(java.lang.Class<R> 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<R>getRootById(java.lang.Class<R> rootType, java.lang.String id, java.lang.String tenantId)java.lang.StringgetRootTid()java.lang.Class<R>getRootType()java.lang.StringgetTenantId()booleanisIdExist(java.lang.String id, java.lang.String tenantId)voidsetAttachment(java.lang.Object attachment)voidsetReply(java.lang.Object reply)protected voidvalidateRootTid()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
-
Field Details
-
queryOperation
-
tenantId
protected final java.lang.String tenantId -
idGenerator
protected final java.util.function.Supplier<java.lang.String> idGenerator -
rootTid
protected java.lang.String rootTid -
reply
protected java.lang.Object reply -
validator
protected final java.util.function.Consumer<java.lang.Object> validator -
queryOperationSelector
protected final java.util.function.Function<java.lang.Class<? extends RootEntity>,QueryOperations<?>> queryOperationSelector -
version
protected final java.lang.String version -
async
protected final boolean async
-
-
Constructor Details
-
ReadOnlyTransaction
public ReadOnlyTransaction(java.lang.Class<R> type, java.util.function.Supplier<java.lang.String> idGenerator, java.lang.String rootTid, java.lang.String tenantId, QueryOperations<R> queryOperation, java.util.function.Consumer<java.lang.Object> validator, java.util.function.Function<java.lang.Class<? extends RootEntity>,QueryOperations<?>> queryOperationSelector, java.lang.String version, boolean async, java.util.function.Supplier<java.util.function.BiFunction<java.lang.String,java.lang.Object,reactor.core.publisher.Mono>> requestHandler)
-
-
Method Details
-
getInputMetaProvider
- Specified by:
getInputMetaProviderin interfaceITransaction<R extends RootEntity>
-
getTenantId
public java.lang.String getTenantId() -
getRootTid
public java.lang.String getRootTid() -
setReply
public void setReply(java.lang.Object reply) -
getReply
public <K> K getReply()- Specified by:
getReplyin interfaceITransaction<R extends RootEntity>
-
getContext
public <C extends ChildEntity<R>, K extends Entity, Z extends EntityQueryContext> Z getContext(java.lang.Class<K> entityType)- Specified by:
getContextin interfaceITransaction<R extends RootEntity>
-
validateRootTid
protected void validateRootTid() -
getRootById
public java.util.Optional<R> getRootById(java.lang.Class<R> rootType, java.lang.String id, java.lang.String tenantId)- Specified by:
getRootByIdin interfaceQueryOperations<R extends RootEntity>
-
getChildById
public <T extends ChildEntity<R>> java.util.Optional<T> getChildById(java.lang.Class<R> rootType, java.lang.String id, java.lang.Class<T> childType, java.lang.String childId, java.lang.String tenantId)- Specified by:
getChildByIdin interfaceQueryOperations<R extends RootEntity>
-
getAllChildByType
public <T extends ChildEntity<R>> ResultSet<T> getAllChildByType(java.lang.Class<R> rootType, java.lang.String id, java.lang.Class<T> childType, java.lang.String tenantId, Query.PagingRequest pageable)- Specified by:
getAllChildByTypein interfaceQueryOperations<R extends RootEntity>
-
getAllChildByType
public <T extends ChildEntity<R>> ResultSet<T> getAllChildByType(java.lang.Class<R> rootType, java.lang.String id, java.lang.Class<T> childType, java.util.Collection<java.lang.String> tenantId, Query.PagingRequest paging)- Specified by:
getAllChildByTypein interfaceQueryOperations<R extends RootEntity>
-
getAllByRootType
public ResultSet<R> getAllByRootType(java.lang.Class<R> rootType, java.lang.String tenantId, Query.PagingRequest paging)- Specified by:
getAllByRootTypein interfaceQueryOperations<R extends RootEntity>
-
getAllByRootType
public ResultSet<R> getAllByRootType(java.lang.Class<R> rootType, java.util.Collection<java.lang.String> tenantId, Query.PagingRequest paging)- Specified by:
getAllByRootTypein interfaceQueryOperations<R extends RootEntity>
-
getEventsByRootId
public ResultSet<Event<R>> getEventsByRootId(java.lang.Class<R> rootType, java.lang.String rootId, java.lang.String tenantId, Query.PagingRequest paging)- Specified by:
getEventsByRootIdin interfaceQueryOperations<R extends RootEntity>
-
getEventsByChildId
public <T extends ChildEntity<R>> ResultSet<Event<T>> getEventsByChildId(java.lang.Class<R> rootType, java.lang.String id, java.lang.Class<T> childType, java.lang.String childId, java.lang.String tenantId, Query.PagingRequest paging)- Specified by:
getEventsByChildIdin interfaceQueryOperations<R extends RootEntity>
-
setAttachment
public void setAttachment(java.lang.Object attachment)- Specified by:
setAttachmentin interfaceITransaction<R extends RootEntity>
-
getAttachment
public <K> K getAttachment()- Specified by:
getAttachmentin interfaceITransaction<R extends RootEntity>
-
getEventList
- Specified by:
getEventListin interfaceITransaction<R extends RootEntity>
-
getEntityList
- Specified by:
getEntityListin interfaceITransaction<R extends RootEntity>
-
getDeletedEntities
- Specified by:
getDeletedEntitiesin interfaceITransaction<R extends RootEntity>
-
getRenameEntities
- Specified by:
getRenameEntitiesin interfaceITransaction<R extends RootEntity>
-
isIdExist
public boolean isIdExist(java.lang.String id, java.lang.String tenantId)- Specified by:
isIdExistin interfaceQueryOperations<R extends RootEntity>
-
getRootType
- Specified by:
getRootTypein interfaceITransaction<R extends RootEntity>
-