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 java.util.function.Supplier<java.lang.String> idGenerator  
    protected QueryOperations<R> queryOperation  
    protected java.util.function.Function<java.lang.Class<? extends RootEntity>,​QueryOperations<?>> queryOperationSelector  
    protected java.lang.Object reply  
    protected java.lang.String rootTid  
    protected java.lang.String tenantId  
    protected java.util.function.Consumer<java.lang.Object> validator  
  • Constructor Summary

    Constructors
    Constructor Description
    ReadOnlyTransaction​(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)  
  • Method Summary

    Modifier and Type Method Description
    java.util.Collection<R> getAllByRootType​(java.lang.Class<R> rootType, java.lang.String tenantId, Query.PagingRequest paging)  
    <T extends ChildEntity<R>>
    java.util.Collection<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>
    EntityContext<?>
    getContext​(java.lang.Class<K> entityType)  
    <K> K getReply()  
    java.util.Optional<R> getRootById​(java.lang.Class<R> rootType, java.lang.String id, java.lang.String tenantId)  
    java.lang.String getRootTid()  
    java.lang.String getTenantId()  
    void setReply​(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

      protected final QueryOperations<R extends RootEntity> 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
  • Constructor Details

    • ReadOnlyTransaction

      public ReadOnlyTransaction​(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)
  • 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> EntityContext<?> 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:
      getRootById in interface QueryOperations<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:
      getChildById in interface QueryOperations<R extends RootEntity>
    • getAllChildByType

      public <T extends ChildEntity<R>> java.util.Collection<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:
      getAllChildByType in interface QueryOperations<R extends RootEntity>
    • getAllByRootType

      public java.util.Collection<R> getAllByRootType​(java.lang.Class<R> rootType, java.lang.String tenantId, Query.PagingRequest paging)
      Specified by:
      getAllByRootType in interface QueryOperations<R extends RootEntity>