Class DatabaseEntryContext<T extends DBEntry>

Direct Known Subclasses:
ActionContext, OperatorContext

public abstract class DatabaseEntryContext<T extends DBEntry> extends ArgumentBasedContext
  • Constructor Details

  • Method Details

    • getSignatureInPredicateForm

      public Predicate getSignatureInPredicateForm()
      Create predicate from the context signature.
      Overrides:
      getSignatureInPredicateForm in class ArgumentBasedContext
      Returns:
    • getDBE

      public T getDBE()
      Returns:
      the DB Entry used in this context.
    • setDBE

      public boolean setDBE(T dbe)
      Parameters:
      dbe - DB Entry to be used in this context.
      Returns:
      true if successfully set dbe otherwise false
    • addArgument

      protected boolean addArgument(int roleIndex, Object value)
      Add an argument to the list of arguments that were passed when the script was invoked.
      Parameters:
      roleIndex - the position at which to add the argument
      value - the value to be assigned to the argument
      Returns:
      true if successful, false otherwise
    • addVarArgArgument

      protected boolean addVarArgArgument(int roleIndex, Object value, int varArgCount)
      Add a varArg argument to the Context, using the DBEntry role as a guide to populate the argument details.
      Parameters:
      roleIndex -
      value -
      varArgCount -
      Returns:
    • setArgument

      protected void setArgument(int pos, Object val)
      Specify the (deep) value of an argument
      Parameters:
      pos - the position at which to add the argument
      val - the value to which the argument should be bound
    • setupArguments

      protected void setupArguments(Map<String,Object> bindings)
      Goes through and binds the values in an event spec to arguments.
    • setupArguments

      protected void setupArguments(List<? extends Object> inputArgs, List<? extends Object> returnArgs)
      Goes through and binds the values in an event spec to arguments. Interprets each element according to its role.
      Specified by:
      setupArguments in class ArgumentBasedContext
    • collectArguments

      public Collection<ActionBinding> collectArguments()
      Collect arguments (not local vars) in the correct order to be passed into the primitive action method. This should only return the required args of primitive and return arg
      Returns:
      ordered primitive action arguments