Class QueryScope.StandaloneImpl

java.lang.Object
com.illumon.iris.db.tables.select.QueryScope
com.illumon.iris.db.tables.select.QueryScope.StandaloneImpl
All Implemented Interfaces:
com.fishlib.base.log.LogOutputAppendable
Enclosing class:
QueryScope

public static class QueryScope.StandaloneImpl extends QueryScope
  • Constructor Details

    • StandaloneImpl

      public StandaloneImpl(@Nullable RemoteQueryScopeClient remoteQueryScopeClient)
    • StandaloneImpl

      public StandaloneImpl()
  • Method Details

    • getParamNames

      public Set<String> getParamNames()
      Description copied from class: QueryScope
      Get all known scope variable names.
      Specified by:
      getParamNames in class QueryScope
      Returns:
      A collection of scope variable names.
    • hasParamName

      public boolean hasParamName(String name)
      Description copied from class: QueryScope
      Check if the scope has the given name.
      Specified by:
      hasParamName in class QueryScope
      Parameters:
      name - param name
      Returns:
      True iff the scope has the given param name
    • createParam

      protected <T> Param<T> createParam(String name) throws QueryScope.MissingVariableException
      Description copied from class: QueryScope
      Get a Param by name.
      Specified by:
      createParam in class QueryScope
      Parameters:
      name - parameter name
      Returns:
      newly-constructed Param (name + value-snapshot pair).
      Throws:
      QueryScope.MissingVariableException - If any of the named scope variables does not exist.
    • readParamValue

      public <T> T readParamValue(String name) throws QueryScope.MissingVariableException
      Description copied from class: QueryScope
      Get the value of a given scope parameter by name.
      Specified by:
      readParamValue in class QueryScope
      Parameters:
      name - parameter name.
      Returns:
      parameter value.
      Throws:
      QueryScope.MissingVariableException - If no such scope parameter exists.
    • readParamValue

      public <T> T readParamValue(String name, T defaultValue)
      Description copied from class: QueryScope
      Get the value of a given scope parameter by name.
      Specified by:
      readParamValue in class QueryScope
      Parameters:
      name - parameter name.
      defaultValue - default parameter value.
      Returns:
      parameter value, or the default parameter value, if the value is not present.
    • putParam

      public <T> void putParam(String name, T value)
      Description copied from class: QueryScope
      Add a parameter to the scope.
      Specified by:
      putParam in class QueryScope
      Parameters:
      name - parameter name.
      value - parameter value.
    • putRemoteParams

      public void putRemoteParams(Map<String,Class> remoteParams)
      Description copied from class: QueryScope
      Add remote parameter metadata, for scopes that support this. Note: This is an optional method.
      Specified by:
      putRemoteParams in class QueryScope
      Parameters:
      remoteParams - remote parameter metadata.
    • getLocalValuesForRemoteParams

      public Map<String,Object> getLocalValuesForRemoteParams()
      Description copied from class: QueryScope
      Get a snapshot of local values for remote parameters, for scopes that support this. Note: This is an optional method.
      Specified by:
      getLocalValuesForRemoteParams in class QueryScope
      Returns:
      A map from name to the current local value for all remote params.
    • putObjectFields

      public void putObjectFields(Object object)
      Description copied from class: QueryScope
      Add an object's public members (referenced reflectively, not a shallow copy!) to this scope if supported. Note: This is an optional method.
      Specified by:
      putObjectFields in class QueryScope
      Parameters:
      object - object to add public members from.