Package com.cloudimpl.outstack.runtime
Class EntityQueryContextProvider.ReadOnlyTransaction<R extends RootEntity>
java.lang.Object
com.cloudimpl.outstack.runtime.EntityQueryContextProvider.ReadOnlyTransaction<R>
- All Implemented Interfaces:
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 QueryOperations<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) -
Method Summary
Modifier and Type Method Description ResultSet<R>getAllByRootType(java.lang.Class<R> rootType, 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>>
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)<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)<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.StringgetTenantId()voidsetReply(java.lang.Object reply)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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)
-
-
Method Details
-
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() -
getContext
public <C extends ChildEntity<R>, K extends Entity, Z extends EntityQueryContext> Z getContext(java.lang.Class<K> entityType) -
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>
-
getAllByRootType
public ResultSet<R> getAllByRootType(java.lang.Class<R> rootType, 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>
-