Package org.apache.derby.iapi.services.compiler

Examples of org.apache.derby.iapi.services.compiler.MethodBuilder.pushThis()


    // generates:
    //   java.lang.Object userExprFun( ) { }
    MethodBuilder userExprFun = ecb.newUserExprFun();

        /* Push the the current row onto the stack. */
        userExprFun.pushThis();
        userExprFun.push( rsNumber );
        userExprFun.callMethod(VMOpcode.INVOKEVIRTUAL, ClassName.BaseActivation, "getCurrentRow", ClassName.Row, 1);

    // Loop through the result columns, computing generated columns
        // as we go.
View Full Code Here


                MethodBuilder mb) throws StandardException
  {
    if (indexOfSessionTableNamesInSavedObjects != -1 ) //if this cursor references session schema tables, do following
    {
      MethodBuilder constructor = acb.getConstructor();
      constructor.pushThis();
      constructor.push(indexOfSessionTableNamesInSavedObjects);
      constructor.putField(org.apache.derby.iapi.reference.ClassName.BaseActivation, "indexOfSessionTableNamesInSavedObjects", "int");
      constructor.endStatement();
    }
View Full Code Here

      **
      ** pvs is a ParameterValueSet that lives in the superclass of
      ** the activation being generated.
      */

      constructor.pushThis(); // for the put field down below

      /* Generate the call to getContext */
      //?X constructor.pushThis();
      //?Xconstructor.callMethod(VMOpcode.INVOKEINTERFACE, ClassName.Activation, "getLanguageConnectionContext",
      //?X          ClassName.LanguageConnectionContext, 0);
View Full Code Here

      ** Add a call to the execute() method to check
      ** for missing parameters
      */
      MethodBuilder  executeMethod = acb.getExecuteMethod();

      executeMethod.pushThis();
      executeMethod.callMethod(VMOpcode.INVOKEVIRTUAL, ClassName.BaseActivation, "throwIfMissingParms", "void", 0);
    }
  }

  /**
 
View Full Code Here

      int numResultSets = acb.getRowCount();
      if(numResultSets > 0)
      {
        //generate activation.raParentResultSets = new NoPutResultSet[size]
        MethodBuilder constructor = acb.getConstructor();
        constructor.pushThis();
        constructor.pushNewArray(ClassName.CursorResultSet, numResultSets);
        constructor.putField(ClassName.BaseActivation,
                   "raParentResultSets",
                   ClassName.CursorResultSet + "[]");
        constructor.endStatement();
View Full Code Here

               
        // get the RowLocation template
        exprFun.getField(lf); // instance for setColumn
        exprFun.push(highestColumnNumber + 1); // first arg

        exprFun.pushThis(); // instance for getRowLocationTemplate
        exprFun.push(savedItem); // first arg
        exprFun.callMethod(VMOpcode.INVOKEINTERFACE, ClassName.Activation, "getRowLocationTemplate",
                  ClassName.RowLocation, 1);

        exprFun.upCast(ClassName.DataValueDescriptor);
View Full Code Here

                MethodBuilder mb) throws StandardException
  {
    if (indexOfSessionTableNamesInSavedObjects != -1 ) //if this cursor references session schema tables, do following
    {
      MethodBuilder constructor = acb.getConstructor();
      constructor.pushThis();
      constructor.push(indexOfSessionTableNamesInSavedObjects);
      constructor.putField(org.apache.derby.iapi.reference.ClassName.BaseActivation, "indexOfSessionTableNamesInSavedObjects", "int");
      constructor.endStatement();
    }
View Full Code Here

               
        // get the RowLocation template
        exprFun.getField(lf); // instance for setColumn
        exprFun.push(highestColumnNumber + 1); // first arg

        exprFun.pushThis(); // instance for getRowLocationTemplate
        exprFun.push(savedItem); // first arg
        exprFun.callMethod(VMOpcode.INVOKEINTERFACE, ClassName.Activation, "getRowLocationTemplate",
                  ClassName.RowLocation, 1);

        exprFun.upCast(ClassName.DataValueDescriptor);
View Full Code Here

    // add a check at activation reset time to see if the cursor has
    // changed underneath us. Doing it in the constructor allows the
    // compilation to happen
    MethodBuilder rmb = acb.startResetMethod();

    rmb.pushThis();
    rmb.push(cursorName);
    rmb.push(preStmt.getObjectName());
    rmb.callMethod(VMOpcode.INVOKEVIRTUAL, ClassName.BaseActivation, "checkPositionedStatement",
            "void", 2);
View Full Code Here

    ** the resultSet variable is cached.
    **
    **   resultSet = (resultSet == null) ? ... : resultSet
    */

    executeMethod.pushThis();
    executeMethod.getField(ClassName.BaseActivation, "resultSet", ClassName.ResultSet);
    executeMethod.conditionalIfNull();

      /* We should generate the result set here.  However, the generated
       * code size may be too big to fit in a conditional statement for
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.