Examples of Statement


Examples of net.sf.jsqlparser.statement.Statement

  public static SQLVisitor parseQuery(Map map) {
    final String sqlString = readSQL(map);

    final CCJSqlParserManager pm = new CCJSqlParserManager();
    Statement statement = null;
    try {
      statement = pm.parse(new StringReader(sqlString));
    } catch (final JSQLParserException ex) {
      LOG.info("JSQLParserException");
    }
View Full Code Here

Examples of net.sf.laja.parser.cdd.behaviour.Statement

        AsMethod asMethod = new AsMethod();
        asMethod.setComment("(factory)");
        asMethod.setMethodName("as" + template.classname);
        asMethod.setReturnclass(template.classname);
        Statement statement = new Statement();
        statement.setInnerStatement("        return new " + behaviour.classname + "(state);");
        asMethod.setStatement(statement);
        asMethod.setParameters(new Parameters());
        behaviour.addAsMethod(asMethod);

        Imports imports = new Imports();
View Full Code Here

Examples of net.sf.laja.parser.template.Statement

      if (genDecl) {
        String output = data.getOutput(phase, var1, var2, var2b, null, not);
        if (statementList != null) {
          NewStatement newStatement = new NewStatement("FollowedBy", name);
          newStatement.setData(not, cs, output);
          statementList.add(new Statement(phase, baseDecl, "FollowedBy", name, newStatement));
        }
      }
      if (genStat) {
        generateStatement(valstmt, "setElement", phase, not, name, var1, data, statementList);
        generateStatement(followedby, "followedby", phase, not, name, var1, data, statementList);
View Full Code Here

Examples of org.allspice.structured.statement.Statement

      test = new ConstExpr(Boolean.TRUE,range) ;
    }
    else {
        test = term ;
    }
    Statement whileState = new WhileStatement(test,whilebody,range) ;
    if (init == null) {
      return new FIFO<Statement>(whileState) ;
    }
    if (init instanceof ExprForInit) {
        Expr e = ((ExprForInit)init).e ;
View Full Code Here

Examples of org.apache.derby.client.am.Statement

     * @throws SqlException
     *
     */
     public Statement newStatement(Agent agent, org.apache.derby.client.am.Connection connection)
                                            throws SqlException {
         return new Statement(agent,connection);
     }
View Full Code Here

Examples of org.apache.derby.iapi.sql.Statement

    {
      lcc.pushTriggerTable(triggerTable);
    }

    // stored statements always stored as unicode.
    Statement       stmt = lcf.getStatement(dd.getSchemaDescriptor(compSchemaId, null), text, true);

    try
    {
      preparedStatement = (ExecPreparedStatement) stmt.prepareStorable(
                lcc,
                preparedStatement,
                getParameterDefaults(),
                getSchemaDescriptor(),
                type == SPS_TYPE_TRIGGER);
View Full Code Here

Examples of org.apache.synapse.mediators.db.Statement

        Iterator iter = elem.getChildrenWithName(STMNT_Q);
        while (iter.hasNext()) {

            OMElement stmntElt = (OMElement) iter.next();
            Statement statement = new Statement(getValue(stmntElt, SQL_Q));

            Iterator paramIter = stmntElt.getChildrenWithName(PARAM_Q);
            while (paramIter.hasNext()) {

                OMElement paramElt = (OMElement) paramIter.next();
                String xpath = getAttribute(paramElt, ATT_EXPRN);
                String value = getAttribute(paramElt, ATT_VALUE);

                if (xpath != null || value != null) {

                    SynapseXPath xp = null;
                    if (xpath != null) {
                        try {
                            xp = SynapseXPathFactory.getSynapseXPath(paramElt, ATT_EXPRN);

                        } catch (JaxenException e) {
                            handleException("Invalid XPath specified for the source attribute : " +
                                    xpath);
                        }
                    }
                    statement.addParameter(
                            value,
                            xp,
                            getAttribute(paramElt, ATT_TYPE));
                }
            }

            Iterator resultIter = stmntElt.getChildrenWithName(RESULT_Q);
            while (resultIter.hasNext()) {

                OMElement resultElt = (OMElement) resultIter.next();
                statement.addResult(
                        getAttribute(resultElt, ATT_NAME),
                        getAttribute(resultElt, ATT_COLUMN));
            }

            mediator.addStatement(statement);
View Full Code Here

Examples of org.apache.ws.jaxme.sqls.Statement

    }

    public String getConstraint(Constraint pConstraint) {
        if (pConstraint instanceof CombinedConstraint) {
            CombinedConstraint cc = (CombinedConstraint) pConstraint;
            Statement st = cc.getConstrainedStatement();
            if (st instanceof SelectStatement) {
                SelectStatementMetaData selectStatementMetaData = newSelectStatementMetaData((SelectStatement) st);
                return getCombinedConstraint(selectStatementMetaData, cc);
            } else {
                return getCombinedConstraint(null, cc);
            }
        } else if (pConstraint instanceof BooleanConstraint) {
            BooleanConstraint bc = (BooleanConstraint) pConstraint;
            Statement st = bc.getConstrainedStatement();
            if (st instanceof SelectStatement) {
                SelectStatementMetaData selectStatementMetaData = newSelectStatementMetaData((SelectStatement) st);
                return getBooleanConstraint(selectStatementMetaData, bc);
            } else {
                return getBooleanConstraint(null, bc);
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.Statement

    this.scribe.printTrailingComment();
  }
  private void formatStatements(BlockScope scope, final Statement[] statements, boolean insertNewLineAfterLastStatement) {
    int statementsLength = statements.length;
    for (int i = 0; i < statementsLength; i++) {
      final Statement statement = statements[i];
      if (i > 0 && (statements[i - 1] instanceof EmptyStatement) && !(statement instanceof EmptyStatement)) {
        this.scribe.printNewLine();
      }
      statement.traverse(this, scope);
      if (statement instanceof Expression) {
        this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
        this.scribe.printTrailingComment();
        if (i != statementsLength - 1) {
          if (!(statement instanceof EmptyStatement) && !(statements[i + 1] instanceof EmptyStatement)) {
View Full Code Here

Examples of org.codehaus.groovy.ast.stmt.Statement

    }

    private void filterStatements(SourceUnit source, Spec<Statement> spec) {
        Iterator statementIterator = source.getAST().getStatementBlock().getStatements().iterator();
        while (statementIterator.hasNext()) {
            Statement statement = (Statement) statementIterator.next();
            if (!spec.isSatisfiedBy(statement)) {
                statementIterator.remove();
            }
        }
    }
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.